CN100432954C - Inlaid system detection method and system - Google Patents
Inlaid system detection method and system Download PDFInfo
- Publication number
- CN100432954C CN100432954C CNB2005101048935A CN200510104893A CN100432954C CN 100432954 C CN100432954 C CN 100432954C CN B2005101048935 A CNB2005101048935 A CN B2005101048935A CN 200510104893 A CN200510104893 A CN 200510104893A CN 100432954 C CN100432954 C CN 100432954C
- Authority
- CN
- China
- Prior art keywords
- test
- module
- response
- code
- pumping signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
This invention discloses an embedded system testing method and the system. It includes the following steps: write codes accordingly, plant code slice in the testing spot and fix to the embedded system to form a module to be tested; input inspiring signal and response of the module; run the module, input signal from the testing module to the tested module, collect and record the response; if the real response match with the expecting response, operation code without testing code in it would be used by the system. This invention could prevent the testing code from affecting system efficiency.
Description
Technical field
The present invention relates to the embedded system field, relate in particular to the unit testing of embedded system and the method for integration testing.
Background technology
In embedded system unit testing and the integration testing, in order to finish the test to tested module, will add test code in the software design coding is testing service.This process itself is exactly to solving the perturbation process of service logic design and coding, in order to realize the test to business module, will consider the problem of testing in the design of business module, has increased the complicacy of coding.
Such as the state that will collect a software module, write down according to the transition of software module state and to verify whether its state machine works correctly.Existing test way is to write the method for daily record, and promptly each wants the place of recording status point to add delegation's test point record at software.Like this, in this software module, just a large amount of codes that add for test mode have been added.After testing, can repeat to delete these test codes in order to test, in production system, just bring test code like this into, increased system resource and taken, reduced running efficiency of system.
In addition, the existing result who utilizes the method for testing of journal file for test needs follow-up manual analysis to determine whether its result with expectation is consistent, the robotization and the repeatability that are difficult to accomplish test analysis.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of method for testing software of AOP, can improve the operational efficiency of production system when realizing repeated test.The present invention also will provide a kind of system that realizes this method.
In order to solve the problems of the technologies described above, the invention provides a kind of embedded system test method of AOP, may further comprise the steps:
(a) with the business of embedded system and test as two different focus, write respective code respectively, inweave test code sheet according to the braiding rule in the test point of service code, the embedded system of packing into then adds the test module that links to each other with described tested module as tested module in embedded system;
(b) to import the response of expecting under one or more pumping signals of described tested module and each pumping signal when determining test in that embedded system is outside;
(c) the described tested module of operation for embedded system, obtain the Expected Response of data He this pumping signal correspondence of described pumping signal then from the outside by test module, and preserve, export described tested module to after the data of described pumping signal are converted to described pumping signal, collect and write down the real response of tested module under the various pumping signals by test module automatically;
(d) test module judges whether the real response of tested module under various excitations conforms to Expected Response, and preservation test result, output test results to the system outside, if test result meets the requirements, then do not inweave accordingly the service code of test code and use can be for the embedded system actual motion time.
Further, said method also can have following characteristics: described Expected Response or real response comprise the state or the hardware register status information of described tested module state machine.
The test macro of the embedded system of AOP provided by the invention is included in tested module and the test module in the embedded system, and be used to preserve in the embedded system outside pumping signal and expected response data memory module, be used to preserve the logging modle of test result, wherein:
Software code in the described tested module is generated by the specified rule braiding by the code of realizing professional and these two different focus of test, has inweaved to test in the test point of service code and has used the code sheet;
Described test module is used for obtaining from the described memory module of system outside the Expected Response of excited data and this excited data correspondence, described pumping signal is outputed to described tested module, and obtain this module automatically to real response that should pumping signal, judge then whether the Expected Response under this excitation conforms to real response, and comparative result is saved in described logging modle;
Wherein, described test module further comprises with lower unit:
The pumping signal output unit is used for obtaining the pumping signal of described memory module, and it is outputed to described tested module;
The response collecting unit, the response when being used to obtain under pumping signal tested module actual motion;
The response comparing unit is used for Expected Response and the real response of comparison tested module under same excitation, both is consistent and inconsistent result outputs to described test result notification unit;
The expected response data storage unit is used to preserve the difference that obtains from described memory module and encourages expectation down from the response of tested module acquisition;
The excited data storage unit is used to preserve the data from one or more pumping signals of described memory module acquisition;
The test result notification unit is used for the comparative result of response comparing unit is outputed to described logging modle.
When needs are tested the embedded system service code, utilize the AOP technology test code to be woven (Weave) in service code, finish unit testing or integration testing; When needs were published to production system to service code, the direct compilation service code inweaved test code without the technology that inweaves of AOP, is pure service code like this in production system, and test code can not influence the operation of production system.In office what is the need for can inweave service code to test code when wanting and finish repeatably test process.Adopt method of the present invention, further reduced the coupling of service code and test code.Improved the work efficiency of production system.Make test code and service code centralized maintenance.The robotization and the repeatability of test have been realized.
Description of drawings
Fig. 1 is the module map of embodiment of the invention system testing framework.
Fig. 2 is the cellular construction figure of AOP test module among Fig. 1.
Fig. 3 is the synoptic diagram of embodiment of the invention test philosophy.
Fig. 4 is the process flow diagram of embodiment of the invention method.
Embodiment
System can be regarded as by a plurality of focus and makes up realization, for example, and service logic, performance, data storage, test etc.At present extensively can not good treatment to cross a plurality of often be the behavior of incoherent module to OOP (Object oriented programming mode) programming mode that adopts.A kind of new Aspect Oriented Programming mode (AOP) has appearred in recent years, as Aspea is the implementation tool of the Aspect-oriented programming of c++, AOP is the piece-rate system focus clearly, the focus of each crosscut is independently realized with module, these modules are recombinated (also cry and inweave or combination) together by the rule of appointment again, thereby be built into final system.In AOP, these modular units are aspect (aspect).
The principle that the present invention separates according to the AOP focus, characteristics in conjunction with embedded system test, traffic issues and test problem are summed up as two different aspects to be solved respectively, when testing, needs aspect two, interweave, thereby can realize repeated test, can avoid in production system, bringing into unnecessary test code again.
Below in conjunction with accompanying drawing and with specific embodiment the present invention is done detailed explanation:
Fig. 1 shows the module map of present embodiment system, and the hardware device for a needs test has increased the AOP test module in its embedded system.AOP test module in the embedded system is downloaded test expectation and excited data from the excitation of outside and expected response data memory module, send pumping signal to tested module, as Test input signal, automatically obtain its real response, judge then whether the response of tested module meets the behavior of expectation, at last test result is outputed to outside test result logging modle, check for personnel.The response of present embodiment is meant the state of state machine in the tested module, but the present invention is not limited to this, for example, be that the out of Memory that embeds application software operation tense is collected, as collecting hardware register status information this moment, so long as the information that can obtain by embedded software information in response by the code of code snippet of incision.
Tested module is made up of corresponding hardware and wherein software code, and wherein software code, has been inweaved to test in the test point of service code and used the code sheet by specified rule braiding generation by the code of realizing professional and these two different focus of test.
As shown in Figure 2, the AOP test module further comprises expectation state storage unit, excited data storage unit, pumping signal output unit, state collector unit, state comparing unit, and the test result notification unit.Wherein:
The expectation state data storage cell is used to store different excitations and expects down from the status switch of tested module acquisition;
The excited data storage unit is used to store the data of one or more pumping signals of download;
The pumping signal output unit is used for pumping signal is outputed to tested module;
The state collector unit is used for the state when tested module obtains its actual motion;
The state comparing unit is used for expectation state and the virtual condition of comparison tested module under same excitation, writes down and adds up both respectively and be consistent and inconsistent situation, as test result;
The test result notification unit, the comparative result of expectation state and virtual condition outputs to external module under one or more excitations that are used for preserving;
Fig. 3 is the synoptic diagram of embodiment of the invention test philosophy.As shown in the figure, the present invention utilizes the AOP technology to insert probe in the test point that tested module is paid close attention to, the state when being used for surveying the tested module operation.Here, the test point of tested module is corresponding to point of penetration that defines among the AOP or interface (pointcut/join point), and its position is to determine by the braiding of appointment is regular.The code sheet that will carry out on each tie-point/point of penetration in the code of test probe after corresponding to braiding, this code snippet are to be used for the code snippet of collect status information specially.So just set up a test channel between the state collector unit of tested module and test module, this test channel is meant that the code sheet of above-mentioned tie-point/point of penetration can the system state when running to this be transferred to the state collector unit.This passage is set up in needs tests, can remove when not needing to test.
After test channel was set up, when tested module moved, test module can be to the tested module input signal, by the probe in the tested module, collected condition responsive sequence under this pumping signal by state collector; Test module is relatively next by asserting the data of expectation state under this excitation and responsive state again, thereby judges the correctness of tested module behavior.
Fig. 4 is based on the process flow diagram of the test process of AOP, may further comprise the steps:
As can be seen, utilize the behavior of inner each tested module of inspection machine easily of AOP test module whether to meet designing requirement, also can check between the tested module interactional performance whether correct simultaneously.Because adopted the AOP technology, realize the separable of service code and test code, so just can not increase taking of system resource and reduce the operational efficiency of system because of tested code.
The present invention is all right various conversion on the basis of the foregoing description, for example, when test, above-mentioned AOP test module also can be arranged on the outside of embedded system, by the mutual communication of the tested module in interface module and the embedded system, at this moment, expectation state data storage cell, excited data storage unit and test result notification unit needn't be set in this test module, or, also the unit of completion status comparison and logging test results can be changed by external module and realize.
Claims (3)
1, a kind of embedded system test method of AOP may further comprise the steps:
(a) with the business of embedded system and test as two different focus, write respective code respectively, inweave test code sheet according to the braiding rule in the test point of service code, the embedded system of packing into then adds the test module that links to each other with described tested module as tested module in embedded system;
(b) to import the response of expecting under one or more pumping signals of described tested module and each pumping signal when determining test in that embedded system is outside;
(c) the described tested module of operation for embedded system, obtain the Expected Response of data He this pumping signal correspondence of described pumping signal then from the outside by test module, and preserve, export described tested module to after the data of described pumping signal are converted to described pumping signal, collect and write down the real response of tested module under the various pumping signals by test module automatically;
(d) test module judges whether the real response of tested module under various excitations conforms to Expected Response, and preservation test result, output test results to the system outside, if test result meets the requirements, then do not inweave accordingly the service code of test code and use can be for the embedded system actual motion time.
2, the method for claim 1 is characterized in that, described Expected Response or real response comprise the state or the hardware register status information of described tested module state machine.
3, a kind of test macro of embedded system of AOP, be included in tested module and test module in the embedded system, it is characterized in that, be used to preserve in the embedded system outside pumping signal data and expected response data memory module, be used to preserve the logging modle of test result, wherein:
Software code in the described tested module is generated by the specified rule braiding by the code of realizing professional and these two different focus of test, has inweaved to test in the test point of service code and has used the code sheet;
Described test module is used for obtaining from the described memory module of system outside the Expected Response of excited data and this excited data correspondence, described excited data is converted to pumping signal outputs to described tested module, and obtain this module automatically to real response that should pumping signal, judge then whether the Expected Response under this excitation conforms to real response, and comparative result is saved in described logging modle;
Described test module further comprises with lower unit:
The excited data storage unit is used to preserve the data from one or more pumping signals of described memory module acquisition;
The expectation state data storage cell is used to preserve the difference that obtains from described memory module and encourages expectation down from the Expected Response of tested module acquisition;
The pumping signal output unit is used for obtaining from the excited data storage unit pumping signal of described memory module, and it is outputed to described tested module;
The response collecting unit, when being used to obtain under pumping signal tested module actual motion to real response that should pumping signal;
The response comparing unit is used for Expected Response and the real response of comparison tested module under same excitation, both is consistent and inconsistent result outputs to described test result notification unit;
The test result notification unit is used for the comparative result of response comparing unit is outputed to described logging modle.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005101048935A CN100432954C (en) | 2005-09-23 | 2005-09-23 | Inlaid system detection method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005101048935A CN100432954C (en) | 2005-09-23 | 2005-09-23 | Inlaid system detection method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1936862A CN1936862A (en) | 2007-03-28 |
CN100432954C true CN100432954C (en) | 2008-11-12 |
Family
ID=37954373
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005101048935A Expired - Fee Related CN100432954C (en) | 2005-09-23 | 2005-09-23 | Inlaid system detection method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100432954C (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102141956A (en) * | 2010-01-29 | 2011-08-03 | 国际商业机器公司 | Method and system for managing response of security flaw during development |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103593279B (en) * | 2012-08-13 | 2018-02-02 | 百度在线网络技术(北京)有限公司 | A kind of method and apparatus of system testing |
CN109471761B (en) * | 2018-10-29 | 2022-05-17 | 北京京航计算通讯研究所 | Embedded real-time operating system time performance test system applying FPGA |
CN111858326B (en) * | 2020-07-13 | 2023-09-22 | 北京机电工程研究所 | A comprehensive integration testing method for embedded real-time operating systems |
CN112667514B (en) * | 2020-12-31 | 2024-08-20 | 海光信息技术股份有限公司 | Micro-program debugging method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1397996A (en) * | 2002-07-31 | 2003-02-19 | 威盛电子股份有限公司 | Detection method of chip configuration setting |
US6539390B1 (en) * | 1999-07-20 | 2003-03-25 | Xerox Corporation | Integrated development environment for aspect-oriented programming |
US20030141887A1 (en) * | 2001-03-13 | 2003-07-31 | Stephane Briere | Integrated circuit testing device with improved reliability |
CN1503136A (en) * | 2002-11-21 | 2004-06-09 | 深圳市中兴通讯股份有限公司 | Embedded software test method |
US20040143819A1 (en) * | 2003-01-10 | 2004-07-22 | National Cheng Kung University | Generic software testing system and mechanism |
CN1527509A (en) * | 2003-03-06 | 2004-09-08 | 华为技术有限公司 | Test method |
CN1549119A (en) * | 2003-05-07 | 2004-11-24 | 华为技术有限公司 | Logic emulation testing system and method |
CN1564489A (en) * | 2004-04-19 | 2005-01-12 | 中兴通讯股份有限公司 | Testing method for limitting status machine of communication system |
-
2005
- 2005-09-23 CN CNB2005101048935A patent/CN100432954C/en not_active Expired - Fee Related
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6539390B1 (en) * | 1999-07-20 | 2003-03-25 | Xerox Corporation | Integrated development environment for aspect-oriented programming |
US20030141887A1 (en) * | 2001-03-13 | 2003-07-31 | Stephane Briere | Integrated circuit testing device with improved reliability |
CN1397996A (en) * | 2002-07-31 | 2003-02-19 | 威盛电子股份有限公司 | Detection method of chip configuration setting |
CN1503136A (en) * | 2002-11-21 | 2004-06-09 | 深圳市中兴通讯股份有限公司 | Embedded software test method |
US20040143819A1 (en) * | 2003-01-10 | 2004-07-22 | National Cheng Kung University | Generic software testing system and mechanism |
CN1527509A (en) * | 2003-03-06 | 2004-09-08 | 华为技术有限公司 | Test method |
CN1549119A (en) * | 2003-05-07 | 2004-11-24 | 华为技术有限公司 | Logic emulation testing system and method |
CN1564489A (en) * | 2004-04-19 | 2005-01-12 | 中兴通讯股份有限公司 | Testing method for limitting status machine of communication system |
Non-Patent Citations (8)
Title |
---|
Unit Testing and Debugging with Aspects. John Stamey, Jr, Bryan Saunders.Journal of Computing Sciences in Colleges archive,Vol.20 No.5. 2005 |
Unit Testing and Debugging with Aspects. John Stamey, Jr, Bryan Saunders.Journal of Computing Sciences in Colleges archive,Vol.20 No.5. 2005 * |
基于SystemC描述的嵌入式系统的自动化验证. 陈燕,杜玄,彭澄廉.同济大学学报(自然科学版),第32卷第8期. 2004 |
基于SystemC描述的嵌入式系统的自动化验证. 陈燕,杜玄,彭澄廉.同济大学学报(自然科学版),第32卷第8期. 2004 * |
嵌入式系统面向方面编程(AOP)技术的应用. 陈燕,杜玄,彭澄廉.全国第13届计算机辅助设计与图形学(CAD/CG)学术会议论文集. 2004 |
嵌入式系统面向方面编程(AOP)技术的应用. 陈燕,杜玄,彭澄廉.全国第13届计算机辅助设计与图形学(CAD/CG)学术会议论文集. 2004 * |
面向方面(aspect)的程序设计方法. 程虎.信息技术快报,第3卷第1期. 2005 |
面向方面(aspect)的程序设计方法. 程虎.信息技术快报,第3卷第1期. 2005 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102141956A (en) * | 2010-01-29 | 2011-08-03 | 国际商业机器公司 | Method and system for managing response of security flaw during development |
Also Published As
Publication number | Publication date |
---|---|
CN1936862A (en) | 2007-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100589420C (en) | Function operation packaging based automatization test script implementing method and apparatus | |
CN109446076A (en) | Software project testing method, system, storage medium and terminal device | |
CN101093462B (en) | Automatization method for testing schooling pressure on database application | |
CN102331967B (en) | Method for managing chip verification test cases | |
CN112462736B (en) | Wind turbine generator fault diagnosis method based on data analysis | |
CN106951576B (en) | Simulation test evaluation system and evaluation method | |
CN102567203A (en) | Method and system for testing performance of distributed file system (DFS) | |
CN1248116C (en) | General purpose testing arrangement for embedded module and subsystem based on host machine platform | |
CN101017457A (en) | Automatically testing method of computer software | |
CN102053912A (en) | Device and method for automatically testing software based on UML (unified modeling language) graphs | |
CN104391190A (en) | Remote diagnosis system for measuring instrument and diagnosis method thereof | |
CN101350739B (en) | Method for locating fault in IP network | |
CN111782532B (en) | A software fault location method and system based on network abnormal node analysis | |
CN103440135A (en) | Motor testing port automatic generating method | |
CN106646315A (en) | Automatic testing system and automatic testing method for digital measuring instruments | |
CN109885493A (en) | An automated hybrid framework based on Android platform and Java reflection | |
CN107038110A (en) | The method and system of white-box testing | |
CN100432954C (en) | Inlaid system detection method and system | |
CN103744415A (en) | Subway-CBTC testing method and device | |
CN101777022A (en) | Method for analyzing software reliability and system thereof | |
CN101458301A (en) | Method for implementing matching test for automatic test equipment | |
CN105373473B (en) | CDR accuracys method of testing and test system based on original signaling decoding | |
CN108363567B (en) | Database-based verification platform exciter automatic generation method | |
CN102012816B (en) | Method and device for generating IDE engineering file and solution file | |
CN105045993A (en) | Satellite solar cell on-orbit performance degradation prediction method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20081112 Termination date: 20170923 |