Search

CN-121996548-A - Non-invasive software integration test method, system and storage medium

CN121996548ACN 121996548 ACN121996548 ACN 121996548ACN-121996548-A

Abstract

The invention provides a non-invasive software integration test method, a system and a storage medium, which comprise the steps of obtaining test requirements and test scenes, presetting a software architecture and an observable variable set according to the test requirements and the test scenes, generating a non-invasive data mapping statement and embedding a controller to be tested, designing the test cases based on the software architecture, the observable variable set and the test scenes, obtaining a test communication matrix and generating a standard DBC file, importing the file into a test upper computer for environmental configuration, and connecting the upper computer with the controller through CAN interface hardware, so that a non-invasive test environment is built, and software integration test is realized. According to the method, the system and the storage medium, a software architecture and an observable variable set are preset based on test function requirements, and a non-invasive data mapping statement is generated and embedded into a controller to be tested, so that the key state and complex logic in the controller can be observed without changing source codes, and the test coverage accuracy and effectiveness are remarkably improved.

Inventors

  • WEI MINGBO
  • WEI MIN
  • Liu changye
  • WANG XIAOMENG
  • LIANG WEI

Assignees

  • 上汽通用五菱汽车股份有限公司

Dates

Publication Date
20260508
Application Date
20260107

Claims (10)

  1. 1. A method for non-invasive software integration testing, comprising the steps of: acquiring a test function requirement and a test scene; presetting a software architecture and an observable variable set based on the test function requirements; generating a non-invasive data mapping statement based on the software architecture and the observable variable set, and embedding the non-invasive data mapping statement into a controller to be tested; Designing a test case set based on the software architecture, the observable variable set and the test scene; Acquiring a test communication matrix based on the test case set and a non-invasive data mapping statement; Generating a standard DBC file based on the test communication matrix; the standard DBC file is imported to a preset test upper computer, so that the test upper computer carries out software environment configuration based on the standard DBC file; And connecting one end of the preset CAN interface hardware with the test upper computer, and connecting the other end of the preset CAN interface hardware with a controller to be tested, so that the test upper computer, the CAN interface hardware and the non-invasive data mapping statement are built into a non-invasive test environment, and further, software integration test is realized based on the non-invasive test environment.
  2. 2. The method for non-invasive software integration test according to claim 1, wherein the software architecture and the observable variable set are preset based on the test function requirement, and the observable variable set setting process specifically comprises: Presetting a software architecture based on the test function requirements; Performing function module division and interface definition based on the software architecture to obtain module function definition; the set of observable variables is set based on the module function definition.
  3. 3. The method for non-intrusive software integration test according to claim 1, wherein the design of the test case set based on the software architecture, the observable variable set and the test scene comprises: acquiring a scene function module function definition based on the test scene; acquiring global observation variables and local observation variables based on the software architecture and the observable variable set; And designing the test case set based on the scene function module function definition, the global observation variable and the local observation variable.
  4. 4. A non-invasive software integration test method according to claim 1, wherein, The method for acquiring the test communication matrix based on the test case set and the non-invasive data mapping statement comprises the following steps: Acquiring global observation variables and local observation variables based on the test case set; Performing variable mapping based on the global observation variable, the local observation variable and the non-invasive data mapping statement to obtain a physical test attribute definition set; determining a message identifier, a signal definition, a physical layout, a numerical conversion and a value range description based on the physical test attribute definition set; and acquiring the test communication matrix based on the message identification, the signal definition, the physical layout, the numerical conversion and the value domain description.
  5. 5. The method of claim 1, wherein the connecting one end of the preset CAN interface hardware with the test host computer and the other end thereof with the controller to be tested, so that the test host computer, the CAN interface hardware and the non-invasive data mapping statement are built into a non-invasive test environment, and further realizing the software integration test based on the non-invasive test environment, comprises: connecting one end of a preset CAN interface hardware with the test upper computer, and connecting the other end of the preset CAN interface hardware with a controller to be tested through a board card and a rack so that the board card and the rack output simulation real test signals to the controller to be tested; based on the simulation real test signal, the test upper computer, the CAN interface hardware and the non-invasive data mapping statement, constructing a non-invasive test environment, and further realizing software integration test based on the non-invasive test environment.
  6. 6. The method for testing integrated software according to claim 1, wherein the implementation of integrated software testing based on the non-invasive testing environment specifically comprises the following steps: In the non-invasive test environment, a preset diagnosis instruction is sent based on the test case set, so that the controller to be tested starts a preset debugging switch in the controller, and the controller outputs a test message; acquiring a real-time observable variable based on the test message; And acquiring a real-time test data stream based on the real-time observable variable and the non-invasive data mapping statement, so that the real-time test data stream is input to a test upper computer, and further, a software integration test result is obtained.
  7. 7. A non-invasive software integrated test system, comprising: the test requirement acquisition module is used for acquiring test function requirements and test scenes; the architecture design module is used for presetting a software architecture and an observable variable set based on the test function requirement; The non-invasive statement embedding module is used for generating a non-invasive data mapping statement based on the software architecture and the observable variable set, and embedding the non-invasive data mapping statement into a controller to be tested; The test case design module is used for designing a test case set based on the software architecture, the observable variable set and the test scene; the test communication matrix writing module is used for obtaining a test communication matrix based on the test case set and the non-invasive data mapping statement; The system comprises a non-invasive test environment configuration module, a test communication matrix, a software environment configuration module and a software integration test module, wherein the non-invasive test environment configuration module is used for generating a standard DBC file based on the test communication matrix, importing the standard DBC file into a preset test upper computer to enable the test upper computer to conduct software environment configuration based on the standard DBC file, connecting one end of preset CAN interface hardware with the test upper computer, and connecting the other end of the preset CAN interface hardware with a controller to be tested to enable the test upper computer, the CAN interface hardware and a non-invasive data mapping statement to be built into a non-invasive test environment, and further achieving software integration test based on the non-invasive test environment.
  8. 8. The system according to claim 7, wherein the architecture design module is configured to preset a software architecture and an observable variable set based on the test function requirement, and the observable variable set setting process specifically includes: Presetting a software architecture based on the test function requirements; Performing function module division and interface definition based on the software architecture to obtain module function definition; the set of observable variables is set based on the module function definition.
  9. 9. The system of claim 7, wherein the test case design module is configured to design a test case set based on the software architecture, the observable variable set, and the test scenario, and comprises: acquiring a scene function module function definition based on the test scene; acquiring global observation variables and local observation variables based on the software architecture and the observable variable set; And designing the test case set based on the scene function module function definition, the global observation variable and the local observation variable.
  10. 10. A computer readable storage medium comprising a stored computer program, wherein the computer program, when run, controls a device on which the computer readable storage medium resides to perform a non-invasive software integration test method according to any one of claims 1-6.

Description

Non-invasive software integration test method, system and storage medium Technical Field The invention belongs to the technical field of electric automobile testing, and particularly relates to a non-invasive software integration testing method, a system and a storage medium. Background With the rapid development of electric, intelligent and networking of automobiles, the complexity of embedded system software is continuously improved, and software integration test becomes a key link for ensuring the functional correctness and system stability of a controller. The traditional software testing method is mostly dependent on direct analysis and instrumentation of source codes, so that the risk of core code leakage exists, and the testing personnel are required to have deep code understanding capability, so that the testing cost is high and the period is long. Meanwhile, the difference between the test environment and the real running environment often makes part of deep logic defects and dynamic interaction problems difficult to be effectively exposed. Therefore, how to realize deep and efficient verification of the internal states and logic behaviors of complex software on the premise of ensuring the code security has become a technical problem to be solved in the field. Under the circumstances, a non-invasive software integrated test method capable of achieving test accuracy, safety and execution efficiency is needed. Disclosure of Invention Aiming at the defects of the prior art, the invention provides a non-invasive software integrated test method, a system and a storage medium, which are used for solving the problems, wherein a software architecture and an observable variable set are preset based on test function requirements, and a non-invasive data mapping statement is generated and embedded into a controller to be tested, so that the internal key state and complex logic of the controller can be observed without changing a source code, and the test coverage accuracy and effectiveness are remarkably improved. In order to solve the technical problems, the invention provides a non-invasive software integration test method, which comprises the following steps: acquiring a test function requirement and a test scene; presetting a software architecture and an observable variable set based on the test function requirements; generating a non-invasive data mapping statement based on the software architecture and the observable variable set, and embedding the non-invasive data mapping statement into a controller to be tested; Designing a test case set based on the software architecture, the observable variable set and the test scene; Acquiring a test communication matrix based on the test case set and a non-invasive data mapping statement; Generating a standard DBC file based on the test communication matrix; the standard DBC file is imported to a preset test upper computer, so that the test upper computer carries out software environment configuration based on the standard DBC file; And connecting one end of the preset CAN interface hardware with the test upper computer, and connecting the other end of the preset CAN interface hardware with a controller to be tested, so that the test upper computer, the CAN interface hardware and the non-invasive data mapping statement are built into a non-invasive test environment, and further, software integration test is realized based on the non-invasive test environment. In the scheme, the software architecture and the observable variable set are preset based on the test function requirement, and the non-invasive data mapping statement is generated and embedded into the controller to be tested, so that the key state and logic inside the controller can be captured without changing the source code, the problem that the traditional test is strongly dependent on the source code is solved, and the test coverage accuracy and effectiveness are remarkably improved. The test communication matrix obtained based on the test case set and the non-invasive data mapping statement generates a standard DBC file, the standard DBC file is imported into the test upper computer for software environment configuration, and the built non-invasive test environment is consistent with the real running environment by combining with the CAN interface hardware to connect the controller, so that the reliability of the test result is ensured, and the leakage risk of the core code and the requirements on professional skills of testers are greatly reduced. In addition, the test flow supported by the standard DBC file can improve the reusability and the execution efficiency of the test case set, and provides high-efficiency, safe and low-cost test support for rapid iterative development of complex embedded software. Further, the software architecture and the observable variable set are preset based on the test function requirement, and the observable variable set setting process specifically comprises the fol