CN111752823A - Method, device and equipment for testing vehicle-mounted power supply application software - Google Patents

Method, device and equipment for testing vehicle-mounted power supply application software Download PDF

Info

Publication number
CN111752823A
CN111752823A CN201910252566.6A CN201910252566A CN111752823A CN 111752823 A CN111752823 A CN 111752823A CN 201910252566 A CN201910252566 A CN 201910252566A CN 111752823 A CN111752823 A CN 111752823A
Authority
CN
China
Prior art keywords
vehicle
application software
power supply
test
mounted power
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
CN201910252566.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.)
Beijing Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle 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 Beijing Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN201910252566.6A priority Critical patent/CN111752823A/en
Publication of CN111752823A publication Critical patent/CN111752823A/en
Pending legal-status Critical Current

Links

Images

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/3688Test management for test execution, e.g. scheduling of test suites
    • 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

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)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides a method, a device and equipment for testing vehicle-mounted power supply application software, and relates to the field of automobile software testing. The test method of the vehicle-mounted power supply application software comprises the following steps: determining a source code and a test case for testing the vehicle-mounted power supply application software according to the vehicle-mounted power supply application software to be tested and an input/output interface document applied to an input/output interface of the vehicle-mounted power supply application software; and executing the test case on a target board, testing the source code, and obtaining a test report of the vehicle-mounted power supply application software. According to the scheme, the vehicle-mounted power supply application software is automatically tested and the test report is automatically generated on the target board, so that the test time can be effectively shortened, the development period of the software is shortened, and compared with a manual test mode, the labor cost can be effectively reduced.

Description

Method, device and equipment for testing vehicle-mounted power supply application software
Technical Field
The invention relates to the field of automobile software testing, in particular to a method, a device and equipment for testing vehicle-mounted power supply application software.
Background
The embedded application software is software developed on the basis of a certain fixed hardware platform to meet the expected target of a user; it is closely tied to hardware. However, in practical projects, the cycle of vehicle power supply software development is shorter than that of hardware development, so that early software cannot be verified on a target board.
Therefore, in the early test, the test is performed on a development board or a target board, and the verification work of the software is completed by designing a test case and manually executing the test. And when the test system is integrated with a target board for testing, a manual test mode is also adopted, so that the software test period is increased, and the software development period is increased.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for testing vehicle-mounted power supply application software, which are used for solving the problem that the software needs to be automatically tested on a target board because the development cycle of vehicle-mounted embedded software is shorter than that of hardware.
In order to solve the technical problem, an embodiment of the present invention provides a method for testing vehicle power application software, where the method includes:
determining a source code and a test case for testing the vehicle-mounted power supply application software according to the vehicle-mounted power supply application software to be tested and an input/output interface document applied to an input/output interface of a system for operating the vehicle-mounted power supply application software;
and executing the test case on a target board, testing the source code, and obtaining a test report of the vehicle-mounted power supply application software.
Further, the determining a source code for the vehicle power application software test according to the vehicle power application software to be tested and the input/output interface document applied to the input/output interface of the system running the vehicle power application software includes:
acquiring an initial code of the vehicle-mounted power supply application software;
and determining a source code for testing the vehicle-mounted power supply application software according to the initial code and the input/output interface document.
Further, determining a test case according to the vehicle-mounted power supply application software to be tested and the input/output interface document applied to the input/output interface of the vehicle-mounted power supply application software, including:
acquiring the test requirement of the vehicle-mounted power supply application software;
and determining the test case according to the test requirement, the input/output interface document and the source code of the vehicle-mounted power supply application software test.
Further, before the executing the test case on the target board and testing the source code, the method further includes:
checking whether the source code of the vehicle-mounted power supply application software test needs to be modified;
and when the source code of the vehicle-mounted power supply application software test needs to be modified, modifying the test case according to the modified source code.
Further, before the executing the test case on the target board and testing the source code, the method further includes:
numbering the test cases and expected outputs corresponding to the test cases to obtain the numbers of the test cases;
the executing the test case on the target board to test the source code and obtain a test report of the vehicle-mounted power supply application software includes:
sequentially executing the test cases on a target board according to the serial numbers, and testing the source codes;
and obtaining a test report of the vehicle-mounted power supply application software according to the test result of each test case.
Further, the step of executing the test case and testing the source code includes:
inputting input data for testing and the test case to a target board through a CAN controller local area network;
executing the test case on the target board, and acquiring output data of the CAN output for executing the test case;
comparing the output data to expected outputs of the test case;
and if the output data is inconsistent with the expected output, storing the serial number of the test case to the test report.
The embodiment of the invention also provides a device for testing the application software of the vehicle-mounted power supply, which comprises:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a source code and a test case for testing the vehicle-mounted power supply application software according to the vehicle-mounted power supply application software to be tested and an input/output interface document applied to an input/output interface of the vehicle-mounted power supply application software;
and the first acquisition module executes the test case on the target board, tests the source code and acquires a test report of the vehicle-mounted power supply application software.
The embodiment of the invention also provides test equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor; and when the processor executes the program, the testing method of the vehicle-mounted power supply application software is realized.
The invention has the beneficial effects that:
according to the scheme, the source code and the test case for testing the vehicle-mounted power supply application software are determined according to the vehicle-mounted power supply application software to be tested and the input/output interface document applied to the input/output interface of the vehicle-mounted power supply application software. By automatically testing the vehicle-mounted power supply application software on the target board and automatically generating the test report, the test time can be effectively shortened, so that the development period of the software is shortened, and compared with a manual test mode, the labor cost can be effectively reduced.
Drawings
FIG. 1 is a flow chart of a method for testing vehicle power application software according to an embodiment of the invention;
fig. 2 is a block diagram of a testing apparatus for vehicle power supply application software according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The invention provides a method, a device and equipment for testing vehicle-mounted power supply application software, aiming at the problem that the software needs to be automatically tested on a target board because the development cycle of vehicle-mounted embedded software is shorter than that of hardware.
As shown in fig. 1, an embodiment of the present invention provides a method for testing vehicle power application software, where the method includes:
step 11, determining a source code and a test case for testing the vehicle-mounted power supply application software according to the vehicle-mounted power supply application software to be tested and an input/output interface document applied to an input/output interface of a system for running the vehicle-mounted power supply application software;
and step 12, executing the test case on the target board, testing the source code, and obtaining a test report of the vehicle-mounted power supply application software.
It should be noted that, by automatically testing the vehicle-mounted power supply application software on the target board and automatically generating the test report, the test time can be effectively shortened, so that the development period of the software is shortened, and compared with a manual test mode, the labor cost can be effectively reduced.
Specifically, the number of the test cases is at least one, preferably, the test cases CAN be edited by a Python language, while the application software is developed, a test engineer CAN develop a test executable file by using the Python language, and the test engineer connects the upper computer and the target board through Controller Area Network (CAN) communication to complete an automated test and automatically generate a test report.
Wherein, in step 11, determining a source code for testing the vehicle power application software according to the vehicle power application software to be tested and an input/output interface document applied to an input/output interface of a system running the vehicle power application software, includes:
acquiring an initial code of the vehicle-mounted power supply application software;
and determining a source code for testing the vehicle-mounted power supply application software according to the initial code and the input/output interface document.
In step 11, determining a test case according to the vehicle-mounted power application software to be tested and the input/output interface document applied to the input/output interface of the vehicle-mounted power application software includes:
acquiring the test requirement of the vehicle-mounted power supply application software;
and determining the test case according to the test requirement, the input/output interface document and the source code of the vehicle-mounted power supply application software test. Wherein the test case includes an expected output for executing the test case.
It should be noted that, in the actual application process of the vehicle power application software, there are various analog sampling data or hardware I/O port sampling data, and there are special situations such as communication failure, program run-off failure, watchdog abnormality, and the vehicle power application software also analyzes and processes the sampling data and outputs PWM or I/O port. Therefore, the vehicle power supply application software needs to simulate the above interaction information in the test process.
Wherein each analog sample in the source code CAN be simulated by data received from the fixed CAN ID; each hardware I/O port samples, also simulated by data received from a fixed CAN ID; some communication failures, program run-off failures, watchdog anomalies, are simulated by flag bits received from the fixed CAN ID; the PWM and I/O ports output from the source code are analyzed by transmitting data from the fixed CAN ID to determine whether to output the PWM and enable the I/O ports. And the newly added CAN ID and the analysis interface are supplemented to the input and output interface document.
It should be noted that before the software test is performed, it is necessary to determine whether the source code is updated, and if the source code is updated, the test case needs to be modified correspondingly to verify that the updated source code does not affect the implementation of the software function. Prior to step 12, the method further comprises:
checking whether the source code of the vehicle-mounted power supply application software test needs to be modified;
and when the source code of the vehicle-mounted power supply application software test needs to be modified, modifying the test case according to the modified source code.
It should be further noted that, in order to locate a certain test case that fails the test, the number of test cases that pass all tests and the number of test cases that fail the test are counted, before step 12, the method further includes:
numbering the test cases and expected outputs corresponding to the test cases to obtain the numbers of the test cases;
specifically, after the test environment is built, the test cases are read one by one, input data are sent to a target board through Controller Area Network (CAN) communication, and after the test cases to be tested are executed, output data in CAN IDs are read, so that the test results of the test cases are judged. Thus, said step 12, comprises:
sequentially executing the test cases on a target board according to the serial numbers, and testing the source codes;
and obtaining a test report of the vehicle-mounted power supply application software according to the test result of each test case.
It should be noted that, the step of executing the test case and testing the source code includes:
inputting input data for testing and the test case to a target board through a CAN controller local area network;
executing the test case on the target board, and acquiring output data of the CAN output for executing the test case;
comparing the output data to expected outputs of the test case;
and if the output data is inconsistent with the expected output, storing the serial number of the test case to the test report.
It should be noted that, after a test case is executed, the analyzed output data is compared with the expected output, and if the analyzed output data is inconsistent with the expected output, the test case fails, and in order to not affect the execution of other subsequent test cases, the fault caused by the test case failure needs to be cleared.
It should be further noted that after all test cases are executed, the number of all pass items and fail items in the test report is counted, and the test case number of the fail item is included, so as to facilitate the problem location.
As shown in fig. 2, an embodiment of the present invention further provides a device for testing vehicle power application software, where the device includes:
the determining module 21 is configured to determine a source code and a test case for testing the vehicle-mounted power supply application software according to the vehicle-mounted power supply application software to be tested and an input/output interface document applied to an input/output interface of the vehicle-mounted power supply application software;
and the first obtaining module 22 executes the test case on the target board, tests the source code, and obtains a test report of the vehicle-mounted power supply application software.
Specifically, the determining, by the determining module 21, the source code for the vehicle power application software test includes:
the first acquisition unit is used for acquiring an initial code of the vehicle-mounted power supply application software;
and the first determining unit is used for determining a source code for testing the vehicle-mounted power supply application software according to the initial code and the input/output interface document.
Specifically, the determining the test case in the determining module 21 includes:
the second acquisition unit is used for acquiring the test requirement of the vehicle-mounted power supply application software;
and the second determining unit is used for determining the test case according to the test requirement, the input/output interface document and the source code of the vehicle-mounted power supply application software test.
Specifically, the apparatus further comprises:
the checking module is used for checking whether the source code of the vehicle-mounted power supply application software test needs to be modified or not;
and the processing module is used for modifying the test case according to the modified source code when the source code of the vehicle-mounted power supply application software test needs to be modified.
Specifically, the apparatus further comprises:
the second obtaining module is used for numbering the test cases and expected outputs corresponding to the test cases to obtain the numbers of the test cases;
specifically, the first obtaining module includes:
the first execution unit is used for sequentially executing the test cases on the target board according to the serial numbers and testing the source codes;
and the third acquisition unit is used for acquiring a test report of the vehicle-mounted power supply application software according to the test result of each test case.
Specifically, the first obtaining module is further configured to:
inputting input data for testing and the test case to a target board through a CAN controller local area network;
executing the test case on the target board, and acquiring output data of the CAN output for executing the test case;
comparing the output data to expected outputs of the test case;
and if the output data is inconsistent with the expected output, storing the serial number of the test case to the test report.
The embodiment of the invention also provides test equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor; and when the processor executes the program, the testing method of the vehicle-mounted power supply application software is realized.
While the preferred embodiments of the present invention have been described, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.

Claims (8)

1. A test method for vehicle power supply application software is characterized by comprising the following steps:
determining a source code and a test case for testing the vehicle-mounted power supply application software according to the vehicle-mounted power supply application software to be tested and an input/output interface document applied to an input/output interface of a system for operating the vehicle-mounted power supply application software;
and executing the test case on a target board, testing the source code, and obtaining a test report of the vehicle-mounted power supply application software.
2. The method for testing vehicle power application software according to claim 1, wherein the determining a source code for testing the vehicle power application software according to the input/output interface document applied by the vehicle power application software to be tested and the input/output interface of the system running the vehicle power application software comprises:
acquiring an initial code of the vehicle-mounted power supply application software;
and determining a source code for testing the vehicle-mounted power supply application software according to the initial code and the input/output interface document.
3. The method for testing the vehicle-mounted power supply application software according to claim 1, wherein determining the test case according to the vehicle-mounted power supply application software to be tested and the input/output interface document applied to the input/output interface of the vehicle-mounted power supply application software comprises:
acquiring the test requirement of the vehicle-mounted power supply application software;
and determining the test case according to the test requirement, the input/output interface document and the source code of the vehicle-mounted power supply application software test.
4. The method for testing the vehicle-mounted power application software according to claim 1, wherein before the test case is executed on the target board and the source code is tested, the method further comprises:
checking whether the source code of the vehicle-mounted power supply application software test needs to be modified;
and when the source code of the vehicle-mounted power supply application software test needs to be modified, modifying the test case according to the modified source code.
5. The method for testing the vehicle-mounted power application software according to claim 1, wherein before the test case is executed on the target board and the source code is tested, the method further comprises:
numbering the test cases and expected outputs corresponding to the test cases to obtain the numbers of the test cases;
the executing the test case on the target board to test the source code and obtain a test report of the vehicle-mounted power supply application software includes:
sequentially executing the test cases on a target board according to the serial numbers, and testing the source codes;
and obtaining a test report of the vehicle-mounted power supply application software according to the test result of each test case.
6. The method for testing the vehicle-mounted power supply application software according to claim 5, wherein the step of executing the test case and testing the source code comprises the following steps:
inputting input data for testing and the test case to a target board through a CAN controller local area network;
executing the test case on the target board, and acquiring output data of the CAN output for executing the test case;
comparing the output data to expected outputs of the test case;
and if the output data is inconsistent with the expected output, storing the serial number of the test case to the test report.
7. A device for testing vehicle-mounted power supply application software is characterized by comprising:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a source code and a test case for testing the vehicle-mounted power supply application software according to the vehicle-mounted power supply application software to be tested and an input/output interface document applied to an input/output interface of the vehicle-mounted power supply application software;
and the first acquisition module executes the test case on the target board, tests the source code and acquires a test report of the vehicle-mounted power supply application software.
8. A test apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor; the method for testing the vehicle-mounted power supply application software is characterized in that the processor executes the program to realize the method for testing the vehicle-mounted power supply application software according to any one of claims 1 to 6.
CN201910252566.6A 2019-03-29 2019-03-29 Method, device and equipment for testing vehicle-mounted power supply application software Pending CN111752823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910252566.6A CN111752823A (en) 2019-03-29 2019-03-29 Method, device and equipment for testing vehicle-mounted power supply application software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910252566.6A CN111752823A (en) 2019-03-29 2019-03-29 Method, device and equipment for testing vehicle-mounted power supply application software

Publications (1)

Publication Number Publication Date
CN111752823A true CN111752823A (en) 2020-10-09

Family

ID=72672744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910252566.6A Pending CN111752823A (en) 2019-03-29 2019-03-29 Method, device and equipment for testing vehicle-mounted power supply application software

Country Status (1)

Country Link
CN (1) CN111752823A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051164A (en) * 2021-03-30 2021-06-29 北京梧桐车联科技有限责任公司 Method, device and equipment for testing vehicle-mounted program and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853203A (en) * 2010-05-31 2010-10-06 浙江大学 Online test system for embedded software
CN102693183A (en) * 2012-05-30 2012-09-26 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
CN106815138A (en) * 2015-12-01 2017-06-09 北京奇虎科技有限公司 A kind of method and apparatus for generating interface testing use-case
CN107390110A (en) * 2017-06-20 2017-11-24 广东科学技术职业学院 A kind of method, apparatus and system tested automatically PCBA
CN108415832A (en) * 2018-02-07 2018-08-17 平安科技(深圳)有限公司 Automatic interface testing method, device, equipment and storage medium
US10169035B1 (en) * 2017-09-06 2019-01-01 International Business Machines Corporation Customized static source code analysis

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853203A (en) * 2010-05-31 2010-10-06 浙江大学 Online test system for embedded software
CN102693183A (en) * 2012-05-30 2012-09-26 瑞斯康达科技发展股份有限公司 Method and system for realizing automatic software testing
CN106815138A (en) * 2015-12-01 2017-06-09 北京奇虎科技有限公司 A kind of method and apparatus for generating interface testing use-case
CN107390110A (en) * 2017-06-20 2017-11-24 广东科学技术职业学院 A kind of method, apparatus and system tested automatically PCBA
US10169035B1 (en) * 2017-09-06 2019-01-01 International Business Machines Corporation Customized static source code analysis
CN108415832A (en) * 2018-02-07 2018-08-17 平安科技(深圳)有限公司 Automatic interface testing method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051164A (en) * 2021-03-30 2021-06-29 北京梧桐车联科技有限责任公司 Method, device and equipment for testing vehicle-mounted program and computer readable storage medium

Similar Documents

Publication Publication Date Title
US7895575B2 (en) Apparatus and method for generating test driver
US7275184B2 (en) Software verification method for control units and verification system
US9342441B2 (en) Methodology and tool support for test organization and migration for embedded software
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN108132876B (en) Embedded software object code unit testing method based on injection mode
CN111611154B (en) Regression testing method, device and equipment
CN111611157A (en) Automatic testing method and system for GMS continuous integration construction
Bonfiglio et al. Software faults emulation at model-level: Towards automated software fmea
KR20090065742A (en) Apparatus and method for developing software
JPH10320234A (en) Automatic test method for software
CN112988578A (en) Automatic testing method and device
CN117421217A (en) Automatic software function test method, system, terminal and medium
CN111752823A (en) Method, device and equipment for testing vehicle-mounted power supply application software
US20140281719A1 (en) Explaining excluding a test from a test suite
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN116069635A (en) SOC system testing method and device, computer equipment and storage medium
CN114661615B (en) FPGA software testing method and device
CN116306479A (en) UVM-based Ethernet PHY universal verification platform and verification method
KR100777103B1 (en) Apparatus and method for generation of test driver
CN115934559A (en) Testing method of intelligent form testing system
CN115809076A (en) ECU software automation integration method and system
US20160224456A1 (en) Method for verifying generated software, and verifying device for carrying out such a method
KR20120111618A (en) Apparatus and method for testing plc command
CN115034165A (en) Chip simulation verification method, system, equipment and storage medium
CN115373929A (en) Test method, device, equipment, readable storage medium and program product

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