CN113177004A - Automatic ECU software testing method and system - Google Patents

Automatic ECU software testing method and system Download PDF

Info

Publication number
CN113177004A
CN113177004A CN202110577826.4A CN202110577826A CN113177004A CN 113177004 A CN113177004 A CN 113177004A CN 202110577826 A CN202110577826 A CN 202110577826A CN 113177004 A CN113177004 A CN 113177004A
Authority
CN
China
Prior art keywords
test
ecu
software
jenkin
soft
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
CN202110577826.4A
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.)
Weilai Automobile Technology Anhui Co Ltd
Original Assignee
Weilai Automobile Technology Anhui 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 Weilai Automobile Technology Anhui Co Ltd filed Critical Weilai Automobile Technology Anhui Co Ltd
Priority to CN202110577826.4A priority Critical patent/CN113177004A/en
Publication of CN113177004A publication Critical patent/CN113177004A/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

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)
  • Tests Of Electronic Circuits (AREA)

Abstract

The invention relates to an ECU software testing system and a method thereof. The system comprises: the system comprises a Jenkin server, a version control module, a storage warehouse and a test bench, wherein the version control module is used for generating an executable software package, the storage warehouse is used for storing the executable software package generated by the version control module, the Jenkin server is used for triggering and generating a test task when polling detects that a new generated executable software package exists in the storage warehouse, and the test bench is used for executing the flash and test of ECU software based on the test task so as to generate a test report. According to the invention, the test task can be automatically constructed, and the test result can be cleared up and then notified to developers and testers.

Description

Automatic ECU software testing method and system
Technical Field
The invention relates to a computer technology, in particular to a software automatic testing method and a software automatic testing system.
Background
With the development of electric automobiles, the requirements on software testing are higher and higher due to the rapid iteration of automobile electronic software. Most software development basically follows three distinct phases: designing, developing and testing.
However, such a procedure has significant drawbacks: (1) faults existing in software design can be discovered only after software development is completed, and the interval time is long; (2) in the software development process, faults can be accumulated continuously; (3) problems found in the testing phase are often more than three times more than problems found in the development phase. After the three phases are completed, the period of software iteration is often continuously lengthened, resulting in many times falling behind the schedule.
Therefore, continuous integration and automatic testing are very necessary, in the field of automobile ECU software, how to select a proper testing tool to build an effective integrated testing framework is a problem generally concerned by engineers, especially, the existing automobile software is more and more complex, the tested functions are more and more along with the continuous upgrade of the automatic driving function, the test cases are increased day by day, each regression test needs hundreds of test cases to form, and the management of the test cases is very inconvenient.
Disclosure of Invention
In view of the above problems, the present invention aims to provide an ECU software automatic test method and an ECU software automatic test system capable of quickly locating and solving problems when problems occur in the software development process.
The ECU software testing system of one aspect of the invention is characterized by comprising: a Jenkin server, a version control module, a storage warehouse and a test bench,
the version control module is used for generating an executable software package,
the storage warehouse is used for storing the executable software package generated by the version control module,
the Jenkin server is configured to poll the repository and trigger generation of a test task when the polling detects the presence of a new generated executable software package in the repository,
the test bench is used for executing the flash and the test of ECU software based on the test task to generate a test report.
Optionally, the Jenkin server includes Jenkin master node and Jenkin slave node, the Jenkin master node is used for distributing the test task, Jenkin slave node is based on what the Jenkin server generated the test task control the test bench carries out the writing and test work of ECU and generates the test report.
Optionally, the system further comprises a test management module for storing a test report generated based on the flashing and testing of the ECU software.
Optionally, the Jenkins slave node parses the test report through the Python script and uploads the obtained test result to the test management module.
Optionally, further comprising: and the mail module is used for sending the test result in the test management module to related personnel.
Optionally, the Jenkins master node is further configured to manage and maintain the ECU software testing system.
Optionally, the test rig comprises: a flash component for performing a flash action; and a test component for performing the test action.
Optionally, the flash component is connected with the ECU through a CAN and an ethernet, and the test component is connected with the ECU through a CAN and an ethernet.
The ECU software automatic testing method is characterized by comprising the following steps:
a software package generation step, in which an executable software package is generated and stored;
a test task generation step, polling the stored executable software package, and triggering and generating a test task when detecting that a new executable software package exists in the storage; and
a test task execution step of executing a flash and a test for the ECU based on the test task; and
a test report generation step of generating a test report based on the flashing and the test for the ECU.
Optionally, after the test report generating step, the method further comprises:
a test result generation step of generating a test result based on the test report; and
and a test result sending step, wherein the test result is sent to related personnel.
Optionally, further comprising: and a management and maintenance step, namely managing and maintaining the test cases.
Optionally, in the test result generating step, the test report is parsed by a Python script to generate the test result.
A computer-readable medium of an aspect of the present invention, on which a computer program is stored, is characterized in that the computer program, when executed by a processor, implements the ECU soft-ware testing method.
The computer device of one aspect of the present invention includes a storage module, a processor, and a computer program stored on the storage module and executable on the processor, and is characterized in that the processor implements the ECU software testing method when executing the computer program.
The ECU software automatic test system and the ECU software automatic test method can automatically construct a test task by controlling the software version, and inform developers and testers after the test result is sorted. According to the invention, the problems can be quickly positioned and solved, the errors accumulated in the development process are reduced, the working efficiency of developers is improved, and the burden of testers is reduced.
Drawings
Fig. 1 is a schematic diagram showing an ECU software automation test system according to an embodiment of the present invention.
Fig. 2 is a schematic configuration diagram showing one example of a test bench 800 in the ECU software automation test system of the present invention.
Detailed Description
The following description is of some of the several embodiments of the invention and is intended to provide a basic understanding of the invention. It is not intended to identify key or critical elements of the invention or to delineate the scope of the invention.
For the purposes of brevity and explanation, the principles of the present invention are described herein with reference primarily to exemplary embodiments thereof. However, those skilled in the art will readily recognize that the same principles are equally applicable to all types of ECU software automated testing methods and ECU software automated testing systems, and that these same principles, as well as any such variations, may be implemented therein without departing from the true spirit and scope of the present patent application.
Moreover, in the following description, reference is made to the accompanying drawings that illustrate certain exemplary embodiments. Electrical, mechanical, logical, and structural changes may be made to these embodiments without departing from the spirit and scope of the invention. In addition, while a feature of the invention may have been disclosed with respect to only one of several implementations/embodiments, such feature may be combined with one or more other features of the other implementations/embodiments as may be desired and/or advantageous for any given or identified function. The following description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined by the appended claims and their equivalents.
Terms such as "comprising" and "comprises" mean that, in addition to having elements (modules) and steps that are directly and explicitly stated in the description and claims, the solution of the invention does not exclude the presence of other elements (modules) and steps that are not directly or explicitly stated.
Before describing the ECU software automation test method and the ECU software automation test system of the present invention, some technical terms appearing herein will be explained.
Git is a distributed version control tool that can manage different software versions.
The artistry is a software package storage warehouse, and installation packages generated after different software versions are compiled can be stored in the warehouse, so that management and downloading are facilitated.
TestRail is a Web-based test case management module that can manage, track, and organize software testing.
The ECU is a special microcomputer controller for automobile.
Python, an object-oriented, transliterated computer programming language. Git is an open source, distributed version control system for efficient, high-speed processing of project version management from very small to very large. Git is an open source version control software developed by Linus Torvalds to help manage Linux kernel development.
The enterprise is a Maven warehouse server software, can be used for building a Maven warehouse on an internal network, and is used for uploading and publishing a public library in a company, so that the use convenience of public codes is improved.
Testmail is a test case management system that has proven useful when a project has a large number of tests and associated work items (e.g., bugs and technical tasks).
Outlook (fully: Microsoft officeollook) is personal information management system software available from Microsoft corporation. Its main function is to send e-mail, but it also includes the functions of calendar, task management, contacts, notepad, etc. Outlook can operate in a stand-alone software manner, and can also operate with Microsoft Exchange Server and Microsoft SharePoint Server for multiple corporate users, with functions such as shared mailboxes and calendars, shared folders, etc.
The Intel NUC mini computer is a mini desktop under the Intel brand.
The PCAN is also called PCAN-USB and is also called a CAN card, and is a CAN to USB interface, and messages on a CAN network CAN be transmitted to a PC through the USB interface, and the CAN messages CAN be checked through related software.
RAD-MOON is a media conversion device that can connect a BroadR-Reach (100BASE-T1) physical layer interface to a standard quad 10/100 Ethernet interface.
Raspberry Pi (chinese name "Raspberry Pi") is a microcomputer, the system of which is based on Linux.
Fig. 1 is a schematic diagram showing an ECU software automation test system according to an embodiment of the present invention.
As shown in fig. 1, an ECU software automation test system according to an embodiment of the present invention mainly includes: jenkins server 100, version control module 400, repository 500, test management module 600, mail module 700, and test bench 800.
Jenkins server 100 is a continuous integration server, which is the primary tool for integration testing in the present invention. The Jenkins server 100 is provided with a Jenkins master node 200 and one or more Jenkins slave nodes 300. The Jenkins master node 200 may log in the Jenkins server 100 through a Web end, for example, and is mainly used for managing test tasks and scheduling Jenkins slave nodes 300. One Jenkins master node can be associated with a plurality of Jenkins slave nodes, each slave node can be distributed with a plurality of tasks (namely Job), and a tester can set test tasks as required.
As shown in fig. 1, the ECU software automation test system according to the embodiment of the present invention operates as follows:
s1: developers submit new changes, such as upload code or programs, etc., to the version control module 400, which may be Gif as an example of the version control module 400;
s2: the version control module 400 generates an executable software package through code compilation, and stores the executable software package in the storage warehouse 500, wherein, as an example of the storage warehouse 500, artistry may be adopted;
s3: the Jenkins server 100 polls the repository 500, and when polling detects that a new executable software package exists in the repository 500, S4 is triggered;
s4: the Jenkins server 100 generates a test task, and controls a corresponding test bench through the Jenkins slave node 300 according to the test task;
s5: under the control of the Jenkins slave node 300, the corresponding test bench 800 completes the test work and generates a test report;
s6: analyzing the test report through a Python script to obtain a test result, and uploading the test result to the test management module 600 to complete recording of the test result, wherein testtail can be adopted as an example of the test management module 600;
s7: the Jenkins server 100 obtains the test result of the test from the test management module 600;
s8: the Jenkins server 100 controls the mail module 700 through the Python script to sort the report content, and then sends the sorted report content to the relevant person in S9, as an example of the mail module 700, Outlook may be adopted;
s9: the test report is sent to the developer through the mail module 700, the developer can quickly know whether the change of the developer successfully passes the test, and if the test result fails, the developer can quickly locate the problem point; meanwhile, the test report can be sent to the tester through the mail module 700, and the tester can also quickly know whether the change successfully passes the test.
In addition, the ECU software automatic test system according to an embodiment of the present invention may further include the steps of:
s10: the tester can also manage and maintain the whole automatic test system through the Jenkins master node 200, and can maintain the test cases according to the requirements of developers.
Fig. 2 is a schematic configuration diagram showing one example of a test bench 800 in the ECU software automation test system of the present invention.
Fig. 2 illustrates that a master Jenkins node 200 distributes different tasks to two different Jenkins slave nodes, namely a first Jenkins slave node 300 and a second Jenkins slave node 300', wherein the first Jenkins slave node 300 is responsible for flash writing and the second Jenkins slave node 300' is responsible for testing. Here, as examples of hardware employed by the first Jenkins slave node 300 and the second Jenkins slave node 300', for example, a raspberry pi and an Intel NUC may be employed, respectively.
As shown in FIG. 2, the test rig 800 includes a brush component 810 and a test component 820.
The flash component 810 performs a flash action for performing a software update operation with respect to the ECU 900. The flash component 810 includes a first flash module 811 and a second flash module 812. The first flash module 811 is mainly used for data playback of the ECU900 to enable the ECU900 to be in a normal working state, and the first flash module 811 is connected with the ECU900 through the CAN. The second flash module 812 is an ethernet connection conversion device, and converts an ethernet harness of the ECU900 into a port of an RJ45 to access the first Jenkins slave node 300, so that the first Jenkins slave node 300 can be connected with the ECU900 through the ethernet, thereby performing software flash operation. As an example of the hardware configuration of the first and second flash modules 811 and 811, the first and second flash modules 811 and 811 may be configured, for example, using PCAN and RAD-Moon, respectively.
The test component 820 is used to perform relevant test tasks on the ECU 900. After the first Jenkins slave node 300 completes the software update to the ECU900 through the flash component 810, the second Jenkins slave node 300' can perform related testing tasks on the ECU900 through the testing component 820. Here, the test component 820 may include, for example, a first test module 821 and a second test module 822. Both the first test module 821 and the second test module 822 may be connected to the ECU900 through CAN lines, the first test module 821 supports four CAN channels, and the second test module 822 supports 2 CAN channels and 2 ethernet channels. It should be noted that: when the diagnostic test is needed, the ethernet channel of the second test module 822 is connected to the ECU900 to perform the DoIP related test; when the number of CAN channels of the tested ECU900 is greater than 4, the first test module 821 and the second test module 822 need to be connected by using a synchronization line, so that 6 channels CAN be formed, so that the test assembly CAN perform the related test. As one example, the first test module 821 and the second test module 822 may employ VN1630A and VN5610A, for example.
In addition, the scheduling of the test engineering in the ECU software automation test method of the present invention will be described.
To make the test project be automatically scheduled by the Jenkins server, firstly, the required software needs to be installed on the Jenkins master node and Jenkins slave nodes, and the Jenkins slave nodes need to be installed with Python3 and related components and Vector related software, such as CANoe, DiVA, vtestudio, CANdela, and the like.
Secondly, Jenkins slave nodes are established on the Jenkins master node, in order to manage different Jenkins slave nodes, the nodes are named by adopting a cn-system type-number coding format, and if the slave nodes are named as cn-win-01.
Then, when a task is created, test cases such as Vector need to be set in a distinguishing mode, because the test cases can only run on cn-win-01 and cannot be operated on other nodes. And the script files needed in the storage warehouse need to be synchronized to the local through the version control module, and the construction process is triggered when the polling storage warehouse changes through the trigger mode of script setting test.
And finally, logging in an interface of a Jenkins main node through Web, and checking the execution condition of the current test case.
Next, the processing of the test report will be described.
After the test is completed, a report in html/xml format is generated, and the processing of the report by Jenkins is mainly divided into two parts: the first part is to store and upload a report in an html format, and analyze the report in an xml format, wherein the analysis is executed by calling a Python script through a Jenkins sub-node, and is mainly to capture corresponding test items and test results from the report, and log information of failed test items and upload the log information to a test management module, so that an online record of the test results is completed, and the backtracking investigation in the future is facilitated. And the second part is that the Jenkins server captures the passing rate of the test result finished in the test management module by calling the related Python script, matches with a built-in UI interface, and sends the test result information to related personnel in a mail form through a mail module.
The ECU software automatic test system and the ECU software automatic test method are realized based on CANoe and Jenkins, Jenkins is used as a main tool for automatic test scheduling, the powerful test functions of CANoe and vTESSTUDio are combined, and ECU is used as a test object to carry out automatic instance test of communication and diagnosis on the ECU.
The ECU software automatic test system and the ECU software automatic test method can automatically construct the test task by controlling the software version, and inform developers and testers after the test result is sorted. According to the invention, the problems can be quickly positioned and solved, the errors accumulated in the development process are reduced, the working efficiency of developers is improved, and the burden of testers is reduced.
The invention also provides a computer readable medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the ECU soft testing method.
The invention also provides computer equipment which comprises a storage module, a processor and a computer program which is stored on the storage module and can run on the processor, and is characterized in that the ECU software testing method is realized when the processor executes the computer program.
The above examples mainly illustrate the ECU software automated testing method and the ECU software automated testing system of the present invention. Although only a few embodiments of the present invention have been described in detail, those skilled in the art will appreciate that the present invention may be embodied in many other forms without departing from the spirit or scope thereof. Accordingly, the present examples and embodiments are to be considered as illustrative and not restrictive, and various modifications and substitutions may be made therein without departing from the spirit and scope of the present invention as defined by the appended claims.

Claims (14)

1. An ECU software-based test system, comprising: a Jenkin server, a version control module, a storage warehouse and a test bench,
the version control module is used for generating an executable software package,
the storage warehouse is used for storing the executable software package generated by the version control module,
the Jenkin server is used for polling the storage warehouse and triggering the generation of a test task when detecting that a new executable software package exists in the storage warehouse,
the test bench is used for executing the flash and the test of ECU software based on the test task to generate a test report.
2. The ECU soft-ware testing system of claim 1,
the Jenkin server comprises a Jenkin master node and Jenkin slave nodes,
the Jenkin master node is used to schedule Jenkin slave nodes and to distribute test tasks,
the Jenkins slave node is used for controlling the test bench to execute the writing and testing work of ECU software and generate a test report based on the test task generated by the Jenkins server.
3. The ECU soft-ware testing system of claim 2, further comprising:
a test management module for storing a test report generated based on the flashing and testing of the ECU software.
4. The ECU soft-ware testing system of claim 3,
and the Jenkins slave nodes analyze the test report through Python scripts and upload the obtained test result to the test management module.
5. The ECU software-based test system according to claim 4, further comprising:
and the mail module is used for sending the test result in the test management module to related personnel.
6. The ECU soft-ware testing system of claim 2,
the Jenkins master node is further used for managing and maintaining the ECU software testing system.
7. The ECU soft-ware testing system of claim 2,
the test bench includes:
a flash component for performing a flash action; and
a test component for performing a test action.
8. The ECU soft-ware testing system of claim 6,
the flash component is connected with the ECU through the CAN and the Ethernet,
the test component is connected with the ECU through the CAN and the Ethernet.
9. An ECU software automated testing method is characterized by comprising the following steps:
a software package generation step, in which an executable software package is generated and stored;
a test task generation step, polling the stored executable software package, and triggering and generating a test task when detecting that a new executable software package is stored; and
a test task execution step of executing a flash and a test for the ECU based on the test task; and
a test report generation step of generating a test report based on the flash and the test performed for the ECU.
10. The ECU software automated testing method of claim 9, further comprising, after the test report generating step:
a test result generation step of generating a test result based on the test report; and
and a test result sending step, wherein the test result is sent to related personnel.
11. The automated ECU software testing method of claim 9, further comprising:
and a management and maintenance step, namely managing and maintaining the test cases.
12. The ECU soft-ware testing method according to claim 10,
in the test result generating step, a test report is analyzed through a Python script, and a test result is generated.
13. A computer-readable medium, having stored thereon a computer program,
the computer program, when executed by a processor, implements the ECU soft-ware testing method of any one of claims 9 to 12.
14. A computer device comprising a storage module, a processor and a computer program stored on the storage module and executable on the processor, wherein the processor implements the ECU soft testing method of any one of claims 9 to 12 when executing the computer program.
CN202110577826.4A 2021-05-26 2021-05-26 Automatic ECU software testing method and system Pending CN113177004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110577826.4A CN113177004A (en) 2021-05-26 2021-05-26 Automatic ECU software testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110577826.4A CN113177004A (en) 2021-05-26 2021-05-26 Automatic ECU software testing method and system

Publications (1)

Publication Number Publication Date
CN113177004A true CN113177004A (en) 2021-07-27

Family

ID=76927284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110577826.4A Pending CN113177004A (en) 2021-05-26 2021-05-26 Automatic ECU software testing method and system

Country Status (1)

Country Link
CN (1) CN113177004A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934640A (en) * 2021-11-10 2022-01-14 合众新能源汽车有限公司 Method and system for automatically testing software
CN114647585A (en) * 2022-03-28 2022-06-21 重庆长安汽车股份有限公司 DevOps-based intelligent network connection intelligent driving function cloud simulation test system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934640A (en) * 2021-11-10 2022-01-14 合众新能源汽车有限公司 Method and system for automatically testing software
CN114647585A (en) * 2022-03-28 2022-06-21 重庆长安汽车股份有限公司 DevOps-based intelligent network connection intelligent driving function cloud simulation test system and method

Similar Documents

Publication Publication Date Title
CN109634843B (en) Distributed automatic software testing method and platform for AI chip platform
US10289535B2 (en) Software testing integration
US7930683B2 (en) Test automation method for software programs
US7895565B1 (en) Integrated system and method for validating the functionality and performance of software applications
US7512933B1 (en) Method and system for associating logs and traces to test cases
Nguyen et al. A goal-oriented software testing methodology
US7421621B1 (en) Application integration testing
US8918760B2 (en) Test script generation for application image validation
CN108763091B (en) Method, device and system for regression testing
CN104407971A (en) Method for automatically testing embedded software
WO2006078539A2 (en) System verification test using a behavior model
CN113177004A (en) Automatic ECU software testing method and system
CN114020317B (en) Project quality assurance system and method based on DevOps
Hammond et al. End-to-end framework for fault management for open source clusters: Ranger
KR20110025171A (en) Method system and computer program for identifying software problems
Maâlej et al. Wsclt: a tool for ws-bpel compositions load testing
Lima et al. An approach for automated scenario-based testing of distributed and heterogeneous systems
Saadatmand Towards automating integration testing of. NET applications using Roslyn
Soe et al. Design and Implementation of a Test Automation Framework for Configurable Devices
CN112035356B (en) Automatic testing method and system for web application compatibility
Drabek et al. DANA-Description and Analysis of Networked Applications.
Hodován et al. Fuzzinator: an open-source modular random testing framework
Wendland et al. Extending the UML Testing Profile with a fine-grained test logging model
Nieminen et al. Adaptable design for root cause analysis of a model-based software testing process
CN111258792A (en) Log recording and error analysis tool based on target model

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