CN117033228A - Automatic regression testing method and system for vehicle - Google Patents

Automatic regression testing method and system for vehicle Download PDF

Info

Publication number
CN117033228A
CN117033228A CN202311057433.6A CN202311057433A CN117033228A CN 117033228 A CN117033228 A CN 117033228A CN 202311057433 A CN202311057433 A CN 202311057433A CN 117033228 A CN117033228 A CN 117033228A
Authority
CN
China
Prior art keywords
test case
vehicle
regression
defect
function
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
CN202311057433.6A
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.)
Chery New Energy Automobile Co Ltd
Original Assignee
Chery New Energy 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 Chery New Energy Automobile Co Ltd filed Critical Chery New Energy Automobile Co Ltd
Priority to CN202311057433.6A priority Critical patent/CN117033228A/en
Publication of CN117033228A publication Critical patent/CN117033228A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

According to the characteristics of the vehicle electronic controller, the network signals corresponding to the functional interaction based on the defect points determine the associated cases of the defect points in the full-function test cases, the regression test cases are rebuilt according to the defect test cases and the associated test cases, the repaired vehicle software system is subjected to regression test according to the rebuilt regression test cases, the test of the change of the associated functions caused by missing test repair of the defect points is avoided, the regression test is not required to be carried out on all the cases, and the efficiency of the regression test is improved.

Description

Automatic regression testing method and system for vehicle
Technical Field
The invention belongs to the technical field of software testing, and particularly relates to a vehicle automatic regression testing method and system.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
Along with the continuous deep concept of software-defined automobiles in the automobile industry, the functions of the software of automobile electronics are more and more complex, the work difficulty of software testing is more and more increased, defects are necessarily increased in the development process, and regression testing on defects is also increased. For regression testing, which contents need to be tested to ensure that the repair problem is completely tested, the related functions can be tested, and the related functions are always problems in software testing. At present, the most adopted regression method for defects is to retest the error use case or retest the function, and the regression test mode inevitably leaks to repair the defects to cause the change of related functions; in order to avoid the related problems of missed detection, one way is to completely return the high-priority use cases in all the use cases, which can avoid the missed detection of the main problems, but has low full-function high-priority return efficiency and large workload.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides the vehicle automatic regression testing method and the system, and the network signals corresponding to the functional interaction based on the defect points determine the associated cases of the defect points in the full-function test cases, so that the regression test cases are constructed, and the regression test is performed by using the constructed regression test cases, so that the efficiency of the regression test is improved.
To achieve the above object, a first aspect of the present invention provides a vehicle auto regression testing method, comprising:
the vehicle software system executes the full-function test case, and acquires a defect test case according to an execution result of the full-function test case;
according to a defect point of a vehicle software system corresponding to a defect test case, determining an associated case associated with the defect test case in the full-function test case based on a network signal corresponding to functional interaction of the defect point, and further constructing a regression test case;
and executing the constructed regression test case by the repaired vehicle software system to carry out regression test.
A second aspect of the present invention provides a vehicle autoregressive test system comprising:
the execution module: the vehicle software system executes the full-function test case, and acquires a defect test case according to an execution result of the full-function test case;
the regression test case construction module: according to a defect point of a vehicle software system corresponding to a defect test case, determining an associated case associated with the defect test case in the full-function test case based on a network signal corresponding to functional interaction of the defect point, and further constructing a regression test case;
regression testing module: and executing the constructed regression test case by the repaired vehicle software system to carry out regression test.
A third aspect of the present invention provides a computer apparatus comprising: the system comprises a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, when the computer device is running, the processor and the memory are communicated through the bus, and the machine-readable instructions are executed by the processor to execute a vehicle autoregressive testing method.
A fourth aspect of the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs a vehicle autoregressive testing method.
The one or more of the above technical solutions have the following beneficial effects:
according to the invention, according to the characteristics of the vehicle electronic controller, the associated case of the defect point is determined in the full-function test cases based on the network signals corresponding to the functional interaction of the defect point, the regression test cases are rebuilt according to the defect test cases and the associated test cases, and the regression test is carried out on the repaired vehicle software system according to the rebuilt regression test cases, so that the test of the change of the related function caused by the defect point repair due to missing test is avoided, the regression test is not required to be carried out on all the cases, and the regression test efficiency is improved.
Additional aspects of the invention 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 invention.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention.
FIG. 1 is a schematic diagram of an automatic regression test of a vehicle according to a first embodiment of the present invention.
Detailed Description
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present invention.
Embodiments of the invention and features of the embodiments may be combined with each other without conflict.
Example 1
As shown in fig. 1, the embodiment discloses a vehicle automatic regression testing method, which includes:
the vehicle software system executes the full-function test case, and acquires a defect test case according to an execution result of the full-function test case; wherein, the defect use case is a use case which fails the full-function test and needs the regression test;
according to the defect points of the vehicle software system corresponding to the defect test cases, determining associated cases associated with the defect test cases in the full-function test cases based on network signals corresponding to functional interaction of the defect points, and further constructing regression test cases;
and executing the constructed regression test case by the repaired vehicle software system to carry out regression test.
In this embodiment, a Python is used to obtain a full-function automated test case and an expected result, where the expected result includes a network signal, a voltage, a current, and an image information result;
the defect use case is input, the detailed steps of the defect use case and the expected result and the actual result of each step.
In this embodiment, the full-function use case library is traversed according to the input/output signals of the defect use cases to select the associated use cases, the function interaction between the ECUs of the vehicle is transmitted through the network signals, the associated function associated with the defect point is determined based on the network signals of the defect point, and the associated use case corresponding to the associated function is selected from the full-function test use cases according to the associated function.
In this embodiment, according to the existing defect point, the granularity of the regression test for the defect point should be increased, and according to the requirement input and testing steps of the defect case, the conventional testing method is as follows: boundary values, equivalence classes, misspeculation, decision tables, and the like, while adding corresponding pressure test cases. In order to prevent the error generated by the reconstructed use case test expected result, particularly the result of the image information, the test step and the expected result of the use case are popped up for artificial confirmation after the use case is generated, the less accurate expected result is corrected, and the final result of the comparison between the actual result and the expected result in the subsequent automatic test is ensured to be correct.
In this embodiment, the constructed regression test case is converted into an automatic execution step through Python, and the CANOE and the corresponding control device are controlled according to the test step.
In this embodiment, the automatic detection test result includes:
controlling the opening, closing and measurement of the monitoring equipment through Python, and simultaneously receiving the test result transmitted by each detection equipment;
according to the test steps of the constructed regression test case, whether the communication network has error frame information or not is monitored at all times by Canoe monitoring the network signals of the ECU, and meanwhile, the characteristic time required to be acquired in the regression test case and the network signals of the specific nodes are sent to Python to judge whether the execution result of the case is correct or not
The repaired vehicle software system comprises the steps of obtaining the image information of the vehicle instrument, the central control screen and the automobile data recorder through the set time, and testing whether the obtained image information accords with the expected result through the constructed regression test case. Wherein, monitor and finally carry out the action through the camera, the position of camera and each ECU need to be fixed and kept unchanged, through taking a candid photograph of predetermined time point image information.
The repaired vehicle software system comprises the steps of respectively acquiring output voltage and output current based on a voltmeter and an ammeter through design time, and testing whether the acquired voltage value and current value meet expected results or not through the constructed regression test case.
Specifically, the voltmeter monitors the output voltage of certain specific pins of the ECU, and Python acquires the voltage value of the voltmeter at preset time and compares the voltage value with an expected value to judge whether the voltage value accords with the expected value; and monitoring the output current of the controller through an ammeter, and acquiring the current value of the ammeter at a preset time by Python and comparing the current value with an expected value to judge whether the current value accords with the expected value.
And giving corresponding results to all the regression testing steps, attaching error results to the steps which do not pass the test, and finally outputting a complete test report according to the requirement of the test report.
Example two
It is an object of the present embodiment to provide a vehicle autoregressive test system comprising:
the execution module: the vehicle software system executes the full-function test case, and acquires a defect test case according to an execution result of the full-function test case;
the regression test case construction module: according to a defect point of a vehicle software system corresponding to a defect test case, determining an associated case associated with the defect test case in the full-function test case based on a network signal corresponding to functional interaction of the defect point, and further constructing a regression test case;
regression testing module: and executing the constructed regression test case by the repaired vehicle software system to carry out regression test.
Example III
It is an object of the present embodiment to provide a computing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which processor implements the steps of the method described above when executing the program.
Example IV
An object of the present embodiment is to provide a computer-readable storage medium.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
The steps involved in the devices of the second, third and fourth embodiments correspond to those of the first embodiment of the method, and the detailed description of the embodiments can be found in the related description section of the first embodiment. The term "computer-readable storage medium" should be taken to include a single medium or multiple media including one or more sets of instructions; it should also be understood to include any medium capable of storing, encoding or carrying a set of instructions for execution by a processor and that cause the processor to perform any one of the methods of the present invention.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented by general-purpose computer means, alternatively they may be implemented by program code executable by computing means, whereby they may be stored in storage means for execution by computing means, or they may be made into individual integrated circuit modules separately, or a plurality of modules or steps in them may be made into a single integrated circuit module. The present invention is not limited to any specific combination of hardware and software.
While the foregoing description of the embodiments of the present invention has been presented in conjunction with the drawings, it should be understood that it is not intended to limit the scope of the invention, but rather, it is intended to cover all modifications or variations within the scope of the invention as defined by the claims of the present invention.

Claims (10)

1. A method of vehicle autoregressive testing, comprising:
the vehicle software system executes the full-function test case, and acquires a defect test case according to an execution result of the full-function test case;
according to a defect point of a vehicle software system corresponding to a defect test case, determining an associated case associated with the defect test case in the full-function test case based on a network signal corresponding to functional interaction of the defect point, and further constructing a regression test case;
and executing the constructed regression test case by the repaired vehicle software system to carry out regression test.
2. The vehicle autoregressive testing method according to claim 1, wherein the function interaction between the ECUs of the vehicle is transmitted through a network signal, the associated function associated with the defect point is determined based on the network signal of the defect point, and the associated case corresponding to the associated function is selected from the full-function test cases according to the associated function.
3. The vehicle automatic regression testing method according to claim 1, wherein the regression testing case generation method includes: boundary values, equivalence classes, misspeculation, and predicate tables.
4. The vehicle autoregressive testing method of claim 1, wherein the expected results of the full function test case include network signals, voltages, currents and image information.
5. The automatic regression testing method of vehicles according to claim 4, wherein according to the testing step of the constructed regression test case, whether the network signal of the ECU has error frame information is monitored by Canoe, and whether the network signal required to be acquired in the regression test case accords with the expected result is judged.
6. The vehicle autoregressive testing method according to claim 4, wherein the repaired vehicle software system comprises the steps of obtaining image information of a vehicle instrument, a central control screen and a vehicle recorder through set time, and testing whether the obtained image information meets expected results through the constructed regression test case.
7. The vehicle automatic regression testing method according to claim 4, wherein the repaired vehicle software system includes obtaining the output voltage and the output current based on the voltmeter and the ammeter respectively through the design time, and testing whether the obtained voltage value and the obtained current value meet the expected result through the constructed regression test case.
8. An automatic regression testing system for a vehicle, comprising:
the execution module: the vehicle software system executes the full-function test case, and acquires a defect test case according to an execution result of the full-function test case;
the regression test case construction module: according to a defect point of a vehicle software system corresponding to a defect test case, determining an associated case associated with the defect test case in the full-function test case based on a network signal corresponding to functional interaction of the defect point, and further constructing a regression test case;
regression testing module: and executing the constructed regression test case by the repaired vehicle software system to carry out regression test.
9. A computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing a vehicle autoregressive test method according to any of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs a vehicle autoregressive test method according to any of claims 1 to 7.
CN202311057433.6A 2023-08-21 2023-08-21 Automatic regression testing method and system for vehicle Pending CN117033228A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311057433.6A CN117033228A (en) 2023-08-21 2023-08-21 Automatic regression testing method and system for vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311057433.6A CN117033228A (en) 2023-08-21 2023-08-21 Automatic regression testing method and system for vehicle

Publications (1)

Publication Number Publication Date
CN117033228A true CN117033228A (en) 2023-11-10

Family

ID=88644762

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311057433.6A Pending CN117033228A (en) 2023-08-21 2023-08-21 Automatic regression testing method and system for vehicle

Country Status (1)

Country Link
CN (1) CN117033228A (en)

Similar Documents

Publication Publication Date Title
CN110908888B (en) Server testing method and device
RU2601141C2 (en) System and method for providing diagnostic information on faults
CN107370637B (en) Vehicle-mounted ECU communication function automatic test system and method
CN113778557B (en) Vehicle diagnosis software configuration method, device, server and storage medium
KR20140116492A (en) System and method for providing diagnostic fault information
CN111190406B (en) Method for testing undercarriage control system software
CN109669436B (en) Test case generation method and device based on functional requirements of electric automobile
CN111506509A (en) Automatic testing method, device, equipment and storage medium for automobile software unit
CN111124877A (en) Train display software testing method, device and system
CN113608518A (en) Data generation method, device, terminal equipment and medium
US11663113B2 (en) Real time fault localization using combinatorial test design techniques and test case priority selection
CN109558312A (en) The test method of Airborne Software
CN117033228A (en) Automatic regression testing method and system for vehicle
CN114995792B (en) Modularized development method, device, medium and electronic device of automobile diagnosis device
CN116455784A (en) Gateway test method, system, computer and readable storage medium
CN113608089B (en) SOA test method, system and device for switching power supply MOS tube and readable storage medium
CN114625106A (en) Vehicle diagnosis method and device, electronic equipment and storage medium
CN118033366B (en) Test device, method, electronic apparatus, and computer-readable storage medium
CN111582347B (en) Fault diagnosis method and device
CN116643998B (en) AUTOSAR RTM-based test method and device
CN117171014A (en) Method and device for testing performance of system software of automobile cabin
CN114968827B (en) Vehicle bus signal information verification method and system
CN111382075B (en) Automatic test data processing method and device
CN115327953B (en) Simulation test method and device for intelligent driving algorithm, electronic equipment and medium
CN113946511B (en) Full-function test case set acquisition method and system

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