CN111813671A - IMA software simulation test system - Google Patents

IMA software simulation test system Download PDF

Info

Publication number
CN111813671A
CN111813671A CN202010636051.9A CN202010636051A CN111813671A CN 111813671 A CN111813671 A CN 111813671A CN 202010636051 A CN202010636051 A CN 202010636051A CN 111813671 A CN111813671 A CN 111813671A
Authority
CN
China
Prior art keywords
test
data
partition
simulation
response
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
CN202010636051.9A
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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN202010636051.9A priority Critical patent/CN111813671A/en
Publication of CN111813671A publication Critical patent/CN111813671A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention discloses an IMA software simulation test system, which comprises a test development end, a data server end and a test execution end; the test development end, the data server end and the test execution end adopt the Ethernet to communicate; the data server and the test execution end are provided with AFDX interface communication equipment and communicate through AFDX; constructing and managing a test model at a test development end; sending test data to a test execution end at a data server end, and receiving a test result sent by the test execution end; and the test execution end tests the execution code and sends a test result to the data server. The software testing universality is further improved, so that the simulation testing capability of the application program under various ARINC 653 operating systems at home and abroad is realized.

Description

IMA software simulation test system
Technical Field
The invention relates to the technical field of software testing, in particular to an IMA software simulation testing system.
Background
At present, with the continuous development of an IMA test system, a simulation test environment integrating test design and execution is developed. The IMA simulation test environment is the result of engineering the IMA simulation test environment on the basis of combining the modeling, simulation test and other technologies. The test environment can be an automatic tool which takes a model of the tested software as input, automatically generates and implements test cases and realizes the analysis of results from the generation to the implementation of the test according to the characteristics of the tested software. The existing comprehensive test environment aiming at IMA later-stage integrated verification is limited in that the test is difficult to implement for an application program which lacks data interaction through an external bus, and the inter-partition communication information cannot be collected due to the lack of a monitoring and acquisition method for inter-partition communication; it is difficult for application software with such communication to meet the interface data coverage requirements, and it is difficult to perform fault monitoring and fault location due to lack of data.
Therefore, how to implement efficient and accurate testing, fault monitoring and positioning of the IMA software, execute an IMA software test case accurately and efficiently according to test requirements, apply test data to a tested object according to specified time and collect response in real time is a problem that needs to be solved by technical personnel in the field.
Disclosure of Invention
In view of this, the present invention provides an IMA software simulation test system, which includes a test development end, a data server end, and a test execution end; the test development end, the data server end and the test execution end adopt Ethernet to communicate; the data server and the test execution end are provided with AFDX interface communication equipment and communicate through AFDX; constructing and managing a test model at a test development end; sending test data to a test execution end at a data server end, and receiving a test result sent by the test execution end; and the test execution end tests the execution code and sends a test result to the data server.
In order to achieve the purpose, the invention adopts the following technical scheme:
an IMA software simulation test system comprises a test development end, a data server end and a test execution end; the test development end, the data server end and the test execution end adopt Ethernet to communicate; the data server and the test execution end are provided with AFDX interface communication equipment and communicate through AFDX; constructing and managing a test model at the test development end; sending test data to the test execution end at the data server end, and receiving a test result sent by the test execution end; and the test execution end tests the execution code and sends the test result to the data server.
Preferably, the test development end comprises an application management module, a test management module, a resource management module and a result storage module; the application management module comprises tested application software and a matched configuration file, and the test management module reads the tested application software and the configuration file to construct a test model; the test management module generates a test execution code and a simulation partition program according to the test model; the resource management module manages the test execution code and the test data and the test script generated by the case model; the resource management module is provided with a data communication unit, and the test script, the simulation partition program and the configuration file are downloaded to the tested equipment to be executed through the data communication unit; the result storage module manages the test data transmitted from the data server to the test development end and stores the test result sent by the test execution end.
Preferably, the test execution end comprises a user layer and a core layer; the core layer comprises a hardware layer, a module support layer and a core operating system layer and provides an executable platform and loading of configuration information for the user layer; the user layer comprises a tested partition application program and a simulation partition, the simulation partition performs data interaction with the tested partition application program through a communication interface provided by the core operating system layer, and applies excitation to the tested partition application program and monitors response to obtain response data; and the test execution end carries out AFDX communication with the data server end to realize the transmission interaction of the excitation test data and the response data.
Preferably, the simulation partition comprises a timing component, a test data management component, a data cache component and a communication interface component; the timing component provides a time signal for loading and collecting the test data; the test data management component is used for providing a unified test data management task; the data cache component is responsible for uploading all data needing to be stored in the test execution process to an external memory at the scheduled idle time; the communication interface component is responsible for accessing other partitions and external interface devices.
Preferably, the data server provides storage of the excitation data and the response data in the test process; packaging data, generating the test excitation data and sending the test excitation data to the test execution end; and receiving the response data transmitted by the test execution terminal.
Preferably, the data server side constructs and sends the excitation test data according to the network protocol requirement and the production task of the excitation test data; and receiving excitation test data in the simulation subarea of the test execution end.
Preferably, the specific process of the excitation test data construction is as follows:
step 11: acquiring a test data frame for constructing the excitation test data;
step 12: combining the test data frames together to form a data block, wherein all the test data frames in the data block act on the same time period;
step 13: if the data block is full, packaging the data block after the data block is constructed, and generating a test data packet;
step 14: and putting the test data packet into a buffer memory, and waiting for a corresponding data transmission task to send.
Preferably, the specific process of sending the excitation test data is as follows:
step 21: taking out the test data packet from the cache, calling a sending interface function driven by equipment, sending the test data packet out, starting a timer for timing, and suspending a task of the test data packet;
step 22: receiving a response, judging whether the sent test data packet corresponds to the response according to the positive serial number SN of the test data after receiving the response, if so, entering step 24, otherwise, continuing to wait for receiving the response; if the response is not received, judging whether the timer is overtime, if not, continuing to wait for receiving the response, otherwise, entering step 23;
step 23: whether the retransmission times reaches the set maximum transmission times or not, if not, returning to the step 21 for retransmission; otherwise, reporting errors;
step 24: judging whether the test execution end successfully receives the test execution end, if so, closing timing and ending the transmission; otherwise, judging whether the retransmission times reaches the maximum transmission times, if not, closing the timer, returning to the step 21 for retransmission, otherwise, reporting an error.
Preferably, the specific process of receiving the excitation test data is as follows:
step 31: calling the equipment driver to receive the interface function, and receiving the test data packet from the data server;
step 32: after receiving the test data packet, checking the correctness, real-time property and the like of the data; if the test result is passed, the test data packet is successfully received, the test data packet is temporarily stored, and meanwhile, the corresponding response is generated and sent to the data server; and if the test data packet does not pass the test, discarding the test data packet, generating a corresponding response and sending the response to the data server.
Preferably, the test development end is installed in a notebook computer running a Microsoft Windows operating system.
Through the technical scheme, compared with the prior art, the invention provides the IMA software simulation test system, combines the IMA software test method based on the simulation partition, starts from IMA resident application and configuration, constructs an IMA software test model through characteristic analysis of the IMA software system, provides a feasible and effective system for multi-level IMA application software function verification, provides technical support for the test and verification work of IMA software, emphasizes on joint debugging test of single resident application and multi resident application, can realize the test and verification work in a single IMA module, further improves the universality of the test method, and realizes the simulation test capability of application programs under various ARINC 653 operation systems at home and abroad.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a diagram of a simulation test system for IMA software according to the present invention;
FIG. 2 is a diagram of a test development end architecture provided by the present invention;
FIG. 3 is a block diagram of a test execution end according to the present invention;
FIG. 4 is a diagram illustrating the internal structure of the emulation partition according to the present invention;
FIG. 5 is a flow chart of the construction of an incentive test data packet of a data server according to the present invention;
FIG. 6 is a flow chart of the transmission of the excitation test data of the data server according to the present invention;
FIG. 7 is a diagram illustrating a connection relationship between a data server and a test execution end according to the present invention;
FIG. 8 is a communication diagram of a test process based on the AFDX protocol provided by the present invention;
FIG. 9 is a diagram of an IMA software simulation test system according to the present invention during a test execution process;
FIG. 10 is a diagram illustrating an exemplary IMA module provided in accordance with the present invention;
FIG. 11 is a graph of exemplary test results provided by the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses an IMA software simulation test system, which comprises a test development end, a data server end and a test execution end; the test development end, the data server end and the test execution end adopt Ethernet to communicate; the data server and the test execution end are provided with AFDX interface communication equipment and communicate through AFDX; constructing and managing a test model at a test development end; sending test data to a test execution end at a data server end, and receiving a test result sent by the test execution end; and the test execution end tests the execution code and sends a test result to the data server.
The specific technical effects are as follows: the test development end, the data server end and the test execution end are connected through the Ethernet switch, and the following functions are mainly realized: downloading the test data and the test script to a data server; downloading the compiled and connected test execution codes to a test execution end; uploading the test result of the test execution end to the test development end;
the data service end and the test execution end communicate with each other through the AFDX interface communication equipment, and the excitation test data and the response data communicate with each other in real time through the bus in the test execution process.
In order to further optimize the technical scheme, the test development end uses a Microsoft Windows operating system as an operating system of the test development end, not only serves as a test modeling tool to construct and manage a test model, but also serves as upper computers of the data service end and the test execution end to provide functions of program downloading, operation control and the like for the data service end and the test execution end, the main functions are in the form of development platform plug-ins, and testers can complete test work by using a program interface unified with system developers without installing and learning other platform technologies;
the system mainly comprises an application management module, a test management module, a resource management module and a result storage module, wherein each function module is mainly divided into a management layer and a core layer, each management layer has corresponding core layer function realization, and the system comprises:
the application management module is used for managing the application program to be tested, and comprises the application program to be tested, a corresponding configuration file and the like; the method comprises the following steps that a development platform project management component is tracked, compiled application programs to be tested and configuration files are copied to an independent folder for management, if a certain application program to be tested or a certain configuration file to be tested is changed due to modification, an application management module can automatically copy the latest file to the independent folder, a management layer of the application management module manages the content in the independent folder as the input of a test system, and the corresponding relation of the content is recorded;
the test management module mainly corresponds to the generation functions of the test model and the test execution code; after the modeling and function development of the test application program are completed, a test management module can be utilized to automatically generate a test model of the partition application program and a framework code of the simulation partition; the specific process is as follows: the test management module firstly reads a tested application program managed by the application management component and a matched configuration file thereof, and constructs a test model; after the test model information is completely supplemented, generating a test execution code according to the test model information; the test management module also provides a case model construction tool, an operation profile case model of the tested application program can be constructed in a mode of constructing a sequence diagram, a test case which accords with the coverage rule of the specified path can be generated by using the case model, and test data and a test script are generated by using the test case;
the resource management module is mainly used for managing the test execution code generated by the test management module; managing test data and test scripts generated by the test cases; in the process that the test system starts to execute, the resource management module downloads a test script, a frame code of a simulation partition, a configuration file and the like to the tested equipment through the data communication unit for execution;
and the result storage module is mainly used for managing the test data transmitted from the data server to the test development end after the test is finished and storing the test result to the test development end.
In order to further optimize the technical scheme, the test execution end is a hardware platform on which the application program to be tested and the test execution code run, a core operating system is run, when the IMA resident application software is tested, the application program to be tested is downloaded into the equipment to be executed, and the equipment operation information is output to the test development end through a serial port; the system is mainly divided into a user layer and a core layer; the core layer mainly comprises a hardware execution platform of the test system and a core operating system, and the user layer comprises a tested application program, a simulation partition, a test script and the like;
the core layer is a bottom platform of the test system, provides functions of loading and the like of an executable platform and configuration information for the user layer, and is mainly divided into a hardware layer, a module support layer and a core operating system layer;
the user layer comprises a tested partition application program and a simulation partition; in the testing process, the simulation partition carries out data interaction with the application program of the tested partition through a communication interface provided by a core operating system layer, and applies excitation and monitors response to the application program; the test data management component positioned in the simulation partition can execute test cases on the application program of the tested partition according to the specified time and sequence;
the simulation partition is a core component in the test process of the application program of the tested partition, needs to apply excitation and collect response within a specified time, and mainly comprises a timing component, test data management, a communication interface and data cache, so that the main structure of the simulation partition consists of six modules, namely a timer, task scheduling, script management, memory management, data storage and a communication interface, according to the functional requirements of the simulation partition.
In order to further optimize the technical scheme, due to the characteristic of inter-partition communication of the IMA system, an application program of a tested partition cannot directly access an I/O port and a network port, and port mapping is required to be performed through a configuration information table so as to indirectly access the port. The core operating system of the core operating system layer adopts a Tianmai 2 operating system or a VxWorks 653 operating system and is communicated with an external module or special equipment through a virtual port;
the virtual port is positioned in the virtual partition, the virtual partition is positioned in the core operating system, and the virtual port is mapped to an external communication equipment driver to solve the communication between the IMA partition and the external equipment; when the virtual port is configured, virtual partitions and virtual port configuration information need to be added in a configuration information table, the virtual partitions are not really partitions in a core operating system, the virtual port is actually located in the core operating system, and a special drive name is matched with an external communication equipment drive corresponding to the virtual port in the configuration of the virtual port;
for the external device driver, a specified interface of a core operating system needs to be called to add a driver for the virtual port, and when the port is initialized by the system, the virtual port driver is installed by searching the calling interface in the system according to the configured driver name; after the virtual port is configured, a channel is required to be established so as to be connected with the specified port of the simulation partition; each port occupies certain space resources, if the number of ports configured by the system is large, the situation of insufficient space resources may occur, or the number of configured ports is small, and a space needs to be reserved for other operating system components, at this time, the adjustment can be performed through the memory resources of inter-partition communication, and the external device driver mainly includes the following processes in the process of adding the virtual port driver: configuring an external communication terminal, and carrying out rule check on configuration information; opening external communication equipment and loading configuration information; and creating a mapping relation between the external communication port and the virtual port.
In order to further optimize the technical scheme, the data server is provided with a large-capacity storage device for storing test data and test scripts, the data server runs a VxWorks real-time operating system, and the test development end controls the running and data uploading functions of the VxWorks real-time operating system; the storage of the excitation test data and the response data required in the test process is provided, and large-capacity data storage equipment is mounted; in order to communicate with the test execution end in real time in the test execution process, a corresponding data protocol processing program is required to be added to the data server; generally, in the test implementation process, the simulation partition communicates with the application program of the partition to be tested through a core operating system, and the test data for excitation and the response data obtained by monitoring communicate with the data server through a high-speed communication (AFDX) bus, so as to obtain the excitation test data from the data server or send the response data to the data server; in order to ensure that the excitation test data is reliably transmitted to the test execution end in real time and correctly, the data must be packaged according to the requirements of the network protocol, the process is realized by an excitation test data production task, and then the construction of the excitation test data, the transmission of the excitation test data and the receiving of the excitation test data by the simulation partition of the test execution end are carried out.
In order to further optimize the technical scheme, the test execution code can be automatically generated by using an XSLT-based script transformation technology, interface code information is extracted from the test execution code by using an IMA software APEX interface code template, and an actual XSLT transformation test script is formed according to a corresponding generation rule.
Examples
Fig. 1 shows a structure diagram of an IMA software simulation test system, which is composed of a test development end, a data service end, a test execution end, and an ethernet network connecting the test development end, the data service end, the test execution end, and the ethernet network. In the IMA software testing process, the tested application program and the simulation partition program run together at a test execution end. The emulation partition will simulate other application functions that interact with the application under test, apply stimuli to the application under test and collect responses. The test execution end and the data service end are both connected with the test development end through an external high-speed communication (AFDX) bus. In the test execution process, the excitation test data and the response data are both stored in the data server, so that the data server is also operated in a real-time operating system in order to meet the real-time requirement in the test execution.
Fig. 2 is a structural diagram of a test development end, which mainly includes application management, test management, resource management, and result storage modules, where each functional module is mainly divided into a management layer and a core layer, and each management layer module has a corresponding core layer function to implement.
Fig. 3 is a diagram of a test execution structure, which is mainly divided into two parts, namely a user layer and a core layer. The core layer is mainly composed of a hardware execution platform of the test system and a core operating system, and the user layer comprises tested application program software, all simulation partitions, test scripts and the like.
Fig. 4 is a diagram of an internal structure of a simulation partition, which mainly includes a timing component, a test data management component, a communication interface component, and a data cache component, where the timing component sends a time notification to the test data management component, the test data management component and the data cache component perform data operations with each other, the test data management component performs interface access to the communication interface component, and the communication interface component performs information interaction with an external communication bus. The main functions of each module in the simulation partition are as follows:
the timing component is used for providing a time signal for loading and collecting test data, and the timing component is required to provide a trigger signal for the test data management component according to a specified time or period; in the simulation partition, the excitation time, the period and the like of the data are obtained through a timing component, and meanwhile, a clock provided by the timing component is also used for detecting whether the test response data is overtime or not, whether the data uploading work is overtime or not and the like;
the test data management component is used for providing a unified test data management task; the system is responsible for managing data sent by or received by partitions in the test process and simultaneously supporting simple control of data and storage space; in the test implementation process, the excitation test data is stored in the management component before being applied to the tested partition program, and relevant data operation required by the test is carried out; before the test response data is uploaded to the external memory, the test data management component is also responsible for management;
the data cache component is responsible for uploading all data needing to be stored in the test execution process to the external memory in the scheduled idle time, wherein the data comprises the execution time, the execution result and the like of certain events, and also comprises logs and error information in the test process;
the communication interface component is responsible for accessing other partitions and external interface equipment, and comprises calling an ARINC 653 protocol interface to communicate with an application program of the partition to be tested and transmitting the content to be stored to a data server.
As shown in fig. 5, which is a flow chart for constructing an excitation test data packet at a data server, for constructing excitation test data, firstly, excitation data and relevant information for constructing the excitation data packet, such as a tested partition, a port for inter-partition communication, excitation action time, and the like, are acquired from a test script or other data source, and a test data frame is constructed according to the information; secondly, the test data frames are combined together to form a data block, so that the data transmission efficiency can be improved, but the test data in the data block all act on the same time period; then, after the data block is constructed, packaging the data block to generate a data excitation packet; and finally, the data packet is put into a buffer memory to wait for a corresponding data transmission task to be sent.
As shown in fig. 6, which is a flow chart of sending excitation test data at a data server, in a sending process of the excitation test data, a data packet is taken out from a buffer in a first step, that is, a data packet is taken out from a message queue testDataPacketID, a sending interface function driven by a device is called, an excitation is sent out, then a timer is started, and a task of the device is suspended; receiving response, wherein the response must be received within a specified time, otherwise, the response needs to be retransmitted or other measures are taken; after receiving the response, firstly judging whether the sent excitation data corresponds to the response or not, and judging according to the data frame number; and then judging whether the test execution end successfully receives the data, if so, continuing to transmit the data, otherwise, retransmitting the data, and specifying that the maximum transmission times exist in retransmission.
In the process of receiving the excitation test data by the simulation partition of the test execution end, firstly, calling a device driving receiving interface function and receiving the excitation test data from the data server end; secondly, after receiving the excitation test data, checking the correctness, real-time property and the like of the data; if the data is successfully received, the data is temporarily stored, and a corresponding response is generated and sent to the data server; if the data does not pass the test, the data is discarded and a corresponding response is generated.
Fig. 7 shows the connection relationship between the data service end and the test execution end. In the test implementation process, the simulation partition is communicated with an application program of the tested partition through a core operating system, excitation test data for excitation and response data obtained by monitoring are communicated with a data server through a high-speed communication bus, and the excitation test data are obtained from the data server or the response data are sent to the data server;
the IMA partition software testing process based on the simulation partition mechanism mainly comprises four working processes. The method mainly comprises the following steps that firstly, the working process of a test command is realized, the control on the test process is mainly realized, the initialization, the test start and the test end of the test process are controlled, and data transmitted in a network in the process mainly comprises various test commands and corresponding responses; the clock synchronization process is mainly used for realizing the time synchronization between the tested partitions of the data server and the test execution end and is completed by the data server and the simulation partitions; thirdly, the working process of the excitation test data test is mainly used for applying the excitation test data, the data server sends excitation to the simulation partition, and the simulation partition forwards the excitation to the partition to be tested; and fourthly, testing the working process of the response data, mainly realizing the collection of the response data, and sending the data from the tested partition to a data server side by the simulation partition.
Fig. 8 is a communication diagram of a test procedure based on the AFDX protocol, which shows the transmission direction of various data and the related processing of the data during the test procedure. The clock synchronization process is not included in the figure because it works similarly to the test response data. The data packets in the figure represent AFDX payload or data frame payload;
the working process of the test command mainly comprises the procedures of command construction and sending of the data server, command receiving and response of the test execution end, confirmation of the data server and the like, wherein:
(1) the data server side, the construction and the sending of the test command, mainly include the work: the commands mainly comprise test initialization, start and stop and the like; certain events (clock, interrupt) trigger test command construction tasks; checking the residual space of the test command data packet cache, and if the space is sufficient, putting the constructed command into the cache to wait for sending; if there is no remaining space, the task is blocked; the data transmission task checks whether a test command waiting for sending exists in the cache, if so, the AFDX is called to send an API function, and the command is sent; otherwise, the transmission task is changed into a waiting state (blocking); the sent test command is not removed from the cache, and the command is removed after receiving the response.
(2) The test execution end receives instructions, which include: a test command receiving task (interrupt or polling) calls an AFDX receiving API function to receive a test command; checking the correctness and the sequence of the received test command; and after the inspection is finished, performing different operations according to the inspection result. If the verification is passed, activating the operation related to the command and constructing a response of successful reception; if the test is not passed, constructing a response of failed reception; and sending the response to the data server.
(3) The data server receives the response, which includes: the receiving task (interrupt or poll) puts the received response into a response data cache and informs the synchronous task (mutual exclusion semaphore); the synchronous task checks whether the test command is successfully sent according to the response, and if so, the test command which is sent but not confirmed is removed from the test command cache; otherwise, retransmitting or reporting the error; and the data server sends the next test command.
For the transmission of the excitation test data, similar to the command transmission, it is also necessary to include the data server side transmission, the execution side reception and response, the data server side reception, and the like. Response data of the application program to be tested is firstly received by the simulation partition in the test execution end and then is transmitted to the data service end for storage through the external communication bus in the execution time period of the simulation partition.
The IMA software simulation test system is shown in FIG. 9 during the test execution process, and firstly needs to read the partition configuration file and module configuration file required by the application program to be tested, construct an IMA software test model according to the read configuration information, construct the cross-linked simulation partition code and test configuration file required by the test execution according to the test model, and simulate the running environment of the software to be tested; and meanwhile, automatically generating a test case set facing to the state and the interface of the tested software according to the test model, then loading the tested software, the simulation partition and the related configuration file to a test execution end for execution, and applying excitation and acquisition response to the tested software according to the test case.
Because the IMA partition embedded system uses a resource configuration file (blueprint) to manage various resources (such as CPU time, memory, I/O interface and the like) of the system, a tester can customize a corresponding resource configuration file according to the characteristics and resource requirements of a tested object. The simulation test system takes the configuration file and the tested software as input, simulates the running environment of the tested software on a specific hardware platform, utilizes a partition application agent to interact with the tested software in a partition mode, and meanwhile, agent software located in a bottom operating system can monitor the system behavior of the tested software in real time, and the specific steps are described as follows:
(1) importing tested software and relevant configuration, and constructing a test model; in order to obtain various kinds of information of the software under test, the software under test needs to be analyzed and information is extracted to construct a test model before the test starts to be executed. For an IMA system, resource configuration information of a software to be tested and an execution environment thereof is acquired from a configuration file thereof, and three types of configuration files are generally used for recording resource configuration of the system. Wherein:
and the module resource allocation is used for allocating the number of the partitions executed in the whole module and allocating resource information such as memory space, IO space, CPU time and the like for each partition. And defines the data communication mode between modules and the connection mode between data ports. For a hardware platform with an external bus, which modules need to access the external bus is also defined, including information such as the type of interface to be accessed, the configuration of the interface, and the like. The method also includes various memory segment addresses used by the operating system, and the allocation mode of the relevant functions and resources of the operating system.
And the partition resource configuration defines some characteristics of the partition, including the quantity of openable core resources, the quantity of tasks and the like, and also records the information of memory space, IO space configuration, port access authority and mode of the tasks and the like in the partition.
And the application configuration defines the number and type of ports required by the IMA application program, the actual number of tasks in the partition, the used resources and the like.
(2) The testing personnel edits the test model and sets a test object and a test strategy; after the test model is built, a tester can test the boundary in the model by equipment, namely, determine a test object, and configure the attributes of related components in the test model according to the requirements.
(3) Generating a test configuration and simulation partition code according to the test object; through the information in the test model, the resource allocation condition of the whole system, the resource use condition of the tested software and the data interaction condition of the tested software and other application modules can be obtained. Combining the configuration information of each layer of the tested system, the test system carries out the following series of operations:
(a) generating simulation application program frameworks of other partitions except the tested application program according to the module resource configuration information;
(b) generating a designated port access and recording program for the simulation partition according to the module resource configuration information;
(c) generating corresponding test resource access programs for the simulation partitions according to the application configuration information of the tested software partitions, and generating corresponding port control programs in the simulation partitions and generating resource configuration files in the simulation partitions according to the execution characteristics of the tested software;
(d) and according to the application configuration and module configuration information of the tested software partition, and the generated resource configuration information of the simulation partition, evaluating the schedulability of the whole test execution environment.
(4) Compiling a test script (test case), compiling a response action for a specified event occurring in the test process; the above steps establish a test execution environment, but a complete test case is not realized yet. The user registers the written script to the corresponding event in the test execution environment by calling the API function such as periodic call or event registration, etc., wherein the event comprises: data receiving and transmitting of the partition port; trigger control according to a certain period or delay; analyzing and calculating frame format or data; and recording and transmitting data.
After the test script is completed, the script code is loaded to the data server to wait for execution before the test is started.
(5) Constructing and loading a test execution environment, and testing the application program to be tested; the tester may simulate running the application under test in a manner similar to the developer debugging the system. After the whole test execution environment is constructed, each simulation partition carries out automatic test according to the time sequence and the process specified by the test script and records various data generated in the test process, wherein the automatic test comprises the following steps:
(a) loading and unloading data of the partition application program, including trigger time, execution time and the like;
(b) scheduling data of the partition application program, including task switching time, time slice length of the partition application, and the like;
(c) communication data among the application programs of the partitions comprises the label of each port, receiving and sending time, data frame content and the like;
(d) the information of abnormal and error occurrence time, error state and the like in the execution process of the partition application program;
in the testing process, the simulation subarea maps the subarea port to the external bus port in a port mapping mode, and test record data is transmitted to the data server side for storage in real time through the high-speed external bus.
In this embodiment, a typical IMA module example as shown in fig. 10 is used to perform test analysis on the resident applications to be tested, and a connection relationship matrix c between the partitioned applications may be constructed according to the test model. The resident applications and their relationship within the IMA module are presented here, meaning that the blueprint configuration or partial configuration within the IMA module has been determined, in which case the test is typically an integrated application test or a multi-application joint debugging test.
Since the ports have either output or input characteristics, the path connecting the ports is also directional, with only flow from the output port to the input port. The channels comprise the following two types:
(1) one-to-one channel, which is similar to an end-to-end transmission mode, wherein one output port corresponds to one input port, and the channel adopts a one-way transmission mode; as in the figure, c ═ p (p)1,1,p0,3),p1,1∈p1,p0,3∈p0
(2) One-to-many channel, which is similar to multicast mode, with one output port connected to multiple input ports(ii) a As in the figure, c ═ p (p)1,2,p2,3,p3,1),p1,2∈p1,p2,3∈p2,p3,1∈p3
P in the above formulai,jDenotes ports belonging to different partitions, where i denotes a partition number, j denotes a port number, and thus p1,2Indicating port "p 2" in partition "part 1".
According to the connection relationship in model fig. 10, a data communication connection matrix between the partitioned applications can be determined, wherein the positions having connection relationship are represented by 1, and the positions not connected are represented by 0. The values of this matrix are described in table 1.
TABLE 1 exemplary model connection relationship description Table
Figure BDA0002569144770000141
It can be seen from the observation of the data in the table that, for any row, the row vector represented by the row vector is not a zero vector, and the data representing all the output ports have ports to receive. For all column vectors represented in the table, there is also no zero vector, indicating that all input ports have corresponding output ports connected to them. Depending on the nature of the IMA channel, there should be only one value of 1 in each column vector, indicating that each input port can only correspond to one output port.
The software and configuration of the calculation and control partition (partition two) are set as the tested objects, the signal preprocessing partition (partition one) is used as a simulation object, and the connection relation between the partitions is used as the tested objects.
Before performing the model conversion process using the test code automatic generation method, the test model described by the AADL language needs to be instantiated and stored in an XML file.
After the model conversion is finished, an XML description file with the IMA module as a root node is obtained, the file is used as an information exchange file for a code and configuration generation tool to directly read and analyze parameters, and the tool automatically generates simulation partition codes and test configuration files required by the test according to various configuration information recorded by the XML file.
The simulation partition code can be directly added into an IMA software development environment, is compiled and connected with an application program to be tested together, and finally generates an executable test program. As can be seen from the figure, the generated simulation partition code comprises the work of port creation, process creation, partition state switching and the like. Wherein the port creation code creates the various types of ports needed to emulate the partition according to the test connection matrix described previously. And the process information is created for corresponding tasks such as excitation test data, response data collection and the like according to the structural characteristics of the simulation partition.
After completing the work of port creation, etc., the simulation partition is switched to a normal state, and means the partition can be scheduled by the system. In the test execution process, the simulation partition receives test data from a port connected with the external interface equipment according to a specified period and sends the test data to the port connected with the tested software according to a specified time.
The automatically generated emulated partition code has not been able to implement a complete IMA system. The simulation test system also needs to generate IMA module configuration files (i.e., system blueprint files) needed for test execution. The test configuration comprises configuration information copied from the application configuration of the tested partition, configuration information required by the simulation partition in the test execution process, and a scheduling table, wherein the scheduling table is created, and corresponding time slices are respectively allocated to the tested application and the simulation partition. Meanwhile, the configuration file contains the connection relation between the simulation partition and the virtual partition, and port resources of the virtual partition are opened. In a test execution environment, the virtual partition is used for driving AFDX interface equipment to realize real-time uploading and downloading of data in the test process.
Through schedulability analysis, the scheduling resource allocation scheme is available. And then, the tester executes compiling connection on the configuration information file and the simulation partition code file which are automatically generated by the test environment, and loads the configuration information file and the simulation partition code file to the hardware execution platform to execute the test.
After about 10 minutes of testing, the test results were collected and saved, as shown in FIG. 11, with the horizontal axis representing simulated time and the vertical axis representing input. The light gray line in the figure is the input data of the partition under test (partition two, P2), i.e. the output data of the port _ outDt of the emulated partition. The black line is the response data of the partition to be tested, and the output data of the partition two port _ outCtrl. The control logic of partition two is: when the input data is larger than 0, outputting control data 0.5; when the input data is less than 0, outputting control data-0.5; when the input data is 0, the output is 0. In the embodiment, a sine wave is used as the excitation data of the subareas, and as can be seen from the result data, the result of the subarea two is consistent with the expectation, and the test verifies that the subarea two is correct in function.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. An IMA software simulation test system, comprising: the test development terminal, the data server terminal and the test execution terminal; the test development end, the data server end and the test execution end adopt Ethernet to communicate; the data server and the test execution end are provided with AFDX interface communication equipment and communicate through AFDX; constructing and managing a test model at the test development end; sending test data to the test execution end at the data server end, and receiving a test result sent by the test execution end; and the test execution end tests the execution code and sends the test result to the data server.
2. An IMA software simulation test system according to claim 1, wherein said test development terminal comprises an application management module, a test management module, a resource management module and a result storage module;
the application management module comprises tested application software and a matched configuration file, and the test management module reads the tested application software and the configuration file to construct a test model;
the test management module generates a test execution code and a simulation partition program according to the test model;
the resource management module manages the test execution code, the test data generated by the case model and the test script; the resource management module is provided with a data communication unit, and the test script, the simulation partition program and the configuration file are downloaded to the tested equipment to be executed through the data communication unit;
the result storage module manages the test data transmitted from the data server to the test development end and stores the test result sent by the test execution end.
3. An IMA software simulation test system according to claim 2, wherein said test execution end comprises a user layer and a core layer;
the core layer comprises a hardware layer, a module support layer and a core operating system layer and provides an executable platform and loading of configuration information for the user layer;
the user layer comprises a tested partition application program and a simulation partition, the simulation partition performs data interaction with the tested partition application program through a communication interface provided by the core operating system layer, and applies excitation to the tested partition application program and monitors response to obtain response data; and the test execution end carries out AFDX communication with the data server end to realize transmission interaction of the excitation test data and the response data.
4. An IMA software simulation test system according to claim 3, wherein said data services provide storage of said stimulus test data and said response data during testing; packaging excitation data, generating the excitation test data, and sending the excitation test data to the test execution end; and receiving the response data transmitted by the test execution terminal.
5. An IMA software simulation test system according to claim 3, wherein said simulation partition comprises a timing component, a test data management component, a data caching component and a communication interface component; the timing component provides a time signal for loading and collecting the test data; the test data management component is used for providing a unified test data management task; the data cache component is responsible for uploading all data needing to be stored in the test execution process to an external memory at the scheduled idle time; the communication interface component is responsible for accessing other partitions and external interface devices.
6. An IMA software simulation test system according to claim 4, wherein stimulus test data construction and stimulus test data transmission is performed at said data server in accordance with network protocol requirements and production tasks of said stimulus test data; and receiving excitation test data in the simulation subarea of the test execution end.
7. An IMA software simulation test system according to claim 6, wherein the specific process of said stimulus test data construction is as follows:
step 11: acquiring a test data frame;
step 12: combining the test data frames together to form a data block, wherein all the test data frames in the data block act on the same time period;
step 13: after the data block is constructed, packaging the data block to generate a test data packet;
step 14: and putting the test data packet into a buffer memory, and waiting for a corresponding data transmission task to send.
8. An IMA software simulation test system according to claim 7, wherein said specific procedures for transmitting said stimulus test data are as follows:
step 21: taking out the test data packet from the cache, calling a sending interface function driven by equipment, sending the test data packet out, starting a timer for timing, and suspending a task of the test data packet;
step 22: receiving a response, and judging whether the sent test data packet corresponds to the response or not after the response is received;
step 23: and judging whether the test execution end successfully receives the data, if so, continuing to transmit the data, otherwise, retransmitting the data until the retransmission times reach the set maximum transmission times.
9. An IMA software simulation test system according to claim 8, wherein said stimulus test data reception is performed by:
step 31: calling the equipment driver to receive the interface function, and receiving the test data packet from the data server;
step 32: after receiving the test data packet, checking the correctness, real-time property and the like of the data; if the test result is passed, the test data packet is successfully received, the test data packet is temporarily stored, and meanwhile, the corresponding response is generated and sent to the data server; and if the test data packet does not pass the test, discarding the test data packet, generating a corresponding response and sending the response to the data server.
CN202010636051.9A 2020-07-03 2020-07-03 IMA software simulation test system Pending CN111813671A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010636051.9A CN111813671A (en) 2020-07-03 2020-07-03 IMA software simulation test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010636051.9A CN111813671A (en) 2020-07-03 2020-07-03 IMA software simulation test system

Publications (1)

Publication Number Publication Date
CN111813671A true CN111813671A (en) 2020-10-23

Family

ID=72855746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010636051.9A Pending CN111813671A (en) 2020-07-03 2020-07-03 IMA software simulation test system

Country Status (1)

Country Link
CN (1) CN111813671A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685302A (en) * 2020-12-29 2021-04-20 长威信息科技发展股份有限公司 Method and system for automatically constructing and deploying
CN112699036A (en) * 2020-12-29 2021-04-23 中国航空工业集团公司西安飞机设计研究所 Multi-partition multi-version airborne application software test case multiplexing method
CN112737872A (en) * 2020-12-11 2021-04-30 中国航空工业集团公司西安航空计算技术研究所 ARINC664P7 end system cross-network testing system and method
CN112799968A (en) * 2021-04-08 2021-05-14 湖南高至科技有限公司 Test drive modeling system and method based on script
CN115630594A (en) * 2022-12-19 2023-01-20 杭州加速科技有限公司 Method and system for converting chip design simulation file into Pattern file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1493987A (en) * 2002-10-31 2004-05-05 英业达股份有限公司 System and method of using single storage to proceed test
US20120065921A1 (en) * 2010-07-28 2012-03-15 Airbus Operations (S.A.S.) Method and device for testing input/output interfaces of avionic modules of ima type
CN103235756A (en) * 2013-04-22 2013-08-07 北京航空航天大学 Simulation testing method for partition application software of embedded system
CN110161346A (en) * 2019-06-20 2019-08-23 中国商用飞机有限责任公司北京民用飞机技术研究中心 A kind of avionics test macro

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1493987A (en) * 2002-10-31 2004-05-05 英业达股份有限公司 System and method of using single storage to proceed test
US20120065921A1 (en) * 2010-07-28 2012-03-15 Airbus Operations (S.A.S.) Method and device for testing input/output interfaces of avionic modules of ima type
CN103235756A (en) * 2013-04-22 2013-08-07 北京航空航天大学 Simulation testing method for partition application software of embedded system
CN110161346A (en) * 2019-06-20 2019-08-23 中国商用飞机有限责任公司北京民用飞机技术研究中心 A kind of avionics test macro

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王震 等: "跨平台APEX接口组件的设计与实", 《测控技术》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112737872A (en) * 2020-12-11 2021-04-30 中国航空工业集团公司西安航空计算技术研究所 ARINC664P7 end system cross-network testing system and method
CN112685302A (en) * 2020-12-29 2021-04-20 长威信息科技发展股份有限公司 Method and system for automatically constructing and deploying
CN112699036A (en) * 2020-12-29 2021-04-23 中国航空工业集团公司西安飞机设计研究所 Multi-partition multi-version airborne application software test case multiplexing method
CN112699036B (en) * 2020-12-29 2023-03-14 中国航空工业集团公司西安飞机设计研究所 Multi-partition multi-version airborne application software test case multiplexing method
CN112799968A (en) * 2021-04-08 2021-05-14 湖南高至科技有限公司 Test drive modeling system and method based on script
CN115630594A (en) * 2022-12-19 2023-01-20 杭州加速科技有限公司 Method and system for converting chip design simulation file into Pattern file

Similar Documents

Publication Publication Date Title
CN111813671A (en) IMA software simulation test system
CN103235756B (en) A kind of emulation test method of embedded system subregion application software
CN109039824B (en) Automatic test system and method for wireless remote communication protocol of vehicle-mounted terminal
CN109740222B (en) Testing device and system for automobile networking scene
US7315807B1 (en) System and methods for storage area network simulation
US20080320071A1 (en) Method, apparatus and program product for creating a test framework for testing operating system components in a cluster system
US7337361B2 (en) Test harness for enterprise application integration environment
US7380168B2 (en) System development tool
US20100082315A1 (en) Interface between a verification environment and a hardware acceleration engine
Ali et al. An industrial application of robustness testing using aspect-oriented modeling, UML/MARTE, and search algorithms
Torens et al. Remotetest: A framework for testing distributed systems
CN109947535A (en) The direct fault location external member of Virtual machine
CN113051040A (en) Remote distributed joint simulation method in different places
CN111400162B (en) Test method and test system
CN108833005B (en) Optical network communication equipment and automatic test kit and method for networking service thereof
CN116681013B (en) Simulation verification method, platform, device, equipment and medium of network chip
US11539612B2 (en) Testing virtualized network functions
Grabe et al. Credo methodology: modeling and analyzing a peer-to-peer system in credo
CN111431739B (en) QualNet-oriented dynamic fault setting method for simulation communication network
Kanstren A study on design for testability in component-based embedded software
CN111221687B (en) Cloud storage testing system and method
CN109086200B (en) Effective test framework based on android virtual machine modification
CN112527645A (en) Automatic testing method for OPC-UA consistency
CN116909894B (en) Virtual-real fusion hybrid dynamic test platform design method
Encontre Testing embedded systems: Do you have the guts for it

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201023

RJ01 Rejection of invention patent application after publication