CN111026080A - Hardware-in-loop test method and device for controller - Google Patents
Hardware-in-loop test method and device for controller Download PDFInfo
- Publication number
- CN111026080A CN111026080A CN201911243553.9A CN201911243553A CN111026080A CN 111026080 A CN111026080 A CN 111026080A CN 201911243553 A CN201911243553 A CN 201911243553A CN 111026080 A CN111026080 A CN 111026080A
- Authority
- CN
- China
- Prior art keywords
- test
- test case
- sending
- case set
- management platform
- 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
Links
- 238000010998 test method Methods 0.000 title claims abstract description 19
- 238000012360 testing method Methods 0.000 claims abstract description 664
- 238000004458 analytical method Methods 0.000 claims abstract description 100
- 238000013523 data management Methods 0.000 claims abstract description 69
- 238000000034 method Methods 0.000 claims abstract description 42
- 230000005540 biological transmission Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 abstract description 8
- 238000004590 computer program Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0218—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
- G05B23/0221—Preprocessing measurements, e.g. data collection rate adjustment; Standardization of measurements; Time series or signal analysis, e.g. frequency analysis or wavelets; Trustworthiness of measurements; Indexes therefor; Measurements using easily measured parameters to estimate parameters difficult to measure; Virtual sensor creation; De-noising; Sensor fusion; Unconventional preprocessing inherently present in specific fault detection methods like PCA-based methods
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a hardware-in-the-loop test method and device of a controller, relates to the technical field of automobile testing, and aims to improve the efficiency and accuracy of inputting a test case set, a test result and an analysis result corresponding to an ECU to be tested into a data management platform. The method of the invention comprises the following steps: calling a test case set corresponding to a test instruction, and sending the test case set to a test cabinet, wherein the test case set comprises a plurality of test items; acquiring a test result set, and outputting the test result set, wherein the test result set comprises a test result corresponding to each test item; and receiving an analysis result set, and sending the test case set, the test result set and the analysis result set to a data management platform. The method is suitable for the process of inputting the test case set, the test result and the analysis result corresponding to the tested ECU into the data management platform.
Description
Technical Field
The invention relates to the technical field of automobile testing, in particular to a hardware-in-loop testing method and device of a controller.
Background
In recent years, with the continuous development of automobile technology, the requirements for safety and comfort of automobiles are higher and higher, and in order to meet the requirements of users, the number of Electronic Control Units (ECUs) on automobiles is increased. In order to ensure that the performance of the ECU reaches the standard, the ECU needs to be subjected to various tests, such as Hardware-in-Loop (HIL), Software-in-Loop (SIL), Model-in-Loop (MIL), and the like. Wherein, the hardware-in-loop test specifically means: and testing hardware, bottom layer software and application layer software of the tested ECU on the basis of the test case set by controlling the test cabinet through the upper computer.
At present, after the hardware-in-loop test of the tested ECU is completed, the test cabinet feeds back the test result corresponding to each test item in the test case set to the upper computer and outputs the test result through the upper computer. When a worker determines that the tested ECU does not pass a test item according to a test result corresponding to the test item, the worker needs to analyze the reason why the tested ECU does not pass the test item based on the test result corresponding to the test item, write an analysis result, and input the test case set, the test result and the analysis result into the data management platform for storage and backup.
Because a great deal of time is consumed for the staff to manually input the test case set, the test result and the analysis result into the data management platform, and an input error condition exists in the input process, the efficiency and the accuracy of inputting the test case set, the test result and the analysis result corresponding to the tested ECU into the data management platform are low at present.
Disclosure of Invention
In view of this, the present invention provides a hardware-in-the-loop testing method and apparatus for a controller, and mainly aims to improve efficiency and accuracy of inputting a test case set, a test result, and an analysis result corresponding to an ECU to be tested into a data management platform.
In order to achieve the above purpose, the present invention mainly provides the following technical solutions:
in a first aspect, the present invention provides a hardware-in-loop test method for a controller, the method including:
calling a test case set corresponding to a test instruction, and sending the test case set to a test cabinet, wherein the test case set comprises a plurality of test items;
acquiring a test result set, and outputting the test result set, wherein the test result set comprises a test result corresponding to each test item;
and receiving an analysis result set, and sending the test case set, the test result set and the analysis result set to a data management platform.
Optionally, after the test case set corresponding to the test instruction is called, the method further includes:
analyzing the test case suite through a preset component to obtain data content contained in each test item;
the sending the test case suite to a test cabinet comprises:
and sending the data content contained in each test item to the test cabinet.
Optionally, the obtaining the test result set includes:
obtaining a plurality of test results through a preset code, and determining a test identifier corresponding to each test result through the preset code, wherein the test identifier is used for identifying whether a corresponding test item passes through;
the outputting the test result set includes:
and outputting a test result set comprising a plurality of test results and test identifications corresponding to the test results.
Optionally, the analysis result set includes an analysis result corresponding to at least one failed test item; the sending the test case set, the test result set and the analysis result set to a data management platform includes:
adding a plurality of test results and test identifications corresponding to each test result to corresponding positions in the test case set;
adding at least one analysis result to a corresponding position in the test case set;
and sending the test case set to the data management platform.
Optionally, before the sending the test case suite to the data management platform, the method further includes:
generating a unique identifier corresponding to the test case set, and outputting the unique identifier;
the sending the test case suite to the data management platform includes:
and sending the test case set and the unique identifier to the data management platform.
Optionally, the method further includes:
and sending the log to a target terminal according to a preset period.
Optionally, before the calling the test case set corresponding to the test instruction, the method further includes:
and compiling the test case set based on a preset test case template.
In a second aspect, the present invention further provides a hardware-in-loop test apparatus for a controller, the apparatus including:
the test device comprises a calling unit, a test unit and a control unit, wherein the calling unit is used for calling a test case set corresponding to a test instruction, and the test case set comprises a plurality of test items;
the first sending unit is used for sending the test case set to a test cabinet;
the acquisition unit is used for acquiring a test result set, and the test result set comprises a test result corresponding to each test item;
the output unit is used for outputting the test result set;
a receiving unit for receiving an analysis result set;
and the second sending unit is used for sending the test case set, the test result set and the analysis result set to a data management platform.
Optionally, the apparatus further comprises:
the analysis unit is used for analyzing the test case set through a preset component after the calling unit calls the test case set corresponding to the test instruction so as to obtain data content contained in each test item;
the first sending unit is specifically configured to send the data content included in each test item to the test cabinet.
Optionally, the obtaining unit includes:
the acquisition module is used for acquiring a plurality of test results through preset codes;
the determining module is used for determining a test identifier corresponding to each test result through the preset code, wherein the test identifier is used for identifying whether a corresponding test item passes through;
the output unit is specifically configured to output a test result set including a plurality of test results and a test identifier corresponding to each test result.
Optionally, the analysis result set includes an analysis result corresponding to at least one failed test item; the second transmission unit includes:
the first adding module is used for adding the plurality of test results and the test identification corresponding to each test result to the corresponding position in the test case set;
the second adding module is used for adding at least one analysis result to a corresponding position in the test case set;
and the sending module is used for sending the test case set to the data management platform.
Optionally, the second sending unit further includes:
the generating module is used for generating a unique identifier corresponding to the test case set before the sending module sends the test case set to the data management platform;
the output module is used for outputting the unique identifier;
the sending module is specifically configured to send the test case suite and the unique identifier to the data management platform.
Optionally, the apparatus further comprises:
and the third sending unit is used for sending the log to the target terminal according to a preset period.
Optionally, the apparatus further comprises:
and the compiling unit is used for compiling the test case set based on a preset test case template before the calling unit calls the test case set corresponding to the test instruction.
In a third aspect, an embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device on which the storage medium is located is controlled to execute the hardware-in-loop test method of the controller according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a hardware-in-loop test apparatus for a controller, the apparatus including a storage medium; and one or more processors, the storage medium coupled with the processors, the processors configured to execute program instructions stored in the storage medium; the program instructions when executed perform the hardware-in-the-loop test method of the controller of the first aspect.
By the technical scheme, the technical scheme provided by the invention at least has the following advantages:
the invention provides a hardware-in-loop test method and a device of a controller, compared with the prior art that a worker manually inputs a test case set, a test result and an analysis result corresponding to an ECU to be tested into a data management platform, the hardware-in-loop test method and the device can call the test case set corresponding to the test instruction after a client application program running in an upper computer receives the test instruction input by the worker, and send the called test case set to a test cabinet, so that the test cabinet performs hardware-in-loop test on the ECU to be tested based on the test case set; after the test cabinet completes the hardware-in-loop test of the tested ECU, the client application program acquires a test result set containing the test result corresponding to each test item and outputs the test result set; after receiving the analysis result set input by the worker, the client application program can send the test case set, the test result set and the analysis result set to the data management platform for storage and backup, so that the worker is not required to manually input the test case set, the test result set and the analysis result set into the data management platform, and the efficiency and the accuracy of inputting the test case set, the test result set and the analysis result set corresponding to the tested ECU into the data management platform are improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a hardware-in-the-loop testing method for a controller according to an embodiment of the present invention;
FIG. 2 is a flow chart of a hardware-in-the-loop testing method for a controller according to another embodiment of the present invention;
FIG. 3 is a block diagram illustrating a hardware-in-the-loop testing apparatus for a controller according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating another hardware-in-the-loop testing apparatus for a controller according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
An embodiment of the present invention provides a hardware-in-loop testing method for a controller, as shown in fig. 1, the method includes:
101. and calling a test case set corresponding to the test instruction, and sending the test case set to the test cabinet.
The test case set comprises a plurality of test items.
In the embodiment of the invention, the execution subject in each step is a client application program running in the upper computer. After receiving the test instruction input by the staff, the client application program calls the test case set corresponding to the test instruction and sends the called test case set to the test cabinet, so that the test cabinet performs hardware-in-loop test on the tested ECU based on the test case set.
Specifically, in this step, the test case set may be stored in the database or may be stored in the local storage space of the upper computer, so that the client application program may call the test case set corresponding to the test instruction from the database or call the test case set corresponding to the test instruction from the local storage space of the upper computer.
It should be noted that, when the test cabinet performs the hardware-in-the-loop test on the tested ECU based on the test case set, the test cabinet may adopt the existing test method for testing, which is not described in detail herein.
102. And acquiring a test result set, and outputting the test result set.
Wherein, the test result set comprises the test result corresponding to each test item.
In the embodiment of the present invention, after the client application program sends the called test case set to the test cabinet, the test cabinet performs a hardware-in-loop test on the ECU to be tested based on the test case set, and after the test cabinet completes the hardware-in-loop test on the ECU to be tested, the client application program can obtain a test result set including a test result corresponding to each test item and output the obtained test result set, so that when a worker determines that the ECU to be tested does not pass a certain test item (or certain test items) among a plurality of test items, the worker analyzes the reason that the ECU to be tested does not pass the certain test item (or the certain test items) based on the test result corresponding to the test item (or the certain test items), and inputs the analysis result into the client application program.
103. And receiving the analysis result set, and sending the test case set, the test result set and the analysis result set to the data management platform.
Wherein, the analysis result set comprises at least one analysis result corresponding to the failed test item.
In the embodiment of the present invention, after the client application outputs the test result set including the test result corresponding to each test item, the worker may determine whether the tested ECU passes through the plurality of test items, and when the worker determines that the tested ECU does not pass through one (or some) of the plurality of test items, the worker needs to analyze the reason that the tested ECU does not pass through the one (or some) of the test items based on the test result corresponding to the one (or some) of the test items, and input the analysis result into the client application, at this time, the client application receives the analysis result set including the analysis result corresponding to at least one failed test item.
After receiving the analysis result set input by the staff, the client application program sends the test case set used for hardware-in-the-loop test, the obtained test result set and the analysis result set input by the staff to the data management platform for storage and backup, so that the staff is not required to manually input the test case set, the test result set and the analysis result set into the data management platform, and the efficiency and accuracy of inputting the test case set, the test result set and the analysis result set into the data management platform are improved.
Compared with the prior art that a worker manually inputs a test case set, a test result and an analysis result corresponding to an ECU to be tested into a data management platform, the hardware-in-loop test method for the controller can call the test case set corresponding to the test instruction after a client application program running in an upper computer receives the test instruction input by the worker, and sends the called test case set to a test cabinet, so that the test cabinet performs hardware-in-loop test on the ECU to be tested based on the test case set; after the test cabinet completes the hardware-in-loop test of the tested ECU, the client application program acquires a test result set containing the test result corresponding to each test item and outputs the test result set; after receiving the analysis result set input by the worker, the client application program can send the test case set, the test result set and the analysis result set to the data management platform for storage and backup, so that the worker is not required to manually input the test case set, the test result set and the analysis result set into the data management platform, and the efficiency and the accuracy of inputting the test case set, the test result set and the analysis result set corresponding to the tested ECU into the data management platform are improved.
To explain in more detail below, an embodiment of the present invention provides another hardware-in-loop testing method for a controller, specifically as shown in fig. 2, where the method includes:
201. and calling a test case set corresponding to the test instruction.
For the test case set corresponding to the step 201 and the call test instruction, reference may be made to the description of the corresponding part in fig. 1, and details of the embodiment of the present invention will not be described here.
202. And analyzing the test case set through a preset component to obtain the data content contained in each test item.
In the embodiment of the present invention, after the client application program calls the test case set corresponding to the test instruction, the called test case set needs to be analyzed by the preset component to obtain the data content included in each test item in the test case set, where the preset component may specifically be a functional component written in python language.
Further, in the embodiment of the present invention, in order to enable the client application program to effectively analyze and process the called test case suite through the preset component, the client application program needs to write each test case suite in advance based on a preset test case template, so as to ensure that all the test case suites stored in the database and all the test case suites stored in the local storage space of the upper computer have a uniform format, where the preset test case template may specifically be a template in an Excel format.
203. And sending the data content contained in each test item to the test cabinet.
In the embodiment of the invention, after the client application program analyzes and obtains the data content contained in each test item in the test case set, the data content contained in each test item obtained by analysis is sent to the test cabinet, so that the test cabinet performs the hardware-in-loop test on the tested ECU based on the data content contained in each test item.
It should be noted that, when the test cabinet performs the hardware-in-the-loop test on the ECU to be tested based on the data content included in each test item, the test cabinet may adopt the existing test method to perform the test, which is not described in detail in the embodiment of the present invention.
204. And obtaining a plurality of test results through a preset code, determining a test identifier corresponding to each test result through the preset code, and outputting a test result set comprising the plurality of test results and the test identifier corresponding to each test result.
The test identification is used for identifying whether the corresponding test item passes or not.
Compared with the prior art: after the test cabinet completes the hardware-in-loop test of the tested ECU, the test cabinet feeds back the test result corresponding to each test item in the test case set to the upper computer for outputting differently; in the embodiment of the invention, the client application program can obtain the test result corresponding to each test item in the test case set from the test cabinet through the preset code, and determine the test identifier corresponding to each test result through the preset code to obtain the test result set comprising the test result corresponding to each test item and the test identifier corresponding to each test result, so that after the client application program outputs the test result set comprising a plurality of test results and the test identifier corresponding to each test result, a worker does not need to determine whether the tested ECU passes through a plurality of test items according to the test result corresponding to each test item, and can directly determine whether the tested ECU passes through a plurality of test items only according to the test identifier corresponding to each test item.
205. An analysis result set is received.
In the embodiment of the invention, after the client application program outputs the test result set containing the test result corresponding to each test item and the test identifier corresponding to each test result, the staff can determine whether the tested ECU passes a plurality of test items according to the test identification corresponding to each test item, when the staff determines that the tested ECU does not pass a certain test item (or a plurality of test items) according to the test identification corresponding to the certain test item (or the plurality of test items), the staff member needs to analyze the reason why the tested ECU fails to pass the test item (or the test items) based on the test result corresponding to the test item (or the test items), and inputting the analysis result into the client application program, wherein the client application program receives an analysis result set containing the analysis result corresponding to at least one failed test item.
206. And sending the test case set, the test result set and the analysis result set to a data management platform.
In the embodiment of the invention, after receiving the analysis result set input by the staff, the client application program sends the test case set used for the hardware-in-the-loop test, the obtained test result set and the analysis result set input by the staff to the data management platform for storage and backup. The following describes in detail how the client application sends the test case set, the test result set, and the analysis result set to the data management platform.
(1) And adding the plurality of test results and the test identification corresponding to each test result to the corresponding position in the test case set.
In the embodiment of the present invention, the client application program needs to add the test result corresponding to each test item and the test identifier corresponding to each test result included in the test result set to the corresponding position in the test case set, that is, add the test result and the test identifier corresponding to each test item at the corresponding position of each test item in the test case set, for example, the test case set is a file in an Excel format, each test item in the test case set occupies one data line, and the client application program can add the test result and the test identifier corresponding to each test item to a blank cell of the data line in which each test item is located.
(2) And adding at least one analysis result to a corresponding position in the test case set.
In the embodiment of the present invention, the client application program further needs to add the analysis result corresponding to at least one failed test item included in the analysis result set to a corresponding position in the test case set, that is, add the analysis result corresponding to each failed test item at a corresponding position of each failed test item in the test case set, for example, the test case set is a file in an Excel format, each test item in the test case set occupies one data line, and the client application program may add the analysis result corresponding to each failed test item to a blank cell of the data line in which each failed test item is located.
(3) And sending the test case set to a data management platform.
In the embodiment of the invention, after the client application program adds the test result corresponding to each test item and the test identifier corresponding to each test result contained in the test result set and the analysis result corresponding to at least one failed test item contained in the analysis result set to the corresponding position in the test case set, the test case set containing a plurality of test items, the test result and the test identifier corresponding to each test item and the analysis result corresponding to the failed test item can be sent to the data management platform for storage and backup, so that a worker does not need to manually record the test case set, the test result set and the analysis result set into the data management platform, and the efficiency and the accuracy of recording the test case set, the test result set and the analysis result set into the data management platform are improved.
Further, in the embodiment of the present invention, before the client application program sends the test case set including the plurality of test items, the test result and the test identifier corresponding to each test item, and the analysis result corresponding to the failed test item to the data management platform, a unique identifier corresponding to the test case set may be generated, and the unique identifier corresponding to the test case set is output, so that the staff and other staff obtain the unique identifier corresponding to the test case set. After the unique identification corresponding to the test case set is output by the client application program, the unique identification corresponding to the test case set and the test case set can be sent to the data management platform together, so that other workers can use the unique identification corresponding to the test case set to query the data management platform to obtain the test case, and hardware, bottom layer software or application layer software of the tested ECU is perfected and optimized based on data content contained in the test case set, so that the problems of the tested ECU are solved.
It should be noted that, in the actual application process, after the client application program generates the corresponding unique identifier for the test case set and outputs the unique identifier corresponding to the test case set, when the worker needs to use the test case set again to perform the hardware-in-loop test on the tested ECU, the worker may input a test instruction carrying the unique identifier corresponding to the test case set to the client application program, and after the client application program receives the test instruction, the client application program performs the hardware-in-loop test on the tested ECU according to the method described in the above step 201 and 206, and sends the test case set, the obtained test result set, and the analysis result set input by the worker to the data management platform for storage and backup.
Further, in the embodiment of the present invention, the client application program may further send the log to the target terminal according to a preset period, so that a user of the target terminal knows that the client application program inputs the test case set and the test result set and the analysis result set corresponding to the test case set to the data management platform, and checks the test result set and the analysis result set to ensure normal operation of the client application program, where the log records the log entry condition that the client application program enters the test case set and the test result set and the analysis result set corresponding to the test case set to the data management platform, and the preset period may be, but is not limited to: 1 day, 3 days, 5 days, 1 week, etc.
In order to achieve the above object, according to another aspect of the present invention, an embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, where the apparatus on which the storage medium is located is controlled to execute the above-mentioned hardware-in-loop test method for a controller when the program runs.
In order to achieve the above object, according to another aspect of the present invention, an embodiment of the present invention further provides a hardware-in-loop test apparatus for a controller, where the apparatus includes a storage medium; and one or more processors, the storage medium coupled with the processors, the processors configured to execute program instructions stored in the storage medium; and when the program instructions are operated, the hardware-in-loop test method of the controller is executed.
Further, as an implementation of the method shown in fig. 1 and fig. 2, another embodiment of the present invention further provides a hardware-in-loop testing apparatus for a controller. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. The device is applied to improving efficiency and accuracy of inputting a test case set, a test result and an analysis result corresponding to the tested ECU into the data management platform, and specifically as shown in figure 3, the device comprises:
the calling unit 31 is configured to call a test case set corresponding to the test instruction, where the test case set includes a plurality of test items;
a first sending unit 32, configured to send the test case suite to a test cabinet;
an obtaining unit 33, configured to obtain a test result set, where the test result set includes a test result corresponding to each test item;
an output unit 34, configured to output the test result set;
a receiving unit 35 for receiving an analysis result set;
a second sending unit 36, configured to send the test case set, the test result set, and the analysis result set to a data management platform.
Further, as shown in fig. 4, the apparatus further includes:
the analysis unit 37 is configured to analyze the test case suite through a preset component after the call unit 31 calls the test case suite corresponding to the test instruction, so as to obtain data content included in each test item;
the first sending unit 32 is specifically configured to send the data content included in each test item to the test cabinet.
Further, as shown in fig. 4, the acquiring unit 33 includes:
an obtaining module 331, configured to obtain a plurality of test results through a preset code;
a determining module 332, configured to determine, through the preset code, a test identifier corresponding to each test result, where the test identifier is used to identify whether a corresponding test item passes through;
the output unit 34 is specifically configured to output a test result set including a plurality of test results and a test identifier corresponding to each test result.
Further, as shown in fig. 4, the analysis result set includes an analysis result corresponding to at least one failed test item; the second transmission unit 36 includes:
a first adding module 361, configured to add the multiple test results and the test identifier corresponding to each test result to corresponding positions in the test case set;
a second adding module 362, configured to add at least one of the analysis results to a corresponding position in the test case set;
the sending module 363 is configured to send the test case set to the data management platform.
Further, as shown in fig. 4, the second sending unit 36 further includes:
a generating module 364, configured to generate a unique identifier corresponding to the test case set before the sending module 363 sends the test case set to the data management platform;
an output module 365 configured to output the unique identifier;
the sending module 363 is specifically configured to send the test case suite and the unique identifier to the data management platform.
Further, as shown in fig. 4, the apparatus further includes:
and a third sending unit 38, configured to send the log to the target terminal according to a preset period.
Further, as shown in fig. 4, the apparatus further includes:
and the compiling unit 39 is configured to compile the test case set based on a preset test case template before the calling unit 31 calls the test case set corresponding to the test instruction.
Compared with the prior art that a worker manually inputs a test case set, a test result and an analysis result corresponding to an ECU to be tested into a data management platform, the hardware-in-loop test method and the hardware-in-loop test device for the controller can call the test case set corresponding to the test instruction after a client application program running in an upper computer receives the test instruction input by the worker, and send the called test case set to a test cabinet, so that the test cabinet performs hardware-in-loop test on the ECU to be tested based on the test case set; after the test cabinet completes the hardware-in-loop test of the tested ECU, the client application program acquires a test result set containing the test result corresponding to each test item and outputs the test result set; after receiving the analysis result set input by the worker, the client application program can send the test case set, the test result set and the analysis result set to the data management platform for storage and backup, so that the worker is not required to manually input the test case set, the test result set and the analysis result set into the data management platform, and the efficiency and the accuracy of inputting the test case set, the test result set and the analysis result set corresponding to the tested ECU into the data management platform are improved.
The hardware-in-the-loop testing device of the controller comprises a processor and a memory, wherein the calling unit, the first sending unit, the acquiring unit, the output unit, the receiving unit, the second sending unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the efficiency and the accuracy of inputting the test case set, the test result and the analysis result corresponding to the tested ECU to the data management platform are improved by adjusting the kernel parameters.
The embodiment of the invention provides a storage medium, which comprises a stored program, wherein when the program runs, a device where the storage medium is located is controlled to execute the hardware-in-loop test method of the controller.
The storage medium may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the invention also provides a hardware-in-loop testing device of the controller, which comprises a storage medium; and one or more processors, the storage medium coupled with the processors, the processors configured to execute program instructions stored in the storage medium; and when the program instructions are operated, the hardware-in-loop test method of the controller is executed.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps:
calling a test case set corresponding to a test instruction, and sending the test case set to a test cabinet, wherein the test case set comprises a plurality of test items;
acquiring a test result set, and outputting the test result set, wherein the test result set comprises a test result corresponding to each test item;
and receiving an analysis result set, and sending the test case set, the test result set and the analysis result set to a data management platform.
Further, after the test case set corresponding to the test instruction is called, the method further includes:
analyzing the test case suite through a preset component to obtain data content contained in each test item;
the sending the test case suite to a test cabinet comprises:
and sending the data content contained in each test item to the test cabinet.
Further, the obtaining a test result set includes:
obtaining a plurality of test results through a preset code, and determining a test identifier corresponding to each test result through the preset code, wherein the test identifier is used for identifying whether a corresponding test item passes through;
the outputting the test result set includes:
and outputting a test result set comprising a plurality of test results and test identifications corresponding to the test results.
Further, the analysis result set comprises at least one analysis result corresponding to the failed test item; the sending the test case set, the test result set and the analysis result set to a data management platform includes:
adding a plurality of test results and test identifications corresponding to each test result to corresponding positions in the test case set;
adding at least one analysis result to a corresponding position in the test case set;
and sending the test case set to the data management platform.
Further, before the sending the test case suite to the data management platform, the method further includes:
generating a unique identifier corresponding to the test case set, and outputting the unique identifier;
the sending the test case suite to the data management platform includes:
and sending the test case set and the unique identifier to the data management platform.
Further, the method further comprises:
and sending the log to a target terminal according to a preset period.
Further, before the calling the test case set corresponding to the test instruction, the method further includes:
and compiling the test case set based on a preset test case template.
The present application further provides a computer program product adapted to perform program code for initializing the following method steps when executed on a data processing device: calling a test case set corresponding to a test instruction, and sending the test case set to a test cabinet, wherein the test case set comprises a plurality of test items; acquiring a test result set, and outputting the test result set, wherein the test result set comprises a test result corresponding to each test item; and receiving an analysis result set, and sending the test case set, the test result set and the analysis result set to a data management platform.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (16)
1. A hardware-in-loop test method of a controller is characterized by comprising the following steps:
calling a test case set corresponding to a test instruction, and sending the test case set to a test cabinet, wherein the test case set comprises a plurality of test items;
acquiring a test result set, and outputting the test result set, wherein the test result set comprises a test result corresponding to each test item;
and receiving an analysis result set, and sending the test case set, the test result set and the analysis result set to a data management platform.
2. The method of claim 1, wherein after the test case set corresponding to the call test instruction, the method further comprises:
analyzing the test case suite through a preset component to obtain data content contained in each test item;
the sending the test case suite to a test cabinet comprises:
and sending the data content contained in each test item to the test cabinet.
3. The method of claim 1, wherein obtaining the set of test results comprises:
obtaining a plurality of test results through a preset code, and determining a test identifier corresponding to each test result through the preset code, wherein the test identifier is used for identifying whether a corresponding test item passes through;
the outputting the test result set includes:
and outputting a test result set comprising a plurality of test results and test identifications corresponding to the test results.
4. The method of claim 3, wherein the set of analysis results includes at least one analysis result corresponding to a failed test item;
the sending the test case set, the test result set and the analysis result set to a data management platform includes:
adding a plurality of test results and test identifications corresponding to each test result to corresponding positions in the test case set;
adding at least one analysis result to a corresponding position in the test case set;
and sending the test case set to the data management platform.
5. The method of claim 4, wherein prior to the sending the set of test cases to the data management platform, the method further comprises:
generating a unique identifier corresponding to the test case set, and outputting the unique identifier;
the sending the test case suite to the data management platform includes:
and sending the test case set and the unique identifier to the data management platform.
6. The method of claim 1, further comprising:
and sending the log to a target terminal according to a preset period.
7. The method according to any one of claims 1-6, wherein before the calling the test case set corresponding to the test instruction, the method further comprises:
and compiling the test case set based on a preset test case template.
8. A hardware-in-loop test apparatus for a controller, comprising:
the test device comprises a calling unit, a test unit and a control unit, wherein the calling unit is used for calling a test case set corresponding to a test instruction, and the test case set comprises a plurality of test items;
the first sending unit is used for sending the test case set to a test cabinet;
the acquisition unit is used for acquiring a test result set, and the test result set comprises a test result corresponding to each test item;
the output unit is used for outputting the test result set;
a receiving unit for receiving an analysis result set;
and the second sending unit is used for sending the test case set, the test result set and the analysis result set to a data management platform.
9. The apparatus of claim 8, further comprising:
the analysis unit is used for analyzing the test case set through a preset component after the calling unit calls the test case set corresponding to the test instruction so as to obtain data content contained in each test item;
the first sending unit is specifically configured to send the data content included in each test item to the test cabinet.
10. The apparatus of claim 8, wherein the obtaining unit comprises:
the acquisition module is used for acquiring a plurality of test results through preset codes;
the determining module is used for determining a test identifier corresponding to each test result through the preset code, wherein the test identifier is used for identifying whether a corresponding test item passes through;
the output unit is specifically configured to output a test result set including a plurality of test results and a test identifier corresponding to each test result.
11. The apparatus of claim 10, wherein the set of analysis results comprises at least one analysis result corresponding to a failed test item; the second transmission unit includes:
the first adding module is used for adding the plurality of test results and the test identification corresponding to each test result to the corresponding position in the test case set;
the second adding module is used for adding at least one analysis result to a corresponding position in the test case set;
and the sending module is used for sending the test case set to the data management platform.
12. The apparatus of claim 11, wherein the second sending unit further comprises:
the generating module is used for generating a unique identifier corresponding to the test case set before the sending module sends the test case set to the data management platform;
the output module is used for outputting the unique identifier;
the sending module is specifically configured to send the test case suite and the unique identifier to the data management platform.
13. The apparatus of claim 8, further comprising:
and the third sending unit is used for sending the log to the target terminal according to a preset period.
14. The apparatus according to any one of claims 8-13, further comprising:
and the compiling unit is used for compiling the test case set based on a preset test case template before the calling unit calls the test case set corresponding to the test instruction.
15. A storage medium comprising a stored program, wherein the apparatus on which the storage medium is located is controlled to execute the hardware-in-loop test method of the controller according to any one of claims 1 to 7 when the program is executed.
16. A hardware-in-the-loop test apparatus of a controller, the apparatus comprising a storage medium; and one or more processors, the storage medium coupled with the processors, the processors configured to execute program instructions stored in the storage medium; the program instructions when executed perform a hardware-in-the-loop test method for a controller of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911243553.9A CN111026080A (en) | 2019-12-06 | 2019-12-06 | Hardware-in-loop test method and device for controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911243553.9A CN111026080A (en) | 2019-12-06 | 2019-12-06 | Hardware-in-loop test method and device for controller |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111026080A true CN111026080A (en) | 2020-04-17 |
Family
ID=70204605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911243553.9A Pending CN111026080A (en) | 2019-12-06 | 2019-12-06 | Hardware-in-loop test method and device for controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111026080A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112034820A (en) * | 2020-08-21 | 2020-12-04 | 北京小马智创科技有限公司 | Cloud-based hardware-in-loop system testing method and system and storage medium |
CN112147980A (en) * | 2020-09-24 | 2020-12-29 | 北京车和家信息技术有限公司 | Vehicle controller testing method and device and testing equipment |
CN112286741A (en) * | 2020-10-09 | 2021-01-29 | 湖南中联重科智能技术有限公司 | Hardware testing method and device, electronic equipment and storage medium |
CN112506775A (en) * | 2020-12-03 | 2021-03-16 | 东风汽车集团有限公司 | Multi-HIL platform testing method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107465572A (en) * | 2017-08-02 | 2017-12-12 | 华数传媒网络有限公司 | Intelligent terminal method of testing, apparatus and system |
CN108268348A (en) * | 2017-12-08 | 2018-07-10 | 广州视源电子科技股份有限公司 | Interface testing method and device, mobile terminal and storage medium |
CN108595339A (en) * | 2018-05-09 | 2018-09-28 | 成都致云科技有限公司 | Automated testing method, apparatus and system |
CN109992513A (en) * | 2019-03-29 | 2019-07-09 | 携程计算机技术(上海)有限公司 | The automatization test system and method for mobile terminal APP |
CN110221981A (en) * | 2019-06-17 | 2019-09-10 | 北京车和家信息技术有限公司 | The test method and device of embedded software |
-
2019
- 2019-12-06 CN CN201911243553.9A patent/CN111026080A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107465572A (en) * | 2017-08-02 | 2017-12-12 | 华数传媒网络有限公司 | Intelligent terminal method of testing, apparatus and system |
CN108268348A (en) * | 2017-12-08 | 2018-07-10 | 广州视源电子科技股份有限公司 | Interface testing method and device, mobile terminal and storage medium |
CN108595339A (en) * | 2018-05-09 | 2018-09-28 | 成都致云科技有限公司 | Automated testing method, apparatus and system |
CN109992513A (en) * | 2019-03-29 | 2019-07-09 | 携程计算机技术(上海)有限公司 | The automatization test system and method for mobile terminal APP |
CN110221981A (en) * | 2019-06-17 | 2019-09-10 | 北京车和家信息技术有限公司 | The test method and device of embedded software |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112034820A (en) * | 2020-08-21 | 2020-12-04 | 北京小马智创科技有限公司 | Cloud-based hardware-in-loop system testing method and system and storage medium |
CN112147980A (en) * | 2020-09-24 | 2020-12-29 | 北京车和家信息技术有限公司 | Vehicle controller testing method and device and testing equipment |
CN112286741A (en) * | 2020-10-09 | 2021-01-29 | 湖南中联重科智能技术有限公司 | Hardware testing method and device, electronic equipment and storage medium |
CN112506775A (en) * | 2020-12-03 | 2021-03-16 | 东风汽车集团有限公司 | Multi-HIL platform testing method and system |
CN112506775B (en) * | 2020-12-03 | 2023-03-17 | 东风汽车集团有限公司 | Multi-HIL platform testing method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111026080A (en) | Hardware-in-loop test method and device for controller | |
CN109857404B (en) | SDK interface packaging method and device, storage medium and electronic equipment | |
CN111124870A (en) | Interface testing method and device | |
CN111241073A (en) | Data quality inspection method and device | |
CN111124871A (en) | Interface test method and device | |
CN115328853A (en) | AUTOSAR-based file configuration method and device | |
CN111209206A (en) | Automatic test method and system for software product | |
CN114861208A (en) | Data authority control method and data authority control service | |
KR102399597B1 (en) | Intelligent safety analysis technology using AI | |
KR102418796B1 (en) | FMEA failure mode recommend system | |
CN113641592A (en) | Test sequence generation method and device | |
CN116661758B (en) | Method, device, electronic equipment and medium for optimizing log framework configuration | |
CN104298589A (en) | Performance test method and performance test equipment | |
CN117687920A (en) | Interface testing method and device, storage medium and electronic equipment | |
CN112631763A (en) | Program changing method and device of host program | |
CN116595588A (en) | Safety analysis method and device for railway signal system development process | |
CN112148590A (en) | Method, device and equipment for determining code coverage rate | |
CN113326211B (en) | Test case generation method and device | |
CN115987821A (en) | Gateway routing test method and device | |
CN115758377A (en) | Container vulnerability processing method and device, storage medium and electronic equipment | |
CN112540915B (en) | Interface testing method, device and system | |
CN114153738A (en) | Test method and device for CAM software processing function, storage medium and processor | |
CN112015658A (en) | Method and device for generating software integration test case | |
CN117112450B (en) | Method and device for testing temporary speed limiting server | |
CN113835709B (en) | Information analysis method, device, storage medium and processor |
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: 20200417 |
|
RJ01 | Rejection of invention patent application after publication |