CN102662843B - A kind of method for testing software of Simulated Spacecraft unit exception - Google Patents
A kind of method for testing software of Simulated Spacecraft unit exception Download PDFInfo
- Publication number
- CN102662843B CN102662843B CN201210105296.4A CN201210105296A CN102662843B CN 102662843 B CN102662843 B CN 102662843B CN 201210105296 A CN201210105296 A CN 201210105296A CN 102662843 B CN102662843 B CN 102662843B
- Authority
- CN
- China
- Prior art keywords
- hardware
- adapter
- virtual
- manager
- hardware adapter
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of method for testing software of Simulated Spacecraft unit exception, it comprises definition hardware manager and hardware adapter, hardware adapter list is set up in hardware manager, and define hardware adapter interface, change the real equipment class in configuration file into virtual unit class, the information processing function of defining virtual equipment class, abnormal injection before carrying out free of contamination operation, and with virtual hardware Simulated Spacecraft equipment, the operation to real hardware or the operation to virtual hardware are encapsulated in hardware adapter.The invention has the beneficial effects as follows: define hardware manager, hardware adapter, the operation of real hardware, virtual hardware is encapsulated in hardware adapter interface, adopt virtual hardware Simulated Spacecraft equipment, various certainty fault and chance failure can be simulated, use the test case of the method exploitation can accomplish tested software pollution-free, can not the problem of Simulated Spacecraft unit exception when solving software test.
Description
Technical field
The present invention relates to a kind of method for testing software of Simulated Spacecraft unit exception.
Background technology
Spaceborne device is numerous, and the complete unit related to is numerous, and constituent parts achieves the unit test equipment of different framework according to spaceborne device concrete condition.Spacecraft-testing software needs to examine these units and synthetic operation situation.Before software drops into formal use, unit testing, integration testing, configuration item test and system qualification testing need be carried out, to find software defect, improve software quality.
During configuration item test, various exception must be applied with the robustness of verifying software to software, find out leak wherein.But at present without effective hardware anomalies applying method, when its reason is software work, can not spaceborne device be damaged, real airborne equipment cannot be used to apply abnormal, at present also without the exception of equipment various on miscellaneous equipment imitating shell, therefore software configuration item test job cannot be carried out.
Summary of the invention
The object of the invention is to the shortcoming overcoming prior art, a kind of method of testing of spacecraft-testing software is provided, can not the problem of Simulated Spacecraft unit exception when can solve software test, simulate various certainty fault and chance failure.
The object of the invention is to be achieved through the following technical solutions: a kind of method for testing software of Simulated Spacecraft unit exception, it comprises following steps:
(1), define hardware manager and hardware adapter, hardware manager and hardware adapter are connected each other by configuration file;
(2), set up hardware adapter list based on CBaseDriver in hardware manager, and define hardware adapter interface;
(3), by the real equipment class in configuration file virtual unit class is changed into, the information processing function of defining virtual equipment class
(4) abnormal before free of contamination operation injection is carried out, and with virtual hardware Simulated Spacecraft equipment;
(5), the operation to real hardware or the operation to virtual hardware are encapsulated in hardware adapter, through hardware adapter Card read/write, process function and ID exclusive number;
(6), hardware manager searches corresponding hardware adapter according to the hardware ID number of unified distribution;
(7), particular hardware operation is performed by hardware adapter interface.
Described hardware adapter list is the version of one-to-many.
Described configuration file is XML format configuration file.
The invention has the beneficial effects as follows: define hardware manager, hardware adapter, the operation of real hardware, virtual hardware is encapsulated in hardware adapter interface, adopt virtual hardware Simulated Spacecraft equipment, various certainty fault and chance failure can be simulated, use the test case of the method exploitation can accomplish tested software pollution-free, can not the problem of Simulated Spacecraft unit exception when solving software test.
Accompanying drawing explanation
Fig. 1 is test schematic diagram of the present invention;
Fig. 2 is hardware manager Organization Chart of the present invention.
Embodiment
Technical scheme of the present invention is further described below in conjunction with accompanying drawing, but described in claimed scope is not limited to.
As Fig. 1, a kind of method for testing software of Simulated Spacecraft unit exception, it comprises following steps:
(1), define hardware manager and hardware adapter, hardware manager and hardware adapter are connected each other by configuration file;
(2), set up hardware adapter list based on CBaseDriver in hardware manager, and define hardware adapter interface, the Major Members of CBaseDriver is in table 1
Table 1CBaseDriver Major Members table
Hardware adapter list is numbered mark with key word ID, and in identification information write configuration file driver.xml.Hardware manager uses ID numbering to search a certain hardware adapter (may be real hardware, also may be virtual hardware), by interface function operation particular hardware or the virtual unit of this hardware adapter.
Definition format in driver.xml is as follows:
(3), by the real equipment class in configuration file virtual unit class is changed into, the information processing function of defining virtual equipment class
(4) abnormal before free of contamination operation injection is carried out, and with virtual hardware Simulated Spacecraft equipment;
(5), the operation to real hardware or the operation to virtual hardware are encapsulated in hardware adapter, through hardware adapter Card read/write, process function and ID exclusive number, hardware manager searches related hardware according to ID, realizes operation that is true, virtual unit;
(6), hardware manager searches corresponding hardware adapter according to the hardware ID number of unified distribution;
(7), particular hardware operation is performed by hardware adapter interface.
Described hardware adapter list is the version of one-to-many.
Described configuration file is XML format configuration file, is numbered by the ID of hardware adapter and in type write configuration file, reduces the coupling of code.
As Fig. 2, the basis of CBaseDriver achieves RS422 serial communication class of operation C422Driver, 1553B bus communication class C1553Driver, and virtual hardware class CVirtual1553, CVirtual422.
If carry out software test, use the virtual cpu CPU based on 1553B communication that is virtually reality like reality, as long as testsoft.C1553Driver to be changed into the title of virtual cpu class.
To simulate cpu fault, defining virtual CPU class CVirtuaCPU.The data buffer simulating one piece of 1553B of CVirtualCPU class, and define the read/write function for buffer zone.The various actions of true CPU when taking orders of the information processing functional simulation of CVirtualCPU class.The information processing function code example of CVirtualCPU class is as follows:
The information processing code of above code and true CPU is similar, but uses auto-coding instrument the information processing code of true CPU to be converted into the information processing code of CVirtualCPU class, thus generating test use case fast.
Claims (1)
1. a method for testing software for Simulated Spacecraft unit exception, is characterized in that: it comprises following steps:
(1), define hardware manager and hardware adapter, hardware manager and hardware adapter are connected each other by configuration file;
(2), set up hardware adapter list based on CBaseDriver in hardware manager, and define hardware adapter interface; The Major Members of CBaseDriver sees the following form;
Hardware adapter list is numbered mark with key word ID, and in identification information write configuration file driver.xml, hardware manager uses ID numbering to search a certain hardware adapter, by interface function operation particular hardware or the virtual unit of this hardware adapter;
(3), by the real equipment class in configuration file virtual unit class is changed into, the information processing function of defining virtual equipment class;
(4), abnormal before free of contamination operation injection is carried out, and with virtual hardware Simulated Spacecraft equipment;
(5), the operation to real hardware or the operation to virtual hardware are encapsulated in hardware adapter, through hardware adapter information processing function and ID exclusive number;
(6), hardware manager searches corresponding hardware adapter according to the hardware ID number of unified distribution;
(7), particular hardware operation is performed by hardware adapter interface;
Described hardware adapter list is the version of one-to-many.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210105296.4A CN102662843B (en) | 2012-04-11 | 2012-04-11 | A kind of method for testing software of Simulated Spacecraft unit exception |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210105296.4A CN102662843B (en) | 2012-04-11 | 2012-04-11 | A kind of method for testing software of Simulated Spacecraft unit exception |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102662843A CN102662843A (en) | 2012-09-12 |
CN102662843B true CN102662843B (en) | 2015-11-25 |
Family
ID=46772340
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210105296.4A Active CN102662843B (en) | 2012-04-11 | 2012-04-11 | A kind of method for testing software of Simulated Spacecraft unit exception |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102662843B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103713934A (en) * | 2012-09-29 | 2014-04-09 | 京信通信***(中国)有限公司 | Method and system for application program visiting physical peripheral |
CN113157382B (en) * | 2020-12-16 | 2023-03-28 | 建信金融科技有限责任公司 | Virtual drive-based equipment calling method and device |
CN113704091B (en) * | 2021-07-30 | 2024-02-09 | 郑州云海信息技术有限公司 | Logic code debugging method, device, equipment and storage medium |
CN113535588A (en) * | 2021-08-09 | 2021-10-22 | 北京烁科精微电子装备有限公司 | CMP equipment simulation test method and test system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916205A (en) * | 2010-07-22 | 2010-12-15 | 北京航天自动控制研究所 | Frequency domain test system and method for flight control software control network |
CN102004662A (en) * | 2010-12-07 | 2011-04-06 | 江南大学 | Embedded scalable virtual machine |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101782868A (en) * | 2009-01-21 | 2010-07-21 | 国际商业机器公司 | Method and device for performance testing for local method call |
-
2012
- 2012-04-11 CN CN201210105296.4A patent/CN102662843B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916205A (en) * | 2010-07-22 | 2010-12-15 | 北京航天自动控制研究所 | Frequency domain test system and method for flight control software control network |
CN102004662A (en) * | 2010-12-07 | 2011-04-06 | 江南大学 | Embedded scalable virtual machine |
Also Published As
Publication number | Publication date |
---|---|
CN102662843A (en) | 2012-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10503848B2 (en) | Target capture and replay in emulation | |
US8935573B2 (en) | Reliable unit testing through cached mocking | |
US20130110880A1 (en) | Test planning using attribute value properties | |
US8135571B2 (en) | Validating manufacturing test rules pertaining to an electronic component | |
CN102662843B (en) | A kind of method for testing software of Simulated Spacecraft unit exception | |
Nahir et al. | Bridging pre-silicon verification and post-silicon validation | |
CN104516798B (en) | Wireless one-to-many test system | |
CN105046279A (en) | Analog circuit fault mode classification method | |
CN105956410B (en) | A kind of Universal-purpose quick detection method of IEC61850 full models | |
CN104569794A (en) | FPGA on-line tester based on boundary scan structure and testing method thereof | |
CN101154322A (en) | System and method for integrating a process control system into a training simulator | |
US9189578B1 (en) | System, method, and computer program product for power supply network visualization | |
US20200074040A1 (en) | Hierarchical expression coverage clustering for design verification | |
US9015024B2 (en) | Enabling reuse of unit-specific simulation irritation in multiple environments | |
CN103530166B (en) | Verification platform and verification method for multi-channel chip based on virtual RAM | |
US10664637B2 (en) | Testbench restoration based on capture and replay | |
CN104123212A (en) | System test method of USB chip | |
CN104765668B (en) | Method for verifying stability of NFS server | |
CN103116617B (en) | A kind of disposal route of integrated circuit test data | |
CN104598306A (en) | Process scheduling method in PHM simulation verification | |
Feng et al. | Design and application of reusable SoC verification platform | |
CN115373929A (en) | Test method, device, equipment, readable storage medium and program product | |
CN208938094U (en) | A kind of universal serial bus test macro | |
CN104296999A (en) | Double-two-out-of-two vehicle-mounted second-line maintenance and test platform | |
CN112231062A (en) | Safety test system and method for programmable industrial controller |
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 |