CN114297065A - Automatic test method, automatic test system, electronic device, and readable storage medium - Google Patents

Automatic test method, automatic test system, electronic device, and readable storage medium Download PDF

Info

Publication number
CN114297065A
CN114297065A CN202111630828.1A CN202111630828A CN114297065A CN 114297065 A CN114297065 A CN 114297065A CN 202111630828 A CN202111630828 A CN 202111630828A CN 114297065 A CN114297065 A CN 114297065A
Authority
CN
China
Prior art keywords
test
test case
generating
graphical
automatic
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.)
Pending
Application number
CN202111630828.1A
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Keliang Information Technology Co ltd
Original Assignee
Shanghai Keliang Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Keliang Information Technology Co ltd filed Critical Shanghai Keliang Information Technology Co ltd
Priority to CN202111630828.1A priority Critical patent/CN114297065A/en
Publication of CN114297065A publication Critical patent/CN114297065A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention relates to the technical field of simulation test, and discloses an automatic test method, an automatic test system, electronic equipment and a readable storage medium. In the invention, the automatic test method comprises the following steps: acquiring a test case template in an xml format filled by a user; generating a test script according to the test case template; and distributing the test script to a target machine to realize the automatic test of the flight control computer. The automatic test method, the automatic test system, the electronic equipment and the readable storage medium provided by the invention can realize quick and effective development of test cases, reduce the burden of testers and reduce the labor cost of flight control computer simulation test.

Description

Automatic test method, automatic test system, electronic device, and readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of simulation test, in particular to an automatic test method, an automatic test system, electronic equipment and a readable storage medium.
Background
In order to improve the safety of the equipment, simulation tests, such as semi-physical simulation tests, are usually performed on the equipment. For example, flight control systems that directly affect flight safety and stability have become increasingly demanding with the development of aviation technology, and software systems have become increasingly complex. Because the particularity of aviation equipment, the system test can not be directly carried out on the airplane, and the traditional iron bird test can not fully realize effective dynamic test, so that a more convenient and efficient ground test verification environment needs to be built, the dynamic test requirement of the flight control system can be met, and the flight control system is comprehensively semi-physical tested and verified before the flight test.
The inventor finds that at least the following problems exist in the prior art: because the simulation test of the flight control system is a task with high repeatability, large task amount and long time period, the development of test cases needs to consume a large amount of time and energy of testers, the test burden is heavier, and the labor cost is higher.
Disclosure of Invention
The invention aims to provide an automatic testing method, an automatic testing system, electronic equipment and a readable storage medium, which can realize quick and effective development of a test case, reduce the burden of testers and reduce the labor cost of simulation testing of a flight control computer.
In order to solve the above technical problem, an embodiment of the present invention provides an automatic testing method, including: acquiring a test case template in an xml format filled by a user; generating a test script according to the test case template; and distributing the test script to a target machine to realize the automatic test of the flight control computer.
An embodiment of the present invention further provides an automatic test system, including: the system comprises a first development host and a target machine which is in communication connection with the first development host and is used for being electrically connected with equipment to be tested; the first development host is used for acquiring a test case template in an xml format filled by a user, generating a test script according to the test case template and distributing the test script to a target machine; and the target machine is used for receiving and executing the test script so as to realize the automatic test of the equipment to be tested.
An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the automatic test method as described above.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and is characterized in that the computer program is executed by a processor to realize the automatic test method.
Compared with the prior art, the method and the device have the advantages that the test case template filled by the user is obtained, the test script is generated according to the test case template, the test script is distributed to the target computer to achieve automatic testing of the flight control computer, and the user can automatically generate the test script containing a large number of test cases only by filling the test case template, so that the test cases can be rapidly and effectively developed, the burden of testing personnel is reduced, and the labor cost of simulation testing of the flight control computer is reduced.
In addition, the generating a test script according to the test case template includes: generating a graphical test case interface according to the test case template; and generating a test script according to the graphical test case interface. By generating the graphical test case interface, the logic of the test case is visually displayed, so that the filling result of the test case template is conveniently verified.
In addition, after generating the graphical test case interface according to the test case template, the method further includes: acquiring online editing operation aiming at the graphical test case interface; updating the graphical test case interface according to the online editing operation; generating a test script according to the graphical test case interface, wherein the generating comprises the following steps: and generating a test script according to the updated graphical test case interface.
In addition, the generating of the graphical test case interface includes: the graphical test case interface is provided in a wizard manner. The configuration is beneficial to guiding the tester to carry out the configuration of each test flow in the test case.
In addition, the generating a test script according to the test case template includes: and reading the instruction code value and the data package rule corresponding to the test case template in the xml format, and generating a graphical instruction sending module.
In addition, the generating a test script according to the test case template further includes: and reading the instruction code value and the data package rule corresponding to the configured fault injection configuration table to generate a graphical fault state sending module.
In addition, still include: and the second development host is in communication connection with the target machine and is used for outputting visual pictures and/or simulating a ground station.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a flow chart of an automatic test method provided by a first embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an automatic test system provided in a second embodiment of the present invention;
fig. 3 is a schematic diagram of an electronic device provided in a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
In order to ensure the safety and stability of the flight control system, a semi-physical simulation test platform of the flight control system is set up. The platform can dynamically test the flight control system in a mode of an airborne physical object and a simulation model.
The inventor finds that the simulation test of the flight control system is a task with high repeatability, large task quantity and long time period, and can be replaced by an automatic test program, so that the human cost is saved through an automatic test method on the basis of not changing the semi-physical simulation system architecture, and the simulation test can be effectively and accurately completed.
The first embodiment of the present invention relates to an automatic test method, and the specific flow is shown in fig. 1, which includes the following steps:
s11: and acquiring the test case template filled by the user in the xml format.
The xml (eXtensible Markup Language) format refers to an eXtensible application Markup Language format, and is a simple data storage Language.
S12: and generating a test script according to the filled test case template.
This step may include: generating a graphical test case interface according to the test case template; and generating a test script according to the graphical test case interface. The configuration is beneficial to guiding the tester to carry out the configuration of each test flow in the test case. By generating the graphical test case interface, the logic of the test case is visually displayed, so that the filling result of the test case template is conveniently verified.
The generating of the graphical test case interface comprises the following steps: the graphical test case interface is provided in a wizard manner.
Optionally, after generating the graphical test case interface according to the test case template, the method may further include: acquiring online editing operation aiming at the graphical test case interface; updating the graphical test case interface according to the online editing operation; generating a test script according to the graphical test case interface, wherein the generating comprises the following steps: and generating a test script according to the updated graphical test case interface.
That is, the embodiment provides a graphical use case development function, and particularly provides a convenient, efficient and high-quality graphical test case editing interface, which is used for a user to design a test case in a guide manner. The test case can automatically generate a test script. The functions of creating, deleting, copying, pasting and the like of the test case are supported, and the test flow in the common mode comprises various types (sending signals, receiving signals, expression assignment, expression judgment, time delay, action flow, starting action flow, stopping action flow, circulation, jumping out of circulation, continuing circulation, and comparing expected values).
Optionally, the embodiment may also provide a graphical protocol development function, and specifically, have a convenient and easy-to-use user-defined communication protocol construction and configuration function; the tester can design the user communication protocol (ICD) itself in a graphical manner. The protocol construction supports various data types, supports communication protocol definition accurate in place, can be variable in length, can set a large-small end mode, supports nesting of protocols, and can lead out the protocols for multiplexing.
In practical application, the generating a test script according to the test case template includes: and reading the instruction code value and the data package rule corresponding to the test case template in the xml format, and generating a graphical instruction sending module. Further, the generating a test script according to the test case template may further include: and reading the instruction code value and the data package rule corresponding to the configured fault injection configuration table to generate a graphical fault state sending module.
Specifically, in the test management technique, the following aspects may be included:
1) and (3) user authority management: the system has a multi-user management function, allows multiple users to operate software simultaneously, and supports a user adding/deleting function; the software has portability.
2) And (3) test item management: and factors such as time of the constructed test project, test subjects, testers, test result analysis, test result storage file names and the like.
3) Managing test cases: the method can automatically generate a test case editing interface (elements of the test case are expandable) according to an imported test case template (xml format), and realize functions of online editing, test case import and export and the like according to the automatically generated test case template;
4) and (3) test instruction management: the method has the configurable functions of instruction sending and fault injection, and can read corresponding instruction code values and data package rules according to the Excel table to generate an instruction sending module; and in the same way, the corresponding fault state sending module can be generated according to the configured fault injection configuration table and the data package rule.
S13: and distributing the test script to a target machine to realize the automatic test of the flight control computer.
In this step, the development host may send the test script to the target machine, and the target machine sends the test script to the target machine, so as to implement the automatic test of the flight control computer.
In practical application, the software scheme provided by this embodiment may not only include the aforementioned test management technology, graphical protocol and use case development technology, but also include: the system comprises an automatic test execution technology, a data processing analysis technology and an automatic report generation technology.
The automated test execution technology may include the following aspects:
1) the start-stop control of the system is automatically realized, and the start-stop control of the software and hardware system can be carried out according to the identification (including the control of the power supply of each hardware device by controlling the program-controlled power supply).
2) Distributing test cases, specifically, distributing the test cases to each functional computer according to the edited test cases (including a start identifier of the test, an end identifier of the test, an execution sequence of the test and a condition judgment for executing each step);
3) and (4) managing the test turns, namely, realizing unattended automatic test according to the sequence of the arranged test cases.
4) And (3) storing and analyzing data, specifically, storing all test data, and analyzing the stored test data according to the communication protocol requirement, wherein the minimum storage period is 2 ms.
5) The automatic interpretation of the data, specifically, can import the data interpretation rule, and according to the data interpretation rule imported, analyze the parameter in the interpretation table from all test data, judge and read automatically, and give out whether to meet the label of the interpretation rule;
6) the on-line monitoring can particularly support the real-time on-line monitoring of all input and output data and the on-line monitoring of the automatic operation process of the test.
Regarding the data processing and analyzing technology, specifically, the selected parameters can be automatically processed according to the set data curve template, and the curve can be automatically generated, so that a plurality of parameters can be displayed in the same curve graph.
With regard to report auto-generation techniques, the following aspects may be included:
1) and (3) test data statistics: the automatic statistics of the test information is supported, and the number of the cases, the number of the cases passing/not executing, the number of the problems, the number of the test interrupts and the statistical data can be led to Word.
2) Generating a test document: the test outline, the test result report and the like can be automatically generated according to the test case, one-key derivation is supported, and the test document template can be customized.
Regarding the real-time design of the automatic test software, in particular, the real-time performance of the automatic test software needs to meet the real-time performance requirement of the existing semi-physical simulation system.
In this embodiment, a semi-physical simulation automated testing environment of the flight control system is established on the basis of a software and hardware platform of an existing general semi-physical simulation system (without changing an original semi-physical simulation platform frame), semi-physical simulation automated testing of the flight control system is realized by the automatic testing method provided by this embodiment, a parameter bias test, a wind interference test, a stability margin, a typical control strategy test and the like can be realized, and verification of an automated testing of a typical testing scene can be realized.
Compared with the prior art, the safety and the stability of the flight control system are verified in a semi-physical simulation mode; through an automatic testing mode, the labor cost of a repeatability test is reduced, and the effectiveness and the accuracy of the test are improved; by means of the automatic testing mode of the semi-physical simulation system, the test period is shortened, and testers can rapidly and effectively develop test cases for multiple times in one-time development. In addition, the test report is directly generated, the passing rate is given, and the method is more convenient and efficient.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A second embodiment of the present invention provides an automatic test system, as shown in fig. 2, including: the system comprises a first development host 11 and a target machine 12 which is connected with the first development host 11 in a communication mode (can be connected through Ethernet communication) and is used for being electrically connected with a device to be tested 13 (can be connected through a cable).
The first development host 11 is configured to obtain a test case template in an xml format filled by a user, generate a test script according to the test case template, and distribute the test script to a target machine. The target machine 12 is used to receive and execute the test script to realize automatic testing of the device under test 13 (which may be an flight control computer).
Optionally, the automatic test system may further include: and a second development host 14 communicatively connected to the target machine 12, wherein the second development host 14 is used for outputting visual pictures and/or simulating ground stations, for example, the number of the second development hosts 14 is multiple, one second development host 14 is used for outputting visual pictures, one second development host 14 is used for simulating ground stations, and one second development host 14 is used for installing an experiment management system and providing a user interface. Of course, the output visual scene (and/or the simulation ground station) may be performed on the same development host as the running test script, which is not limited herein.
In practical application, the automatic test system may be composed of 3 layers, which are respectively:
1) and developing and monitoring the subsystem.
The subsystem is composed of 3 (or other) first development hosts 11 (provided systems), and an automatic test software platform is the method of the embodiment of the invention, and mainly completes functions of online monitoring of test management functions (user authority management, test project management, test case management and test instruction management), automatic generation of test reports (test data statistics and test document generation) and the like.
2) And operating the subsystem in real time.
The subsystem is a target machine system (including a target machine 12), is composed of 1 (or other quantity of) Vxworks simulation machine (provided with a system), is a core part of the whole system, has a Vxworks real-time operating system, and can complete functions of test execution functions (automatic start and stop of the system, distribution of test cases, storage and analysis of test data, automatic interpretation of data, automatic data processing and the like) in the automatic test method in the first embodiment besides running a simulation model which a user already has.
3) And (5) equipment to be tested.
The device to be tested 13 in the semi-physical simulation test system is mainly a flight control computer, receives data given by the model in the real-time operation subsystem, gives a control instruction through the existing algorithm control law of the flight control computer, and returns the control instruction to the real-time operation subsystem.
All physical equipment of the semi-physical simulation test system, including a development host, a Vxwork simulator, a flight control computer, a power supply, a cable and the like, are provided, and the semi-physical simulation automatic test environment of the flight control system is established on the basis of the provided software and hardware platform.
It should be understood that this embodiment is a system example corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A third embodiment of the present invention relates to an electronic device (which may be a development host in an automatic test system), as shown in fig. 3, including: at least one processor 201, and a memory 202 communicatively coupled to the at least one processor 201, wherein the memory 202 stores instructions executable by the at least one processor 201, the instructions being executable by the at least one processor 201 to enable the at least one processor 201 to perform the automatic test method as described above.
Where the memory 202 and the processor 201 are coupled in a bus, the bus may comprise any number of interconnected buses and bridges, the buses coupling one or more of the various circuits of the processor 201 and the memory 202 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 201 is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor 201.
The processor 201 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory 202 may be used to store data used by the processor 201 in performing operations.
A fourth embodiment of the present invention relates to a computer-readable storage medium storing a computer program which, when executed by a processor, implements the automatic test method embodiment described above.
That is, as can be understood by those skilled in the art, all or part of the steps in the method according to the above embodiments may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (10)

1. An automatic test method, comprising:
acquiring a test case template in an xml format filled by a user;
generating a test script according to the test case template;
and distributing the test script to a target machine to realize the automatic test of the flight control computer.
2. The automatic test method of claim 1, wherein the generating a test script according to the test case template comprises:
generating a graphical test case interface according to the test case template;
and generating a test script according to the graphical test case interface.
3. The automatic test method according to claim 2, after generating the graphical test case interface according to the test case template, further comprising:
acquiring online editing operation aiming at the graphical test case interface;
updating the graphical test case interface according to the online editing operation;
generating a test script according to the graphical test case interface, wherein the generating comprises the following steps:
and generating a test script according to the updated graphical test case interface.
4. The automated test method of claim 2, wherein the generating a graphical test case interface comprises:
the graphical test case interface is provided in a wizard manner.
5. The automatic test method of claim 1, wherein the generating a test script according to the test case template comprises:
and reading the instruction code value and the data package rule corresponding to the test case template in the xml format, and generating a graphical instruction sending module.
6. The automatic test method of claim 5, wherein generating a test script according to the test case template further comprises:
and reading the instruction code value and the data package rule corresponding to the configured fault injection configuration table to generate a graphical fault state sending module.
7. An automatic test system, comprising: the system comprises a first development host and a target machine which is in communication connection with the first development host and is used for being electrically connected with equipment to be tested;
the first development host is used for acquiring a test case template in an xml format filled by a user, generating a test script according to the test case template and distributing the test script to a target machine;
and the target machine is used for receiving and executing the test script so as to realize the automatic test of the equipment to be tested.
8. The automatic test system of claim 7, further comprising: and the second development host is in communication connection with the target machine and is used for outputting visual pictures and/or simulating a ground station.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the automatic test method of any one of claims 1 to 6.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the automatic test method of any one of claims 1 to 6.
CN202111630828.1A 2021-12-28 2021-12-28 Automatic test method, automatic test system, electronic device, and readable storage medium Pending CN114297065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111630828.1A CN114297065A (en) 2021-12-28 2021-12-28 Automatic test method, automatic test system, electronic device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111630828.1A CN114297065A (en) 2021-12-28 2021-12-28 Automatic test method, automatic test system, electronic device, and readable storage medium

Publications (1)

Publication Number Publication Date
CN114297065A true CN114297065A (en) 2022-04-08

Family

ID=80971406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111630828.1A Pending CN114297065A (en) 2021-12-28 2021-12-28 Automatic test method, automatic test system, electronic device, and readable storage medium

Country Status (1)

Country Link
CN (1) CN114297065A (en)

Similar Documents

Publication Publication Date Title
CN106940428B (en) Chip verification method, device and system
CN111124850A (en) MQTT server performance testing method, system, computer equipment and storage medium
CN106446412B (en) Model-based test method for avionics system
US20100095159A1 (en) Apparatus and method for automatic testing of software or digital devices
CN106933745A (en) WEB automatic interface testing methods and system
CN104360951B (en) A kind of script method of testing and device
CN112052172B (en) Rapid test method and device for third-party channel and electronic equipment
CN106445800A (en) Chip verification method and device
CN106407108B (en) A kind of test method and system of train network logout software
CN107018523A (en) WIFI module testing method and device
CN104730937A (en) Semi-physical simulation system and semi-physical simulation method
CN111104139A (en) Firmware upgrading method, device, equipment and storage medium
CN104391247A (en) Relay protection test method and system based on IEC61850 digital tester
EP2511841A2 (en) System and method for generation of cim-based power system circuit models
CN114707236A (en) Model-based virtual-real combined simulation test method
CN110689238B (en) Method and system for realizing MMS (multimedia message service) information simulation and point-to-point of intelligent substation
CN112631937A (en) Automatic CAN operation testing method and device for T-Box
CN113919158A (en) Simulation method and device for flight control panel and storage medium
CN114201346A (en) HIL (hardware-in-the-loop) testing method and device of CAN (controller area network) communication interface and electronic equipment
CN103440133A (en) Development method and system of chip testing software
KR20140042126A (en) Dcs logic diagram simulation apparatus for power plant and the method thereof
CN112199273A (en) Virtual machine pressure/performance testing method and system
CN109669438B (en) Aircraft servo elasticity test analysis system and medium
CN114297065A (en) Automatic test method, automatic test system, electronic device, and readable storage medium
CN107622013B (en) Distributed system testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination