Continuous integration test system and method for HIL test

By adopting the continuous integration testing method of HIL testing in software development and using the automated testing process of bench clusters and CICD servers, the problems of low iteration efficiency, high communication costs and inconsistent test environments in the traditional iteration method are solved, achieving high efficiency and Reliable software testing and collaboration.

CN118838313APending Publication Date: 2024-10-25CHONGQING GANFENG POWER TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411022958.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-10-25

AI Technical Summary

Technical Problem

The traditional software development and testing process has low iteration efficiency, high human communication costs, and inconsistent testing environments, leading to problems such as delayed information transmission, poor communication, and inconsistent test results.

Method used

Adopting the continuous integration testing method of HIL testing, the automated testing process is realized by building a bench cluster and CICD server. The bench cluster uses the Master-Slave architecture for resource sharing and collaborative work, and the CICD server automatically manages the test process to reduce manual intervention and delivery. link.

Benefits of technology

It significantly shortens the testing cycle, improves software iteration efficiency and quality, reduces the risk of human errors, enhances the comprehensiveness and reliability of testing, promotes team collaboration and communication, and ensures the timeliness and accuracy of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118838313A_ABST
    Figure CN118838313A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of integration testing, in particular to a continuous integration testing system and method for HIL testing. Comprising the steps that a rack cluster is constructed, the rack cluster comprises a plurality of HIL test racks, an upper computer host of each rack serves as a Slave node, and one host serves as a Master node; deploying a CICD server, including creating a project, configuring project source code management, connecting to a code warehouse, and configuring a warehouse URL and an access credential; defining a test case, compiling a test script, and ensuring that the test script can cover key functions and exception handling; setting a trigger, and writing a trigger script; and executing an automatic test. According to the technical scheme, the software iteration efficiency can be improved, and unnecessary transmission links are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated testing, and in particular to a continuous integrated testing system and method for HIL testing. Background Art

[0002] In the development and testing process of automotive electronic control units (ECUs), especially in the mature product stage, there are extremely high requirements for the software quality and iteration efficiency of the controller. The traditional software development and testing process often adopts a serial mode, that is, it is carried out step by step in a predetermined order, including multiple links such as change introduction (review and finalization), software development, software release, and HIL (hardware in the loop) testing. Although the standardization and traceability of the development process are guaranteed to a certain extent, some problems and defects are also exposed.

[0003] The process transfer efficiency in the traditional iterative method is low. The connection between each stage often relies on manual intervention and communication, which not only increases the delay of information transfer, but also may cause distortion or omission of information during the transfer process. For example, after the software development is completed, the software needs to be manually released to the test team, and the test team will then conduct HIL testing based on the new version of the software. The time waste and communication costs in this process cannot be ignored.

[0004] Secondly, human communication is costly. In the traditional iterative model, collaboration between different departments or teams is highly dependent on effective communication between people. However, in actual operations, since team members may be distributed in different geographical locations or have different professional backgrounds, communication efficiency is often greatly limited. This not only increases the complexity of project management, but may also lead to project delays or quality problems due to poor communication.

[0005] In addition, the traditional iteration method also faces the problem of inconsistent test environment. Since the test team needs to build the test environment by themselves after receiving the software version, different testers or different test batches may have inconsistent test results due to environmental differences. This not only increases the difficulty and cost of testing, but also poses a potential threat to product quality and reliability. Summary of the invention

[0006] The purpose of the present invention is to propose a continuous integration testing method and system for HIL testing, which can improve software iteration efficiency and reduce unnecessary transfer links.

[0007] To achieve the above-mentioned purpose, in a first aspect, an embodiment of the present disclosure provides a continuous integration test method for HIL testing, including: constructing a test bench cluster, wherein the test bench cluster includes a plurality of HIL test benches, using a host computer of each test bench as a slave node, and using one of the hosts as a master node; Deploy CICD server, including: create project, configure project source code management, connect to code repository, configure repository URL and access credentials; define test cases, write test scripts, ensure that test scripts can cover key functions and exception handling; set triggers and write trigger scripts; Perform automated testing.

[0008] Beneficial effects of the basic solution: By building a test bench cluster, tests can be performed on multiple HIL test benches in parallel, greatly shortening the test cycle. Compared with a single test device, clustered testing can significantly speed up the test progress. Each test bench in the test bench cluster realizes resource sharing and collaborative work through the Master-Slave architecture, which improves the utilization of hardware resources. The Master node is responsible for task scheduling and coordination, while the Slave node focuses on executing specific test tasks. As the test needs increase, more HIL test benches can be flexibly added to the test bench cluster to meet larger-scale testing needs.

[0009] The writing and execution of automated test scripts reduces manual intervention and the risk of human error, while improving the repeatability and reliability of testing. Test scripts can ensure that key functions and exception handling are fully tested, thereby improving the comprehensiveness and coverage of testing.

[0010] In addition, the use of CICD servers makes the testing process more transparent. Team members can view the testing progress and results in real time, promoting team collaboration and communication.

[0011] This technical solution reduces manual intervention and delivery links through automated integration and testing processes, and improves the efficiency and quality of software iteration. This method ensures the timeliness and accuracy of testing by automating the allocation and execution of test tasks, thereby accelerating the software development cycle.

[0012] As an implementable optimal solution, building a test bench cluster also requires ensuring that all test benches and hosts are connected to the same local area network, installing control software on the Master node, and installing HIL test software on the Slave node.

[0013] As an implementable preferred solution, the test bench cluster includes five HIL test benches, namely a VCU test bench, a BMS test bench, an IBS test bench, a T-BOX test bench and an OBC test bench; The host computer of the VCU test bench is named Slave1, the host computer of the BMS test bench is named Slave2, the host computer of the IBS test bench is named Slave3, the host computer of the T-BOX test bench is named Slave4, and the host computer of the OBC test bench is named Slave5.

[0014] As an implementable preferred solution, deploying a CICD server also includes: Evaluate the server's performance indicators according to project requirements, select a server with sufficient performance as the CICD server, and install the operating system; install CI / CD tools, configure the tool environment, install plug-ins, and configure user permissions.

[0015] As an implementable preferred solution, deploying a CICD server also includes: Configure the test report generation tool; configure the mail server and mail sending rules to send the test report.

[0016] As a feasible and preferred solution, perform automated testing, including: Assign test tasks to the Slave node; after receiving the test tasks, the Slave node executes the automated test script; records the test results and generates a test report; uploads the test report to the Master node, and the Master node publishes the test results.

[0017] As a feasible and preferred solution, the test tasks are assigned, including: Define task allocation rules on the Master node to ensure that different types of test tasks can be automatically assigned to corresponding Slave nodes; after the Master node receives the trigger signal, it assigns the test task to the corresponding Slave node according to the project definition.

[0018] In a second aspect, an embodiment of the present disclosure further provides a continuous integration test system for HIL testing, which utilizes the above-mentioned continuous integration test method for HIL testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A logical diagram of the preparation phase of a continuous integration testing approach for HIL testing.

[0020] Figure 2 The figure is a logic diagram of the testing phase of a continuous integration testing method for HIL testing.

[0021] Figure 3 Schematic diagram of the architecture of a rack cluster according to an embodiment of the present invention.

[0022] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the technical solution and advantages of the present application clearer, the technical solution of the present invention will be further described in detail below in conjunction with the accompanying drawings. It will be understood that the specific embodiments described herein are only partial embodiments of the present invention, which are only used to explain the present application, rather than to limit the present application. It should be noted that the technical features or combinations of technical features described in the following embodiments should not be considered isolated, and they can be combined with each other to achieve better technical effects. The same reference numerals appearing in the drawings of the following embodiments represent the same features or components, which can be applied to different embodiments.

[0024] In addition, unless otherwise defined, the technical terms or scientific terms used in the description of the present invention should have the common meanings understood by those skilled in the art in the art to which the present invention belongs.

[0025] The present invention is further described in detail below in conjunction with the accompanying drawings: Reference numerals: electronic device 500 , processor 501 , communication interface 502 , memory 503 , bus 504 .

[0026] Reference Figure 1 and Figure 2 , a continuous integration testing method for HIL testing, comprising: Step S100, refer to Figure 3 , build a test bench cluster, including: Step S101, prepare hardware resources, including several HIL test benches. This embodiment includes five HIL test benches, namely VCU (Vehicle Control Unit), BMS (Battery Management System), IBS (Intelligent battery system), T-BOX (Telematics Box), OBC (On-Board Charger), among which five host computers serve as Slave nodes, and one of the hosts serves as Master node.

[0027] Step S102, ensure that all test benches and hosts are connected to the same local area network, configure network addresses, and ensure that the Master and Slave nodes can communicate with each other.

[0028] Step S103, install control software, such as LabVIEW, on the Maser node, install corresponding HIL test software, such as CANoe or INCA, on the Slave node, configure the HIL test software, set network communication parameters, and ensure that control instructions from the Master node can be received.

[0029] Step S104, name the VCU test bench host computer Slave1, the BMS test bench host computer Slave2, the IBS test bench host computer Slave3, the T-BOX test bench host computer Slave4, and the OBC test bench host computer Slave5.

[0030] Step S200, deploying a CICD server. The core concept of CICD is to frequently integrate code into a shared master branch, automatically verify the quality of the code, and then automatically deliver or deploy the code to the production environment, thereby accelerating the software development cycle and improving software quality. Specifically, it includes: Step S201, evaluate the performance indicators of the server according to the project requirements, select a server with sufficient performance as the CICD server, and install an operating system such as Linux or Windows Server.

[0031] Step S202, install Jenkins or other CI / CD tools, configure the Jenkins environment, install necessary plug-ins, such as Git plug-in and Maven plug-in, etc., configure user permissions, and ensure that different users have appropriate access and operation permissions.

[0032] Step S203, create a project, define the project name and description, select the appropriate project type, configure project source code management, connect to the code repository (such as Git), and configure the repository URL and access credentials.

[0033] Step S204, define test cases, including test steps, expected results, etc. Use Python, shell, etc. to write test scripts to ensure that the test scripts can cover key functions and exception handling.

[0034] Step S205, configure a trigger, such as a Webhook or a scheduled task, write a trigger script, and trigger the test task when the software package is published to the specified location of the server.

[0035] Step S206, configure a test report generation tool, such as ALLure or the test report plug-in provided by Jenkins. Configure a mail server, such as an SMTP server, for sending test reports, and configure mail sending rules to ensure that the test reports can be automatically sent to relevant personnel.

[0036] Step S300, Slave and the corresponding test bench perform automated testing.

[0037] Step S301, assigning test tasks, specifically includes: Step S201-1, define the task allocation rules on the Master node to ensure that different types of test tasks can be automatically allocated to the corresponding Slave nodes. For example, if the VCU software package is released, the Master will allocate the task to Slave1.

[0038] Step S201-2: After receiving the trigger signal, the Master node allocates the test task to the corresponding Slave node according to the project definition to realize automatic task allocation.

[0039] Step S302: After receiving the test task, the slave node executes the automated test script, records the test results, and generates a test report.

[0040] Step S303, after the Slave node completes the test, it uploads the test report to the Master node using SCP, FTP or other file transfer protocols.

[0041] Step S304: The Master publishes the test results. After receiving the test report, the Master node analyzes and organizes it and sends the test results to relevant personnel using a mail server.

[0042] The disclosed embodiment also provides a continuous integration test system for HIL testing, which uses the above-mentioned continuous integration test method for HIL testing.

[0043] The embodiment of the present disclosure further provides a storage medium, in which a computer program is stored. When the computer program is executed by a processor, all steps of the above-mentioned continuous integration test method of HIL test can be implemented.

[0044] Those of ordinary skill in the art can understand that all or part of the process in a continuous integration test method for a HIL test can be completed by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the process of each embodiment of a continuous integration test method for a HIL test. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0045] The embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned continuous integration test method of HIL test when executing the program. In the embodiment of the present application, the processor is the control center of the computer system, which can be the processor of a physical machine or the processor of a virtual machine.

[0046] Reference Figure 4, the electronic device 500 includes: at least one processor 501, at least one communication interface 502, at least one memory 503 and at least one bus 504. Among them, the bus 504 is used to realize the connection and communication between these components, the communication interface 502 is used to communicate with other node devices for signaling or data, and the memory 503 stores machine-readable instructions executable by the processor 501. When the electronic device 500 is running, the processor 501 communicates with the memory 503 through the bus 504, and when the machine-readable instructions are called by the processor 501, the steps of the continuous integration test method of the HIL test described above are executed. The above content is only an embodiment of the present invention, and the common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the ordinary technical knowledge in the technical field of the invention before the application date or priority date, can know all the existing technologies in the field, and have the ability to apply the conventional experimental means before the date. The ordinary technicians in the relevant field can improve and implement the present scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for the ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the structure of the present invention, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.

Claims

1. A continuous integration test method for HIL testing, characterized in that: include: Construct a test bench cluster, which includes several HIL test benches, using the host computer of each test bench as a slave node and one of the hosts as a master node; Deploy CICD server, including: create project, configure project source code management, connect to code repository, configure repository URL and access credentials; define test cases, write test scripts, ensure that test scripts can cover key functions and exception handling; set triggers and write trigger scripts; Perform automated testing.

2. The continuous integration test method of HIL test according to claim 1, characterized in that: To build a test bench cluster, you also need to ensure that all test benches and hosts are connected to the same local area network, install the control software on the Master node, and install the HIL test software on the Slave node.

3. The continuous integration test method of HIL test according to claim 1, characterized in that: The test bench cluster includes five HIL test benches, namely, a VCU test bench, a BMS test bench, an IBS test bench, a T-BOX test bench and an OBC test bench; The host computer of the VCU test bench is named Slave1, the host computer of the BMS test bench is named Slave2, the host computer of the IBS test bench is named Slave3, the host computer of the T-BOX test bench is named Slave4, and the host computer of the OBC test bench is named Slave5.

4. The continuous integration test method of HIL test according to claim 1, characterized in that: Deployment of CICD server also includes: Evaluate the server's performance indicators according to project requirements, select a server with sufficient performance as the CICD server, and install the operating system; install CI / CD tools, configure the tool environment, install plug-ins, and configure user permissions.

5. The continuous integration test method of HIL test according to claim 4, characterized in that: Deployment of CICD server also includes: Configure the test report generation tool; configure the mail server and mail sending rules to send the test report.

6. The continuous integration test method of HIL test according to claim 1, characterized in that: Perform automated testing, including: Assign test tasks to the Slave node; after receiving the test tasks, the Slave node executes the automated test script; records the test results and generates a test report; uploads the test report to the Master node, and the Master node publishes the test results.

7. The continuous integration test method of HIL test according to claim 1, characterized in that: Assign testing tasks, including: Define task allocation rules on the Master node to ensure that different types of test tasks can be automatically assigned to corresponding Slave nodes; after the Master node receives the trigger signal, it assigns the test task to the corresponding Slave node according to the project definition.

8. A continuous integration test system for HIL testing, characterized in that: A continuous integration testing method for HIL testing as described in any one of claims 1 to 7 is used.

Citation Information

Cited By

  • Communication method and system for cooperative calling of multiple upper computers in HIL automatic test

    CN121559936A