CN115794633A - Test case generation method and device based on scene data reinjection - Google Patents

Test case generation method and device based on scene data reinjection Download PDF

Info

Publication number
CN115794633A
CN115794633A CN202211511201.9A CN202211511201A CN115794633A CN 115794633 A CN115794633 A CN 115794633A CN 202211511201 A CN202211511201 A CN 202211511201A CN 115794633 A CN115794633 A CN 115794633A
Authority
CN
China
Prior art keywords
scene
detected
test case
interface
output value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211511201.9A
Other languages
Chinese (zh)
Inventor
罗鸿文
余璞
秦悦
陈梦星
廖兰心
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202211511201.9A priority Critical patent/CN115794633A/en
Publication of CN115794633A publication Critical patent/CN115794633A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of automatic driving automobile testing, in particular to a test case generation method and a test case generation device based on scene data reinjection, wherein the method comprises the following steps: determining a software interface to be detected in a test case of a detected scene, extracting information of the detected scene and an expected value of an output interface of an automatic driving controller, searching and recording start and stop moments of the detected scene on a time axis in driving recording video data in a standard data packet, calculating a relative position of a detection time point relative to data start time, determining all output values and/or change rules of the software interface to be detected at the start and stop moments, and compiling at least one test case according to the expected value. According to the embodiment of the application, the automatic driving test case based on the scene data reinjection can be generated, the generated test case is wide in coverage test point and strong in pertinence, the compiling efficiency and the standardization degree of the automatic driving test case generation process are improved, and the method is more reliable and practical.

Description

Test case generation method and device based on scene data reinjection
Technical Field
The application relates to the technical field of automatic driving automobile testing, in particular to a test case generation method and device based on scene data reinjection.
Background
With the development of the automatic driving technology of automobiles, the testing technology of automatic driving is continuously innovated, and the automatic driving development stage is changed from the automatic testing based on functions to the automatic testing based on scenes.
In the related art, in an automatic driving development stage, generation of a test case is an essential part in a test process, and a scenario-based test and a function-based test are greatly different in the writing idea of the test case.
However, in the related art, the scenario is generally compiled in a logic judgment manner, so that when a test case is generated for a fixed and known scenario data situation, the case generation process is not easy to standardize, the data analysis time is long, the generation efficiency is low, and the generated case is difficult to simultaneously cover all possible problem points of the automatic driving controller in a specific scenario, so that the generated test case is insufficient in pertinence and comprehensiveness and needs to be solved urgently.
Disclosure of Invention
The application provides a test case generation method and device based on scene data reinjection, and aims to solve the problems that in the related technology, a scene is generally subjected to generalized case compiling in a logic judgment mode, so that when a test case is generated for a fixed and known scene data situation, the case generation process is not easy to standardize, meanwhile, the data analysis time is long, the generation efficiency is low, and the generated case is difficult to simultaneously cover all possible problem points of an automatic driving controller in a specific scene, so that the generated test case is insufficient in pertinence and comprehensiveness and the like.
An embodiment of a first aspect of the present application provides a test case generation method based on scene data reinjection, including the following steps: acquiring a software interface table, a standard data packet, a real vehicle test question sheet and a user use scene requirement document of a real vehicle in the test process; performing demand analysis according to the software interface table, the standard data packet, the real vehicle test question sheet and/or the user use scene demand document, determining a software interface to be detected in a test case of a detected scene, and extracting information of the detected scene and an expected value of an output interface of an automatic driving controller; based on the software interface to be detected, opening the data of the driving recording video in the standard data packet and the scene data in the standard data packet in different windows at the same time, searching the detected scene according to the detected scene information, and recording the starting and stopping time of the detected scene on the time axis in the driving recording video data in the standard data packet; and calculating the relative position of the detection time point relative to the data starting time based on the starting and stopping time, and determining all output values and/or change rules of the software interface to be detected at the starting and stopping time according to the description of the product function requirement in the user use scene requirement document or in a user evaluation mode so as to write at least one test case according to the expected value.
According to the technical means, the video data in the standard data packet can be manually identified, the detected scene is marked in the scene data in a time dotting mode, the automatic driving controller is subjected to multi-azimuth detection to compile the case, so that the generated automatic driving test case based on the scene data reinjection is wide in coverage test point and strong in pertinence, the compiling efficiency and the standardization degree of the automatic driving test case generating process are improved, and the automatic driving test case generating method is more reliable and practical.
Optionally, in an embodiment of the present application, the determining, according to the description of the product function requirement in the user usage scenario requirement document or in a user evaluation manner, all output values and/or change rules of the software interface to be detected at the starting and stopping time includes: and identifying a first output value or a change rule of the first output value of the longitudinal control interface, a second output value or a change rule of the second output value of the transverse control interface, a third output value or a change rule of the third output value of the control interface displayed by a user, and a fourth output value or a change rule of the fourth output value of the control interface of the state machine.
According to the technical means, the embodiment of the application can identify the value or the change rule of the value of each control interface, so that all output states of the controller in a specific scene can be detected, the detection coverage range is widened, and the generated test case is more comprehensive.
Optionally, in an embodiment of the application, the determining, according to the description of the product function requirement in the user usage scenario requirement document or in a user evaluation manner, all output values and/or change rules of the software interface to be detected at the start-stop time further includes: and identifying a fifth output value of all signals of each application layer software module in the automatic driving control or a change rule of the fifth output value.
According to the technical means, the method and the device can identify the values or the change rules of all signals of all application layer software modules in the automatic driving control, so that the internal output state of the controller is further detected, test data are deeply mined, and the generated test case is more complete.
Optionally, in an embodiment of the present application, the standard data packet records a value of any input interface that may cause a change in any output interface value of the automatic driving controller within a preset time period.
According to the technical means, any input interface value which can cause any output interface value of the automatic driving controller to change within a preset time length is recorded in the standard data packet, and the data acquisition refinement degree in the test case generation process is further enriched by enlarging the data coverage range in the standard data packet.
An embodiment of a second aspect of the present application provides a test case generating device based on scene data reinjection, including: the acquisition module is used for acquiring a software interface table, a standard data packet, a real vehicle test question sheet and a user use scene requirement document of the real vehicle in the test process; the analysis module is used for performing demand analysis according to the software interface table, the standard data packet, the real vehicle test question sheet and/or the user use scene demand document, determining a software interface to be detected in a test case of a detected scene, and extracting information of the detected scene and an expected value of an output interface of the automatic driving controller; the recording module is used for simultaneously opening the data of the driving recording video in the standard data packet and the scene data in the standard data packet in different windows based on the software interface to be detected, searching the detected scene according to the detected scene information, and recording the starting and stopping time of the detected scene on the time axis in the driving recording video data in the standard data packet; and the generating module is used for calculating the relative position of the detection time point relative to the data starting time based on the starting and stopping time, and determining all output values and/or change rules of the software interface to be detected at the starting and stopping time according to the description of the product function requirement in the user use scene requirement document or in a user evaluation mode so as to compile at least one test case according to the expected value.
Optionally, in an embodiment of the present application, the generating module includes: the first identification unit is used for identifying a first output value of a longitudinal control interface or a change rule of the first output value, a second output value of a transverse control interface or a change rule of the second output value, a third output value of a control interface displayed by a user or a change rule of the third output value, and a fourth output value of a control interface of a state machine or a change rule of the fourth output value.
Optionally, in an embodiment of the present application, the generating module further includes: and the second identification unit is used for identifying a fifth output value of all signals of each application layer software module in the automatic driving control or a change rule of the fifth output value.
Optionally, in an embodiment of the present application, the standard data packet records a value of any input interface that may cause a change in any output interface value of the automatic driving controller within a preset time period.
An embodiment of a third aspect of the present application provides an electronic device, including: the test case generation method based on scene data reinjection comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize the test case generation method based on scene data reinjection.
An embodiment of a fourth aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the program is executed by a processor, the method for generating a test case based on reinjection of scene data is implemented as above.
The beneficial effect of this application:
(1) The method and the device can identify the video data in the standard data packet artificially, mark the detected scene in the scene data in a more pointed manner by adopting a time dotting manner, detect the automatic driving controller in a multi-direction manner so as to write cases, so that the generated automatic driving test cases based on scene data reinjection cover the test points widely and have strong pertinence, the writing efficiency and the standardization degree of the automatic driving test case generation process are improved, and the method and the device are more reliable and practical.
(2) In the embodiment of the application, the value of any input interface which can cause the change of any output interface value of the automatic driving controller within the preset time length is recorded in the standard data packet, and the data coverage range in the standard data packet is enlarged, so that the refinement degree of data acquisition in the test case generation process is further enriched.
(3) According to the technical means, the embodiment of the application can identify the value or the change rule of the value of each control interface, so that all output states of the controller in a specific scene can be detected, the detection coverage range is expanded, and the generated test case is more comprehensive.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a test case generation method based on scene data reinjection according to an embodiment of the present application;
FIG. 2 is a diagram of a standard packet timeline according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating test case generation based on context data reinjection according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a test case generation apparatus based on scene data reinjection according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the application.
10-a test case generation device based on scene data reinjection; 100-an acquisition module, 200-an analysis module, 300-a recording module and 400-a generation module; 501-memory, 502-processor and 503-communication interface.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The method and the device for generating test cases based on scene data reinjection according to the embodiments of the present application are described below with reference to the accompanying drawings. In the related technology mentioned in the background technology center, general case compiling is performed on a scene in a logic judgment mode, so that when a test case is generated on a fixed and known scene data situation, the case generation process is not easy to standardize, meanwhile, the data analysis time is long, the generation efficiency is low, and the generated case is difficult to simultaneously cover all possible problem points of an automatic driving controller under a specific scene, so that the generated test case is not sufficient in pertinence and comprehensiveness, the application provides a test case generation method based on scene data reinjection, which can acquire a software interface table, a standard data packet, an actual vehicle test question sheet and a user use scene requirement document of an actual vehicle in the test process, perform requirement analysis according to the software interface table, the standard data packet, the actual vehicle test question sheet and/or the user use scene requirement document, determine a software interface required to be detected in the test case of the detected scene, extract expected values of the detected scene information and the output interface of the automatic driving controller, determine the expected values of the detected scene information and the driving data record of the driving data in a driving scene record according to the start time or stop time of the driving data record of the driving data, and the driving data record of the driving data in the driving scene record and the driving data of the driving according to the driving scene record, and the driving time of the driving and the driving data of the driving. Therefore, the generated automatic driving test case based on the scene data reinjection is wide in test point coverage and strong in pertinence, the compiling efficiency and the standardization degree of the automatic driving test case generation process are improved, and the method is more reliable and practical. Therefore, the problems that in the related technology, when a test case is generated for a fixed and known scene data situation due to the fact that a scene is generally subjected to generalized case compiling in a logic judgment mode, the case generation process is not easy to standardize, meanwhile, the data analysis time is long, the generation efficiency is low, and the generated case is difficult to simultaneously cover all possible problem points of the automatic driving controller in a specific scene, so that the generated test case is insufficient in pertinence and comprehensiveness and the like are solved.
Specifically, fig. 1 is a schematic flowchart of a test case generation method based on scene data reinjection according to an embodiment of the present application.
As shown in fig. 1, the test case generation method based on scene data reinjection includes the following steps:
in step S101, a software interface table, a standard data packet, a real vehicle test question sheet, and a user usage scenario requirement document during the test of the real vehicle are obtained.
It can be understood that the embodiment of the application can acquire a software interface table, a standard data packet, a real vehicle test question sheet and a user use scene requirement document of a real vehicle in the test process, and acquire various data of the real vehicle in the test process, so that the required data is acquired in multiple directions, and the comprehensiveness of data acquisition in the test case generation process is improved.
The software interface table can describe all software interfaces output by the controller in detail, including descriptions of the interfaces, so as to provide detection objects in test cases. The scene data in the standard data packet may be a typical usage scene or scene data of a problem occurring in an actual vehicle, and a section of the actual vehicle standard data packet is a test case or a set of multiple test cases. The real vehicle test question sheet may include real vehicle question information, and may provide data analysis basis, for example, each scene to be tested may be located in the standard data packet according to the description in the real vehicle question sheet. The user usage scenario requirement document contains scenario requirements to be met by the product, and provides a basis for data analysis, for example, each scenario to be tested can be positioned in a standard data packet by using descriptions in the scenario requirement document.
Optionally, in an embodiment of the present application, the standard data packet records a value of any input interface that may cause a change in any output interface value of the automatic driving controller within a preset time period.
It can be understood that, in the embodiment of the present application, the preset time duration is a preset time duration for recording a value of any input interface, which causes a change in a value of any output interface of the automatic driving controller, in a standard data packet, where the standard data packet may include scene data input to a measured object during a test execution process and trip recording video data time-synchronized with the scene data, and is similar to video data of a driving recorder, that is, each frame corresponds to scene data at the same time.
It should be noted that the preset time period is set by a person skilled in the art according to practical situations, and is not limited in particular here.
The standard data packet records the value of any input interface which can cause any output interface value of the automatic driving controller to change within the preset time, and the data coverage in the standard data packet is enlarged, so that the refinement degree of data acquisition in the test case generation process is further enriched.
In step S102, a requirement analysis is performed according to the software interface table, the standard data packet, the real vehicle test question sheet, and/or the user usage scenario requirement document, a software interface to be detected in the test case of the detected scenario is determined, and information of the detected scenario and an expected value of the output interface of the automatic driving controller are extracted.
In the actual execution process, after the standard data packet acquired in the real vehicle testing process is acquired, data in the standard data packet can be analyzed according to the description of a tester on problems of a real vehicle in the testing process or a user use scene requirement document. The process of analyzing the demand can comprise judging a software interface to be detected in a test case based on the scene, inputting the name of the interface to be detected into the test case, extracting the information of the detected scene from the test case by analyzing a test question sheet of the real vehicle, and extracting the expected value of the output interface of the automatic driving controller based on the scene by analyzing a scene demand document used by a user.
According to the embodiment of the application, the requirement analysis can be carried out according to the software interface table, the standard data packet, the real vehicle test question sheet and/or the user use scene requirement document, the software interface needing to be detected in the test case of the tested scene is determined, the tested scene information and the expected value of the output interface of the automatic driving controller are extracted, the obtained data in the test process of the real vehicle is analyzed, the corresponding content needed in the test case generation process is obtained, and the perfection degree of the test case compiling process is improved.
In step S103, based on the software interface to be detected, the data of the driving recording video in the standard data packet and the scene data in the standard data packet are simultaneously opened in different windows, the detected scene is searched according to the detected scene information, and the start-stop time of the detected scene on the time axis in the driving recording video data in the standard data packet is recorded.
It can be understood that, in the embodiment of the present application, finding a detected scene according to detected scene information may be implemented by artificially identifying video data in a standard data packet, thereby finding the detected scene and locking a time or a time period of the detected scene.
In some embodiments, a special visualization tool can be used, the data of the driving recording video in the standard data packet and the scene data in the standard data packet can be opened in different windows at the same time, the data of the driving recording video in the standard data packet is opened by the special data visualization tool respectively, the detected scene data in the standard data packet is opened in the window through the interface data analysis of the visualization tool, the specific name of the interface to be opened is consistent with the interface to be detected, the detected scene is searched by watching the data of the driving recording video in the standard data packet, and the starting and ending time of the scene on the time axis in the driving recording video data in the standard data packet is recorded at the same time.
According to the data analysis method and device, the data in the standard data packet can be analyzed, the detected scene is searched according to the scene information, and the time point of the starting moment and the stopping moment of the detected scene on the time axis of the standard data packet is determined, so that the data processing efficiency is improved, the analysis time of the test case generation process is shortened, the required detected scene is marked by using a time dotting mode, the pertinence of the data analysis result is improved, and the data analysis result is more definite.
In step S104, based on the start-stop time, the relative position of the detection time point with respect to the data start time is calculated, and all output values and/or change rules of the software interface to be detected at the start-stop time are determined according to the description of the product function requirement in the user usage scenario requirement document or in a user evaluation manner, so as to write at least one test case according to the expected value.
It can be understood that, in the embodiment of the present application, calculating the relative position of the detection time point with respect to the data start time may be calculating the relative position of the detection time point with respect to the data start time after the start-stop time of the detected scene is judged on the time axis of the standard data packet, comparing whether the actual output of the controller is consistent with the expected value by using a code, and then writing the test case according to the expected value.
For example, as shown in fig. 2, a schematic diagram of a standard packet timeline according to an embodiment of the present application is provided with a calculation method of
ΔT 1 =T 1 -T 0
ΔT 2 =T 2 -T 0
Wherein, delta T 1 Is the difference between the starting time of the measured scene and the starting time of the standard data packet, delta T 2 Is the difference between the end time of the measured scene and the start time of the standard packet, T 0 Is the start time, T, of a standard data packet 1 For the start time of the scene to be measured, T 2 For the end time of the measured scene, use is made of the delta T 1 Value of (A) locate T 1 Time of day is at the position of standard data packet on time axis, using delta T 2 Value of (A) locate T 2 The time of day is the position of the standard data packet on the time axis, and the relative time can be used for writing of the automatic test code.
In the actual implementation process, after the relative position of the detection time point relative to the data starting time is calculated, the interface to be detected at T can be judged according to the description of the product function requirement in the user use scene requirement document or in a user evaluation mode 1 And T 2 All output values at time, or part of the detection interface at T 1 And T 2 The change rule between the moments.
The embodiment of the application can calculate the relative position of the detection time point relative to the data starting time, and determine all output values and/or change rules of the software interface to be detected at the starting and stopping time, so as to compile at least one test case according to the expected value, thereby improving the standardization degree of the automatic driving test case generation process, and having higher practicability.
Optionally, in an embodiment of the present application, determining all output values and/or change rules of a software interface to be detected at the start-stop time according to a description of a product function requirement in a user usage scenario requirement document or in a user evaluation manner includes: and identifying the change rule of the first output value or the first output value of the longitudinal control interface, the change rule of the second output value or the second output value of the transverse control interface, the change rule of the third output value or the third output value of the control interface displayed by a user, and the change rule of the fourth output value or the fourth output value of the control interface of the state machine.
It can be understood that, in the embodiment of the present application, a manner of simultaneously detecting the horizontal control signal, the vertical control signal, and the user display control signal of the autopilot controller may be adopted, that is, a change rule of the output value or the value of the vertical control interface, a change rule of the output value or the value of the horizontal control interface, a change rule of the output value or the value of the control interface displayed by the user, and a change rule of the control interface value or the value of the state machine may be simultaneously determined.
The embodiment of the application can identify the value or change rule of the value of each control interface, so that all output states of the controller in a specific scene can be detected, the detection coverage range is expanded, and the generated test case is more comprehensive.
Optionally, in an embodiment of the present application, determining all output values and/or change rules of the software interface to be detected at the start-stop time according to the description of the product function requirement in the user usage scenario requirement document or in a user evaluation manner, further includes: and identifying the change rule of the fifth output value or the fifth output value of all signals of each application layer software module in the automatic driving control.
In the actual implementation process, in addition to identifying the objects detected by the values of the vehicle transverse control output interface, the longitudinal control output interface, the user display control output interface, the state machine control output interface and the change rules of some of the interfaces in the above steps, the method can also include the output of all signals of all software modules in the detected object in the scene, including but not limited to the signal output values or the change rules of the values of the control modules in perception, fusion, prediction, planning and control.
The embodiment of the application can identify the value or change rule of all signals of all application layer software modules in the automatic driving control, so that the internal output state of the controller is further detected, test data is deeply mined, and the generated test case is more perfect.
The operation of the embodiment of the present application is described in detail below with a specific embodiment, as shown in fig. 4.
Step S301: acquiring the required data and the standard data packet.
That is, acquiring the requirement data and the standard data packet includes: the system comprises a software interface table, a standard data packet, a real vehicle test question sheet and a user use scene requirement document. All software interfaces output by the controller and the description of each interface are described in detail in the software interface table, and detection objects in test cases are provided. The content contained in the standard data packet needs to include two parts, the first part is used for the scene data input to the tested object in the test execution process, the second part is the recorded video data formed after time synchronization with the scene data, namely the video data similar to a driving recorder, and each frame in the video data similar to the driving recorder can correspond to the scene data at the same moment. The real vehicle test question list comprises real vehicle question information, a basis is provided for data analysis, and each scene to be tested is positioned in the standard data packet according to the description in the real vehicle question list. The user usage scenario requirement document comprises scenario requirements to be met by the product, a basis is provided for data analysis, and each scenario to be tested is positioned in the standard data packet according to description in the usage scenario requirement document.
Step S302: and (5) analyzing the requirements.
Specifically, the software interface table, the standard data packet, the real vehicle test question list or the user usage scenario requirement document are acquired and then subjected to requirement analysis, the requirement analysis aims to judge the software interface to be detected in the test case based on the scenario, and the software interface comprises a longitudinal control interface, a transverse control interface, a user display control interface and a state control output interface of a state machine, the interface name to be detected is recorded in the test case, the actual vehicle test question list is analyzed, the detected scenario information is extracted from the interface name, and the expected value based on the scenario autopilot controller output interface is extracted by analyzing the user usage scenario requirement document.
Step S303: and (6) analyzing the data.
That is, the data analysis is performed after the demand analysis, and a special visualization tool is used, so that the data of the driving recording video in the standard data packet and the scene data in the standard data packet can be opened in different windows at the same time. And respectively opening the data of the driving recording video in the standard data packet by using the special data visualization tool, and then opening the detected scene data in the standard data packet in an interface data analysis window of the visualization tool, wherein the specific interface name to be opened is consistent with the interface to be detected in the process of the requirement analysis S302. And finding the detected scene in the S302 by watching the data of the driving recording video in the standard data packet, and recording the starting and ending time of the scene on the time axis in the driving recording video data in the standard data packet.
Step S304: the relative position of the detection time point with respect to the data start time is calculated.
That is, after the start-stop time of the detected scene is determined on the time axis of the standard data packet, the relative position of the detection time point with respect to the data start time is calculated, and after the relative position of the detection time point with respect to the data start time is calculated, all output values of the interface to be detected at the corresponding time are determined according to the description of the product function requirement in the scene requirement document used by the user or in a user evaluation mode, or the change rule of part of the detection interfaces at the corresponding time is determined in S302.
Step S305: and judging a longitudinal control interface.
Namely, the output value or the change rule of the value of the longitudinal control interface is judged.
Step S306: and judging a transverse control interface.
Namely, the change rule of the output value or the value of the horizontal control interface is judged.
Step S307: and judging a control interface displayed by a user.
That is, the output value or the variation rule of the value of the control interface displayed by the user is determined.
Step S308: and judging a control interface of the state machine.
That is, the output value or the change rule of the value of the control interface of the state machine is determined.
Step S309: and each internal software interface can be optionally judged and controlled.
That is, the change rule of all signal output values or values of all application layer software modules in the automatic driving control is selectively judged.
Step S310: and (5) compiling a test case.
That is, the writing of the test case is completed in conjunction with the obtained conclusion.
According to the test case generation method based on the scene data reinjection provided by the embodiment of the application, a software interface table, a standard data packet, an actual vehicle test question sheet and a user use scene requirement document of an actual vehicle in a test process can be obtained, a software interface needing to be detected in the test case of a tested scene is determined according to the software interface table, the standard data packet, the actual vehicle test question sheet and/or the user use scene requirement document for demand analysis, the tested scene information and the expected value of an automatic driving controller output interface are extracted, the data of driving record videos in the standard data packet and the scene data in the standard data packet are opened simultaneously in different windows based on the software interface needing to be detected, the tested scene is searched according to the tested scene information, the starting and stopping time of the tested scene in the driving record video data in the standard data packet is recorded, the relative position of a detection time point relative to the data starting time is calculated based on the starting and stopping time, the output value and/or the driving record time of the software interface needing to be detected in the standard data packet are determined according to the description of product function requirements in the user use scene requirement document or the mode of which is evaluated by a user, so that the test case can be written and the test case can be written more reliably and the test efficiency can be generated based on the test case. Therefore, the problems that in the related technology, when a test case is generated for a fixed and known scene data situation due to the fact that a scene is generally subjected to generalized case compiling in a logic judgment mode, the case generation process is not easy to standardize, meanwhile, the data analysis time is long, the generation efficiency is low, and the generated case is difficult to simultaneously cover all possible problem points of the automatic driving controller in a specific scene, so that the generated test case is insufficient in pertinence and comprehensiveness and the like are solved.
Next, a test case generation apparatus based on scene data reinjection according to an embodiment of the present application is described with reference to the drawings.
Fig. 4 is a schematic block diagram of a test case generation apparatus based on scene data reinjection according to an embodiment of the present application.
As shown in fig. 4, the test case generation apparatus 10 based on scene data reinjection includes: an acquisition module 100, an analysis module 200, a recording module 300, and a generation module 400.
The obtaining module 100 is configured to obtain a software interface table, a standard data packet, a real vehicle test question sheet, and a user usage scenario requirement document of the real vehicle in the test process.
And the analysis module 200 is configured to perform demand analysis according to the software interface table, the standard data packet, the real vehicle test question sheet, and/or the user usage scenario demand document, determine a software interface to be detected in the test case of the detected scenario, and extract information of the detected scenario and an expected value of an output interface of the automatic driving controller.
The recording module 300 is configured to open data of the driving recording video in the standard data packet and scene data in the standard data packet in different windows simultaneously based on a software interface to be detected, search for a detected scene according to detected scene information, and record start and stop times of the detected scene on a time axis in the driving recording video data in the standard data packet.
The generating module 400 is configured to calculate a relative position of the detection time point with respect to the data start time based on the start-stop time, and determine all output values and/or change rules of the software interface to be detected at the start-stop time according to descriptions of product function requirements in the user usage scenario requirement document or in a user evaluation manner, so as to write at least one test case according to an expected value.
Optionally, in an embodiment of the present application, the generating module 400 includes: first identification unit
The first identification unit is used for identifying a change rule of a first output value or a first output value of the longitudinal control interface, a change rule of a second output value or a second output value of the transverse control interface, a change rule of a third output value or a third output value of the control interface displayed by a user, and a change rule of a fourth output value or a fourth output value of the control interface of the state machine.
Optionally, in an embodiment of the present application, the generating module 400 further includes: a second identification unit.
The second identification unit is used for identifying the fifth output value or the change rule of the fifth output value of all signals of each application layer software module in the automatic driving control.
Optionally, in an embodiment of the present application, the standard data packet records a value of any input interface that may cause a change in any output interface value of the automatic driving controller within a preset time period.
It should be noted that the foregoing explanation on the embodiment of the test case generation method based on scene data reinjection is also applicable to the test case generation apparatus based on scene data reinjection of this embodiment, and details are not described here again.
According to the test case generation device based on the scene data reinjection, which is provided by the embodiment of the application, a software interface table, a standard data packet, an actual vehicle test question sheet and a user use scene requirement document of an actual vehicle in a test process can be obtained, a software interface needing to be detected in the test case of a tested scene is determined according to the software interface table, the standard data packet, the actual vehicle test question sheet and/or the user use scene requirement document for demand analysis, the tested scene information and the expected value of an output interface of an automatic driving controller are extracted, the data of driving record videos in the standard data packet and the scene data in the standard data packet are opened simultaneously in different windows based on the software interface needing to be detected, the tested scene is searched according to the tested scene information, the starting and stopping time of the tested scene in the driving record video data in the standard data packet is recorded, the relative position of a detection time point relative to the data starting time is calculated based on the starting and stopping time, the output value and/or the change degree of the starting time of the software interface needing to be detected are determined according to the description of product function requirements in the user use scene requirement document or the mode of which is evaluated by the user, so that the test case can be compiled automatically, the test case can be generated based on the test efficiency, and the test case can be compiled more reliably, and the test efficiency of the test cases can be generated based on the test efficiency. Therefore, the problems that in the related technology, when a test case is generated on a fixed and known scene data situation due to the fact that general case compiling is performed on a scene through a logic judgment mode, the case generation process is not easy to standardize, meanwhile, the data analysis time is long, the generation efficiency is low, the generated case is difficult to simultaneously cover all possible problem points of the automatic driving controller in a specific scene, the generated test case is insufficient in pertinence and comprehensiveness, and the like are solved.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include:
a memory 501, a processor 502, and a computer program stored on the memory 501 and executable on the processor 502.
The processor 502 implements the test case generation method based on the scene data reinjection provided in the above embodiments when executing a program.
Further, the electronic device further includes:
a communication interface 503 for communication between the memory 501 and the processor 502.
A memory 501 for storing computer programs that can be run on the processor 502.
The memory 501 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
Alternatively, in practical implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 may complete communication with each other through an internal interface.
The processor 502 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
The present embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the above test case generation method based on scene data reinjection.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or N executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or N wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are well known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer-readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A test case generation method based on scene data reinjection is characterized by comprising the following steps:
acquiring a software interface table, a standard data packet, a real vehicle test question sheet and a user use scene requirement document of a real vehicle in the test process;
performing requirement analysis according to the software interface table, the standard data packet, the real vehicle test question sheet and/or the user use scene requirement document, determining a software interface to be detected in a test case of a detected scene, and extracting information of the detected scene and an expected value of an output interface of an automatic driving controller;
based on the software interface to be detected, opening the data of the driving recording video in the standard data packet and the scene data in the standard data packet in different windows at the same time, searching the detected scene according to the detected scene information, and recording the starting and stopping time of the detected scene on the time axis in the driving recording video data in the standard data packet; and
and calculating the relative position of the detection time point relative to the data starting time based on the starting and stopping time, and determining all output values and/or change rules of the software interface to be detected at the starting and stopping time according to the description of the product function requirement in the user use scene requirement document or in a user evaluation mode so as to write at least one test case according to the expected value.
2. The method according to claim 1, wherein the determining all output values and/or change rules of the software interface to be detected at the starting and ending time according to the description of the product function requirement in the user usage scenario requirement document or in a user evaluation manner comprises:
identifying a change rule of a first output value or the first output value of a longitudinal control interface, a change rule of a second output value or the second output value of a transverse control interface, a change rule of a third output value or the third output value of a control interface displayed by a user, and a change rule of a fourth output value or the fourth output value of a control interface of a state machine.
3. The method according to claim 2, wherein the determining all output values and/or change rules of the software interface to be detected at the starting and ending time according to the description of the product function requirement in the user usage scenario requirement document or in a user evaluation manner further comprises:
and identifying a fifth output value of all signals of each application layer software module in the automatic driving control or a change rule of the fifth output value.
4. The method of claim 1, wherein the standard data packet records any input interface value that would cause a change in any output interface value of the autopilot controller for a predetermined period of time.
5. A test case generation device based on scene data reinjection is characterized by comprising:
the acquisition module is used for acquiring a software interface table, a standard data packet, a real vehicle test question sheet and a user use scene requirement document of the real vehicle in the test process;
the analysis module is used for performing demand analysis according to the software interface table, the standard data packet, the real vehicle test question sheet and/or the user use scene demand document, determining a software interface to be detected in a test case of a detected scene, and extracting information of the detected scene and an expected value of an output interface of the automatic driving controller;
the recording module is used for simultaneously opening the data of the driving recording video in the standard data packet and the scene data in the standard data packet in different windows based on the software interface to be detected, searching the detected scene according to the detected scene information, and recording the starting and stopping time of the detected scene on the time axis in the driving recording video data in the standard data packet; and
and the generating module is used for calculating the relative position of the detection time point relative to the data starting time based on the starting and stopping time, and determining all output values and/or change rules of the software interface to be detected at the starting and stopping time according to the description of the product function requirement in the user use scene requirement document or in a user evaluation mode so as to compile at least one test case according to the expected value.
6. The apparatus of claim 5, wherein the generating module comprises:
the first identification unit is used for identifying a first output value of a longitudinal control interface or a change rule of the first output value, a second output value of a transverse control interface or a change rule of the second output value, a third output value of a control interface displayed by a user or a change rule of the third output value, and a fourth output value of a control interface of a state machine or a change rule of the fourth output value.
7. The apparatus of claim 6, wherein the generating module further comprises:
and the second identification unit is used for identifying the fifth output value of all signals of each application layer software module in the automatic driving control or the change rule of the fifth output value.
8. The apparatus of claim 5, wherein the standard data packet records any input interface values that cause a change in any output interface value of the autopilot controller for a predetermined period of time.
9. An electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the method for generating test cases based on reinjection of scene data according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored, the program being executed by a processor for implementing the method for test case generation based on scenario data reinjection according to any one of claims 1 to 4.
CN202211511201.9A 2022-11-29 2022-11-29 Test case generation method and device based on scene data reinjection Pending CN115794633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211511201.9A CN115794633A (en) 2022-11-29 2022-11-29 Test case generation method and device based on scene data reinjection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211511201.9A CN115794633A (en) 2022-11-29 2022-11-29 Test case generation method and device based on scene data reinjection

Publications (1)

Publication Number Publication Date
CN115794633A true CN115794633A (en) 2023-03-14

Family

ID=85443063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211511201.9A Pending CN115794633A (en) 2022-11-29 2022-11-29 Test case generation method and device based on scene data reinjection

Country Status (1)

Country Link
CN (1) CN115794633A (en)

Similar Documents

Publication Publication Date Title
CN104536863B (en) The method of testing of a kind of application program and device
CN110208001B (en) Road testing method and device for vehicle
US20080059020A1 (en) Data Recorder For Vehicle
CN109616106A (en) Vehicle-mounted control screen voice recognition process testing method, electronic equipment and system
CN110266774B (en) Method, device and equipment for inspecting data quality of Internet of vehicles and storage medium
US7434181B2 (en) Debugger of an electronic circuit manufactured based on a program in hardware description language
CN106294109B (en) Method and device for acquiring defect code
CN112268696B (en) Clutch detection method, device, storage medium and device
JP2007322377A (en) On-board failure diagnosis apparatus and method for testing same
CN116126740B (en) Model in-loop test method and device, computer equipment and storage medium
CN115794633A (en) Test case generation method and device based on scene data reinjection
CN116257437A (en) ADAS system defect verification method and device based on real vehicle data reinjection
CN114138668A (en) Method for carrying out automatic parking test by utilizing GUI tool
CN116055349A (en) Method, device and equipment for detecting stream data
CN110108448B (en) Automatic defect detection method for dynamic logo
CN111611032B (en) User interface drawing level and excessive drawing detection method and device
CN114638096A (en) Method, device and equipment for displaying logic among program variables and storage medium
CN112327800A (en) Vehicle detection method and device and diagnosis equipment
KR100307709B1 (en) signal processing method in automatic inspection system
Karnane et al. Automating root-cause analysis to reduce time to find bugs by up to 50%
CN115327953A (en) Simulation test method and device for intelligent driving algorithm, electronic equipment and medium
CN114240830A (en) Automobile data recorder video detection method and device based on ffmpeg and image recognition
CN115617677A (en) Ramp testing method and device for automatic driving vehicle
US20240104717A1 (en) Defect detection method and device
CN115543829A (en) Intelligent driving function test method and device for vehicle, electronic equipment and medium

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