Embedded software testing method, device and system, storage medium and program product

Through test modeling, simulation testing and signal mapping, the microcontroller platform drives embedded controller for black box testing, solving the problems of low efficiency and complex testing of embedded software testing, and achieving efficient testing processes and low-cost testing Environment construction.

CN119166512APending Publication Date: 2024-12-20JIANGSU XCMG STATE KEY LAB TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411227707.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing embedded software testing methods are inefficient, unable to achieve accurate evaluation of complex test cases, and difficult to quickly regress the test, the testing environment is expensive to build, and it is impossible to directly input real physical signals at the input end of the controller for black box testing.

Method used

Test engineering data is generated through test modeling, simulation software is called for simulation tests, and test case data is sent to the microcontroller platform. The black box test is completed through the microcontroller platform driver embedded controller, and a signal mapping table is established for signal conversion Mapping with interfaces to realize automated testing processes, and using the Arduino platform to input and output real signals.

Benefits of technology

It improves the efficiency of embedded software testing, realizes editing and accurate evaluation of complex test cases, reduces the cost of repeated construction of test projects, can quickly conduct regression testing, and directly inputs real physical signals at the input for black box testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166512A_ABST
    Figure CN119166512A_ABST
Patent Text Reader

Abstract

The invention relates to an embedded software testing method, device and system, a storage medium and a program product. The embedded software testing method comprises the steps that testing modeling is conducted on embedded software, testing engineering data are generated, and the testing engineering data comprise testing case data of the embedded software; calling simulation software to complete a simulation test on the test case data; and sending the test case data to a microcontroller platform, and driving an embedded controller to complete the black box test of the test case data through the microcontroller platform. According to the method, the test efficiency of the embedded software is improved, and editing and accurate evaluation of the complex test case can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of embedded software testing, and in particular to a testing method, device and system, storage medium and program product of embedded software. Background Art

[0002] As vehicles and construction machinery become more intelligent and automated, the functions of related embedded software become more powerful and complex, and the workload of embedded software testing also increases.

[0003] The development phase of embedded software from unit-level code to integration-level code is generally accompanied by a testing process from white box (simulation test phase) to black box. When the integration-level code is downloaded to the embedded controller for functional testing, the black box testing method is mostly used because the source code cannot be directly seen.

[0004] Since embedded controllers do not have an intuitive human-computer interaction interface, black box testing generally requires inputting signal stimulus to the input port and observing whether the output of the output port meets expectations through measuring equipment (such as an oscilloscope).

[0005] Due to the limitations of project costs and cycles, related technologies mostly use manual testing methods during the black box testing phase for some embedded controllers with relatively simple control algorithm logic and a small number of IO interfaces: the required excitation signal is input from the input end of the embedded controller through a signal generator according to the test requirements, and at the same time, an oscilloscope or other signal measuring equipment is used to observe whether the output signal at the output end of the embedded controller meets expectations. Summary of the invention

[0006] The inventors discovered through research that the related technology is tested manually, which has low testing efficiency and cannot implement accurate evaluation.

[0007] In view of at least one of the above technical problems, the present disclosure provides a testing method, device and system, storage medium and program product for embedded software, which improves the testing efficiency and can realize the editing and accurate evaluation of complex test cases.

[0008] According to one aspect of the present disclosure, there is provided a method for testing embedded software, comprising:

[0009] Performing test modeling on the embedded software to generate test engineering data, wherein the test engineering data includes test case data of the embedded software;

[0010] Calling simulation software to complete simulation testing of the test case data;

[0011] The test case data is sent to a microcontroller platform, and the microcontroller platform drives an embedded controller to complete a black box test of the test case data.

[0012] In some embodiments of the present disclosure, the embedded software testing method further includes:

[0013] Establishing a first signal mapping table, wherein the first signal mapping table is used to establish a correspondence between the test signal in the test engineering data and the test signal in the simulation test;

[0014] A second signal mapping table is established, wherein the second signal mapping table is used to establish a correspondence between the test signals in the test engineering data and the physical pins in the microcontroller platform.

[0015] In some embodiments of the present disclosure, the embedded controller under test includes embedded software under test that is compiled and downloaded to the embedded controller under test.

[0016] In some embodiments of the present disclosure, sending the test case data to a microcontroller platform, and driving an embedded controller through the microcontroller platform to complete a black box test of the test case data includes:

[0017] Sending the test case data to the microcontroller platform so that the microcontroller platform drives a first physical pin to convert the test case data into an excitation signal and outputs it to the embedded controller, and receives output signal data of the embedded controller through a second physical pin;

[0018] The output signal data is read from the microcontroller platform.

[0019] In some embodiments of the present disclosure, the embedded software testing method further includes:

[0020] The output signal data is compared with the first expected result to generate a first test report.

[0021] In some embodiments of the present disclosure, the embedded software testing method further includes:

[0022] The test result of the simulation test is compared with the second expected result to generate a second test report.

[0023] In some embodiments of the present disclosure, the test engineering data also includes at least one of test evaluation data, test process data records, historical versions of test data, and test reports.

[0024] According to another aspect of the present disclosure, there is provided a testing device for embedded software, comprising:

[0025] A test data generation module is configured to perform test modeling on the embedded software and generate test engineering data, wherein the test engineering data includes test case data of the embedded software;

[0026] A simulation test module is configured to call simulation software to complete simulation testing of the test case data;

[0027] The black box test module is configured to send the test case data to the microcontroller platform, and drive the embedded controller through the microcontroller platform to complete the black box test of the test case data.

[0028] According to another aspect of the present disclosure, there is provided a testing device for embedded software, comprising:

[0029] a memory configured to store instructions;

[0030] The processor is configured to execute the instructions so that the embedded software testing device executes the embedded software testing method as described in any of the above embodiments.

[0031] According to another aspect of the present disclosure, there is provided a testing system for embedded software, comprising:

[0032] A testing device for embedded software as described in any of the above embodiments;

[0033] The microcontroller platform is configured to receive the test case data sent by the test device of the embedded software; and drive the embedded controller under test to complete the black box test of the test case data.

[0034] In some embodiments of the present disclosure, the embedded software testing system further includes:

[0035] The embedded controller under test is configured to complete a black box test of the test case data in response to the determination of the microcontroller platform.

[0036] In some embodiments of the present disclosure, the embedded software testing system further includes:

[0037] The simulation software module is configured to receive the test case data sent by the test device of the embedded software; drive the tested software to generate test results in the simulation environment after the calculation is completed.

[0038] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the embedded software testing method as described in any of the above embodiments is implemented.

[0039] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method for testing embedded software as described in any of the above embodiments is implemented.

[0040] The present disclosure improves the testing efficiency of embedded software and can realize the editing and accurate evaluation of complex test cases. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 Schematic diagram of some embodiments of the embedded software testing method disclosed in the present invention.

[0043] Figure 2 A schematic diagram of signal interface mapping in some embodiments of the present disclosure.

[0044] Figure 3 Schematic diagram of some embodiments of the embedded software testing device disclosed in the present invention.

[0045] Figure 4 Schematic diagram of the structure of other embodiments of the testing device for embedded software disclosed in the present invention.

[0046] Figure 5 Schematic diagram of some embodiments of the embedded software testing system disclosed in the present invention.

[0047] Figure 6 Schematic diagrams of other embodiments of the embedded software testing system disclosed in the present invention. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0049] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0050] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0051] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0052] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0053] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0054] The inventors also discovered through research that the related technology is tested manually, which results in low testing efficiency, inability to implement accurate evaluation, inability to cover complex testing scenarios, and difficulty in quickly implementing regression testing.

[0055] The commercial automation testing platform of related technologies is difficult to integrate with the simulation testing environment, there are great difficulties in reusing test projects and the cost of setting up the test environment is high.

[0056] Related technologies The operation instructions transmitted between the host computer and the slave computer are described in natural language, and the amount of data transmitted during the communication process is large, which requires more communication resources. Related technologies require a strict use case writing format.

[0057] The related technology cannot directly input real physical signals at the input end of the controller and implement black box testing.

[0058] In view of at least one of the above technical problems, the present disclosure provides a testing method, device and system, storage medium and program product for embedded software. The present disclosure is described below through specific embodiments.

[0059] Figure 1 The following is a schematic diagram of some embodiments of the embedded software testing method disclosed herein. Preferably, this embodiment can be executed by the embedded software testing device disclosed herein. The embedded software testing method can include at least one of steps 10 to 30.

[0060] In some embodiments of the present disclosure, the testing device of the embedded software of the present disclosure may be implemented as a host computer software A of a certain testing platform.

[0061] Step 10: The embedded software testing device performs test modeling on the embedded software to generate test engineering data, wherein the test engineering data includes test case data of the embedded software.

[0062] In some embodiments of the present disclosure, the test engineering data may also include at least one of test evaluation data, test process data records, historical versions of test data, and test reports.

[0063] In some embodiments of the present disclosure, step 10 may include: test modeling, i.e., writing of test cases and input of test evaluation, may be completed in a certain test platform host software A, and these test data will exist in the form of a complete test project. If one or more rounds of testing have been performed, the test project may also include historical versions of test data and test reports.

[0064] In some embodiments of the present disclosure, the test engineering data should include at least one of test case data, test evaluation, test process data records, historical versions of test data and test reports.

[0065] In some embodiments of the present disclosure, the test modeling process can be completed through a variety of ways, such as natural language description, graphical editing, scripting language, etc., but the final test case data and test process data are in the form of signal curves that change over time to facilitate data transmission between different test platforms. The unit of the time axis should be the minimum operating cycle of the embedded software under test to ensure the accuracy of the signal data.

[0066] In some embodiments of the present disclosure, the embedded software testing method may further include: step 15.

[0067] Step 15: The test device of the embedded software completes the interface mapping.

[0068] In some embodiments of the present disclosure, step 15 may include: completing interface mapping in a host computer software A of a certain test platform.

[0069] In some embodiments of the present disclosure, step 15 may include: manual or automated interface mapping may be performed in a test platform host software A, and the automated interface mapping work is mainly achieved by fuzzy retrieval matching of signal names. Since the interface names under different test environments are different, it is necessary to build multiple signal mapping tables in a test platform host software A.

[0070] In some embodiments of the present disclosure, step 15 may include at least one of steps 151 to 152 .

[0071] Step 151: Establish a first signal mapping table, wherein the first signal mapping table is used to establish a correspondence between the test signal in the test engineering data and the test signal in the simulation test.

[0072] Step 152: Establish a second signal mapping table, wherein the second signal mapping table is used to establish a correspondence between the test signals in the test engineering data and the physical pins in the microcontroller platform.

[0073] In some embodiments of the present disclosure, the microcontroller platform may be a microcontroller platform based on open source hardware and software.

[0074] In some embodiments of the present disclosure, the microcontroller platform may be an Arduino platform.

[0075] Figure 2 FIG. 1 is a schematic diagram of signal interface mapping in some embodiments of the present disclosure. Figure 2 As shown, for example: a controller software input signal - vehicle speed, the signal name in the test project is Vehicle_Speed, and in the simulation test, the signal name is IN_Vehicle_Speed_Int64. Therefore, when performing simulation tests, a first signal mapping table 1 is required to indicate that the two signals with different names are the same signal in order to perform correct data flow transmission. When the software under test is downloaded to the real controller environment and the Arduino platform is required to input the real excitation signal, the analog output PIN foot (physical pin) PIN 2 of the Arduino platform (related to the specific Arduino model) is required to output the real analog signal, so a second signal mapping table 2 is required to map the signal name in A to the physical PIN foot of the Arduino platform.

[0076] The present disclosure can create multiple signal mapping tables in a certain test platform host computer software A to realize signal interaction between different test platforms. The main function of the signal mapping table of the present disclosure is to solve the data flow problem caused by the difference in signal names on different test platforms.

[0077] Step 20: The embedded software testing device calls the simulation software to complete the simulation test on the test case data.

[0078] In some embodiments of the present disclosure, step 20 may include: a certain test platform host computer software A calls a certain simulation software B through a software API to complete the simulation test and save the test data.

[0079] In some embodiments of the present disclosure, step 20 may include at least one of steps 21 to 24 .

[0080] Step 21, sending the test case data to the simulation software module.

[0081] Step 22, receiving the test results generated by the embedded software under test of the simulation software module in the simulation environment after the calculation is completed.

[0082] Step 23, comparing the test result with the second expected result to obtain a second evaluation result.

[0083] Step 24: Generate a second test report according to the second evaluation result.

[0084] In some embodiments of the present disclosure, step 20 may include: if simulation testing is required, a test platform host software A and a simulation software B may be integrated through a software API (Application Programming Interface), and the test case data in A is sent to B. After the embedded software under test in B is calculated in a simulation environment, the output result is returned to A for evaluation. The test platform host software A may automatically compare the result returned by B with the expected result, complete the test evaluation, and output a test report. At the same time, the test platform host software A may save the test data of the simulation test phase for regression testing.

[0085] Step 30: the embedded software testing device sends the test case data to the microcontroller platform, and drives the embedded controller through the microcontroller platform to complete the black box test of the test case data.

[0086] In some embodiments of the present disclosure, the embedded controller is an embedded controller under test.

[0087] In some embodiments of the present disclosure, the embedded controller under test includes embedded software under test that is compiled and downloaded to the embedded controller under test.

[0088] In some embodiments of the present disclosure, step 30 may include: integrating a certain test platform host computer software A with an Arduino platform to drive a certain embedded controller C under test to complete a black box test.

[0089] In some embodiments of the present disclosure, step 30 may include at least one of steps 31 to 34 .

[0090] Step 31, the embedded software testing device sends the test case data to the microcontroller platform so that the microcontroller platform converts the test case data into an excitation signal, outputs it to the embedded controller through a first physical pin, and receives the output signal data of the embedded controller through a second physical pin.

[0091] In some embodiments of the present disclosure, step 31 may include at least one step from step 311 to step 314 .

[0092] Step 311: the embedded software testing device transmits the test case data to the microcontroller platform.

[0093] In some embodiments of the present disclosure, step 311 may include: a certain test platform host computer software A interacts with the Arduino platform through serial port communication, and transmits the test case data information to the Arduino platform.

[0094] In some embodiments of the present disclosure, step 311 may include: a test platform host software A is connected to Arduino using a serial port and shares a set of serial port communication protocols. The test platform host software A maps the signal port in the test case to the specific hardware PIN pin of Arduino through the second signal mapping table 2, and transmits the PIN pin information and the test case signal waveform to the Arduino platform through serial port communication.

[0095] Step 312: the microcontroller platform drives the first physical pin to convert the test case data into an excitation signal output by the first physical pin.

[0096] In some embodiments of the present disclosure, step 312 may include: the Arduino platform drives the corresponding PIN pin to convert the test case data into an excitation signal output by the PIN pin.

[0097] In some embodiments of the present disclosure, the Arduino platform includes a driver and communication protocol for communicating with a test platform host computer software A, as well as a driver for its own hardware resources, such as: driving of output PIN pin analog signals and digital signals, and data scanning of input PIN pin analog signals and digital signals.

[0098] In some embodiments of the present disclosure, step 312 may include: after the Arduino platform receives data from a certain test platform host computer software A, the driver converts the test case data into an analog signal or digital signal output corresponding to the PIN pin.

[0099] Step 313: the embedded controller under test receives the excitation signal and generates a corresponding output signal after logic calculation.

[0100] In some embodiments of the present disclosure, step 313 may include: a C input channel of a certain embedded controller under test is connected to the Arduino platform via a hard line, receives an excitation signal from the Arduino, and generates a corresponding output signal after internal software logic calculation.

[0101] In some embodiments of the present disclosure, step 313 may include: the embedded software under test is compiled and downloaded to a certain embedded controller under test C; the input channel of the certain embedded controller under test C is connected to the Arduino platform through a hard line; the signal output by the PIN pin of the Arduino platform is transmitted to the certain embedded controller under test C through a hard line to complete the input of the excitation signal; after the certain embedded controller under test C receives the excitation signal, it generates a corresponding output signal after internal software logic calculation.

[0102] Step 314: The second physical pin of the microcontroller platform collects output signal data of the embedded controller under test.

[0103] In some embodiments of the present disclosure, the second physical pin may be a signal collection PIN pin.

[0104] In some embodiments of the present disclosure, step 314 may include: an output channel C of a certain embedded controller under test is connected to a signal acquisition PIN pin of an Arduino platform via a hard line, and the signal acquisition PIN pin of the Arduino platform acquires and records the output signal of C in real time.

[0105] In some embodiments of the present disclosure, step 314 may include: an output channel of a certain embedded controller C under test is connected to a signal acquisition PIN pin of an Arduino platform through a hard wire, and an output signal of the certain embedded controller C under test after logic calculation is collected and recorded in real time by the signal acquisition PIN pin of the Arduino platform.

[0106] Step 32: the embedded software testing device reads the output signal data from the microcontroller platform.

[0107] Step 33: The embedded software testing device compares the output signal data with the first expected result to obtain a first evaluation result.

[0108] In some embodiments of the present disclosure, step 32 and step 33 may include: a test platform host computer software A reads the output signal data of C from the Arduino platform through serial port communication, and compares it with the expected result to complete the automated evaluation.

[0109] In some embodiments of the present disclosure, step 32 and step 33 may include: the data collected in real time by the signal acquisition PIN pin of the Arduino platform is transmitted back in real time to a certain test platform host computer software A through serial port communication; the certain test platform host computer software A converts the hardware PIN pin information of the Arduino into a signal name in A through the second signal mapping table 2, and compares it with the preset expected result signal curve to determine whether the actual output signal of C is within the allowable error range of the expected result, thereby completing the automated evaluation process.

[0110] Step 34: The embedded software testing device generates a first test report according to the first evaluation result.

[0111] In some embodiments of the present disclosure, step 34 may include: a certain test platform host computer software A automatically generates a test report from the evaluation results.

[0112] In some embodiments of the present disclosure, step 34 may include: after a test platform host computer software A completes the automated evaluation, the evaluation results can be automatically generated into a test report, and all test data can be saved to facilitate regression testing; when the version of the embedded software under test is iterated, regression testing is required, and it is only necessary to re-run the test project in the test platform host computer software A once.

[0113] The present disclosure relates to the technical field of embedded software with high reliability requirements, and in particular to a method for building an automated testing platform for an embedded controller.

[0114] The present invention discloses a method for building an embedded software testing platform based on the Arduino platform.

[0115] The above-mentioned embodiments of the present disclosure improve the testing efficiency of embedded software and can realize the editing and accurate evaluation of complex test cases.

[0116] The test platform host computer software A of the above embodiment of the present disclosure can be integrated with the simulation test environment, and the test platform host computer software A can also be integrated with the embedded controller under test.

[0117] The above-mentioned embodiment of the present disclosure uses a certain test platform host computer software A as a unified test management tool, reuses the same test project in different test stages, and reduces the cost of repeated construction of the test project.

[0118] The historical test data of the above-mentioned embodiments of the present disclosure are all saved in the form of test projects, which improves the efficiency of regression testing and can quickly implement regression testing.

[0119] The above-mentioned embodiments of the present disclosure belong to an automated testing process, which abandons manual testing methods, can cope with more complex testing scenarios, and can realize the editing and accurate evaluation of complex test cases.

[0120] The above-mentioned embodiments of the present disclosure use the open source Arduino platform, have a low test environment construction cost, can be flexibly applied to various types of tested embedded controllers, and have strong versatility.

[0121] The above-mentioned embodiments of the present disclosure can directly input a real physical signal into the input terminal of the embedded controller under test to implement black box testing.

[0122] Figure 3 Schematic diagram of some embodiments of the embedded software testing device disclosed in the present invention. Figure 3 As shown, the test device of the embedded software disclosed in the present invention may include a test data generation module 31 , a simulation test module 32 and a black box test module 33 .

[0123] The test data generation module 31 is configured to perform test modeling on the embedded software and generate test engineering data, wherein the test engineering data includes test case data of the embedded software.

[0124] In some embodiments of the present disclosure, the test engineering data may also include at least one of test evaluation data, test process data records, historical versions of test data, and test reports.

[0125] In some embodiments of the present disclosure, the testing device of the embedded software of the present disclosure can also be configured to establish a first signal mapping table, wherein the first signal mapping table is used to establish the correspondence between the test signals in the test engineering data and the test signals in the simulation test; and establish a second signal mapping table, wherein the second signal mapping table is used to establish the correspondence between the test signals in the test engineering data and the physical pins in the microcontroller platform.

[0126] The simulation test module 32 is configured to call simulation software to complete simulation testing of the test case data.

[0127] In some embodiments of the present disclosure, the simulation test module 32 may be configured to send the test case data to the simulation software module; and receive the test results generated by the embedded software under test in the simulation environment after the calculation is completed.

[0128] In some embodiments of the present disclosure, the simulation test module 32 may also be configured to compare the test result of the simulation test with the second expected result to generate a second test report.

[0129] The black box test module 33 is configured to send the test case data to the microcontroller platform, and drive the embedded controller through the microcontroller platform to complete the black box test of the test case data.

[0130] In some embodiments of the present disclosure, the embedded controller under test includes embedded software under test that is compiled and downloaded to the embedded controller under test.

[0131] In some embodiments of the present disclosure, the black box testing module 33 can be configured as follows:

[0132] The test case data is sent to the microcontroller platform so that the microcontroller platform converts the test case data into an excitation signal, outputs it to the embedded controller through a first physical pin, and receives the output signal data of the embedded controller through a second physical pin; and reads the output signal data from the microcontroller platform.

[0133] In some embodiments of the present disclosure, in some embodiments of the present disclosure, the black box test module 33 may also be configured to compare the output signal data with the first expected result to generate a first test report.

[0134] In some embodiments of the present disclosure, the embedded software testing device can be used to perform any of the above embodiments (for example Figure 1 ) is a testing method for embedded software described in .

[0135] Figure 4 FIG. 1 is a schematic diagram of the structure of other embodiments of the embedded software testing device disclosed in the present invention. Figure 4 As shown, the embedded software testing device includes a memory 41 and a processor 42 .

[0136] The memory 41 is used to store instructions. The processor 42 is coupled to the memory 41. The processor 42 is configured to execute and implement any of the above embodiments (for example, Figure 1 Embodiment) is a method for testing embedded software.

[0137] like Figure 4 As shown, the embedded software test device also includes a communication interface 43 for information exchange with other devices. At the same time, the embedded software test device also includes a bus 44, through which the processor 42, the communication interface 43, and the memory 41 communicate with each other.

[0138] The memory 41 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The memory 41 may also be a memory array. The memory 41 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.

[0139] In addition, the processor 42 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.

[0140] Figure 5 Schematic diagram of some embodiments of the embedded software testing system disclosed in the present invention. Figure 5 As shown, the embedded software testing device disclosed herein may include an embedded software testing device 51 and a microcontroller platform 52 .

[0141] The embedded software testing device 51 is configured to perform test modeling on the embedded software and generate test engineering data, wherein the test engineering data includes test case data of the embedded software; call simulation software to complete simulation testing of the test case data; send the test case data to a microcontroller platform, and drive the embedded controller through the microcontroller platform to complete black box testing of the test case data.

[0142] In some embodiments of the present disclosure, the embedded software testing device 51 may be any of the above embodiments (eg Figure 3 or Figure 4 A testing device for embedded software as described in embodiment).

[0143] The microcontroller platform 52 may be configured to receive the test case data sent by the test device of the embedded software; and drive the embedded controller under test to complete the black box test of the test case data.

[0144] Figure 6 Schematic diagrams of other embodiments of the embedded software testing system disclosed in the present invention. Figure 5 Compared with the embodiment, Figure 5 The embedded software testing device of the embodiment may include not only the embedded software testing device 51 and the microcontroller platform 52 , but also at least one of a tested embedded controller 53 and a simulation software module 54 .

[0145] In some embodiments of the present disclosure, Figure 5 and Figure 6 The embedded software testing device 51 of the embodiment can be implemented as a test platform host computer software A located at the PC end.

[0146] In some embodiments of the present disclosure, Figure 6 As shown, the embedded software testing device 51 can test engineering data, signal interface mapping, a first software API (application programming interface), a preset serial port communication protocol, and the like.

[0147] In some embodiments of the present disclosure, the signal interface mapping is as follows: Figure 2 As shown, multiple signal mapping tables can be created in the host software A of a certain test platform to realize signal interaction between different test platforms. The main function of the signal mapping table is to solve the data flow problem caused by differences in signal names on different test platforms. For example, a controller software input signal - vehicle speed, the signal name in the test project is Vehicle_Speed, and in the simulation test, the signal name is IN_Vehicle_Speed_Int64. Therefore, when we perform simulation tests, we need a first signal mapping table 1 to indicate that the two signals with different names are the same signal, so as to perform correct data flow transmission. When the software under test is downloaded to the real controller environment and needs to use Arduino to input the real excitation signal, it is necessary to use the analog output PIN 2 of Arduino (related to the specific Arduino model) to output the real analog signal, so a second signal mapping table 2 is needed to map the signal name in A to the physical PIN of Arduino.

[0148] In some embodiments of the present disclosure, the software API is mainly used for scheduling and data transfer between software. Through the software API, a test platform host software A can call up a simulation software B, send test case data to a simulation software B, and recover the output signal of a simulation software B.

[0149] In some embodiments of the present disclosure, the preset serial port protocol is mainly used for communication with the Arduino platform, and should include a serial port protocol (TX, sending) sent from a test platform host software A to Arduino and a serial port protocol (RX, receiving) sent from the Arduino platform to a test platform host software A. The protocol should include a special data start bit mark, such as "-". The TX protocol should clearly define the correspondence between the data bit in the sent serial port data and the analog and digital output PIN pins (first physical pins) in the Arduino. The data information of the data bit is the state of the control Arduino PIN pin. For example, the first bit of the serial port data is the state of the Arduino digital output PIN pin PIN 0. When the first bit of the serial port data is 0, the Arduino PIN 0 is set to a high level, otherwise it is set to a low level. The RX protocol should clearly define the correspondence between the data in the received serial port data and the analog and digital acquisition PIN pins (second physical pins) in the Arduino. The data information of the data bit is the state of the collected Arduino PIN pin.

[0150] In some embodiments of the present disclosure, Figure 5 and Figure 6 The microcontroller platform 52 of the embodiment may be implemented as an Arduino platform located at the hardware real-time environment end.

[0151] In some embodiments of the present disclosure, the communication between the host software A of a test platform of the present disclosure and the Arduino platform is Figure 6 In addition to the serial communication shown, other communication methods such as Ethernet can also be used instead.

[0152] In some embodiments of the present disclosure, the Arduino platform may include a serial port protocol, an output PIN pin (a first physical pin), and an input PIN pin (a second physical pin).

[0153] In some embodiments of the present disclosure, the output PIN pin is mainly used to generate a corresponding excitation signal according to the information sent by the serial port data.

[0154] In some embodiments of the present disclosure, the input PIN pin is mainly used to collect the output interface status of the embedded controller C under test.

[0155] The embedded controller under test 53 is configured to complete the black box test of the test case data in response to the determination of the microcontroller platform.

[0156] In some embodiments of the present disclosure, the embedded controller under test 53 may be implemented as a certain embedded controller under test C located at the hardware real-time environment end.

[0157] In some embodiments of the present disclosure, the embedded software under test has been compiled and downloaded to the embedded controller C.

[0158] The simulation software module 54 is configured to receive the test case data sent by the test device of the embedded software; and drive the tested software to generate test results in a simulation environment after calculation is completed.

[0159] In some embodiments of the present disclosure, the simulation software module 54 may be implemented as a simulation software B located on a PC.

[0160] In some embodiments of the present disclosure, the simulation software module 54 may include an embedded software simulation environment, a second software API, and the like.

[0161] In some embodiments of the present disclosure, the embedded software simulation environment should include a hardware environment simulation function to ensure that the embedded software can run in the simulation environment of the PC to verify the software function.

[0162] In some embodiments of the present disclosure, the second software API should be able to be integrated with other software to ensure that a certain simulation software B can be called up normally. At the same time, a certain simulation software B should be able to realize data interaction through the software API to receive test case data sent by the test platform host software A, and at the same time, transmit the output data of the embedded software back to the test platform host software A to complete the test evaluation.

[0163] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above embodiments (for example Figure 1 Embodiment) is a method for testing embedded software.

[0164] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, any of the above embodiments (for example Figure 1 Embodiment) is a method for testing embedded software.

[0165] In some embodiments of the present disclosure, the computer-readable storage medium may be a non-transitory computer-readable storage medium.

[0166] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0167] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0168] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0170] The embedded software test device, test data generation module, simulation test module and black box test module described above can be implemented as a general processor, programmable logic controller ( ), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic devices, discrete hardware components, or any appropriate combination thereof.

[0171] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0172] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing the relevant hardware through a program, and the program may be stored in a non-transitory computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0173] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A method for testing embedded software, comprising: Performing test modeling on the embedded software to generate test engineering data, wherein the test engineering data includes test case data of the embedded software; Calling simulation software to complete simulation testing of the test case data; The test case data is sent to a microcontroller platform, and the microcontroller platform drives an embedded controller to complete a black box test of the test case data.

2. The method for testing embedded software according to claim 1, further comprising: Establishing a first signal mapping table, wherein the first signal mapping table is used to establish a correspondence between the test signal in the test engineering data and the test signal in the simulation test; A second signal mapping table is established, wherein the second signal mapping table is used to establish a correspondence between the test signals in the test engineering data and the physical pins in the microcontroller platform.

3. The method for testing embedded software according to claim 1 or 2, wherein: The sending of the test case data to the microcontroller platform and driving the embedded controller through the microcontroller platform to complete the black box test of the test case data comprises: Sending the test case data to the microcontroller platform so that the microcontroller platform converts the test case data into an excitation signal, outputs it to the embedded controller through a first physical pin, and receives output signal data of the embedded controller through a second physical pin; The output signal data is read from the microcontroller platform.

4. The method for testing embedded software according to claim 3, further comprising: The output signal data is compared with the first expected result to generate a first test report.

5. The method for testing embedded software according to claim 1 or 2, further comprising: The test result of the simulation test is compared with the second expected result to generate a second test report.

6. The method for testing embedded software according to claim 1 or 2, wherein: The tested embedded controller includes the tested embedded software which is compiled and downloaded to the tested embedded controller.

7. The embedded software testing method according to claim 1 or 2, wherein: The test engineering data also includes at least one of test evaluation data, test process data records, historical version test data and test reports.

8. A testing device for embedded software, comprising: A test data generation module is configured to perform test modeling on the embedded software and generate test engineering data, wherein the test engineering data includes test case data of the embedded software; A simulation test module is configured to call simulation software to complete simulation testing of the test case data; The black box test module is configured to send the test case data to the microcontroller platform, and drive the embedded controller through the microcontroller platform to complete the black box test of the test case data.

9. A testing device for embedded software, comprising: a memory configured to store instructions; The processor is configured to execute the instructions so that the embedded software testing device performs the embedded software testing method as described in any one of claims 1-7.

10. A testing system for embedded software, comprising: The embedded software testing device as claimed in claim 8 or 9; The microcontroller platform is configured to receive the test case data sent by the test device of the embedded software; and drive the embedded controller under test to complete the black box test of the test case data.

11. The embedded software testing system according to claim 10, further comprising: The embedded controller under test is configured to complete a black box test of the test case data in response to the determination of the microcontroller platform.

12. The embedded software testing system according to claim 10 or 11, further comprising: The simulation software module is configured to receive the test case data sent by the test device of the embedded software, and drive the tested software to generate test results in a simulation environment after calculation is completed.

13. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the embedded software testing method according to any one of claims 1 to 7 is implemented.

14. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the embedded software testing method according to any one of claims 1 to 7 is implemented.