HIL test system and test method thereof
Through the automated communication and management of the HIL test module and the HIL bench cluster, the problems of waste of resources and inefficiency of the existing HIL test system are solved, and an efficient and accurate test process is achieved to adapt to the needs of rapid software iteration.
Patent Information
- Application Number
- CN202411390207.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-17
AI Technical Summary
The existing HIL testing system relies on local operations, resulting in wasted testing resources and inefficiency. Human factors may lead to errors and omissions, making it difficult to quickly adapt to the increase in testing tasks brought about by software iteration.
A HIL testing system is designed to communicate with the HIL bench cluster through the HIL test module, automatically identify and allocate the target HIL bench, transmit test sequences and instructions, execute tests and generate reports, reduce human factors, and achieve automation and efficient management.
It improves the flexibility and convenience of testing, reduces testing costs, reduces errors and omissions, adapts to the increase in testing tasks brought about by rapid software iteration, and improves testing efficiency and accuracy.
Smart Images

Figure CN119322753A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing technology, and in particular to a HIL testing system and a testing method thereof. Background Art
[0002] The current product software development in the automotive industry requires not only faster speed, but also higher quality of software testing. In particular, software development usually goes through multiple iterations, and how to quickly test and verify each iteration has become a difficult problem that needs to be solved. Therefore, in order to verify whether the product software meets the requirements, the HIL (Hardware-In-The-Loop) platform can usually be used to simulate the controlled object for testing and verification to ensure the stability and reliability of the software.
[0003] Currently, the testing of HIL test systems mainly relies on local operations, which leads to problems of waste of test resources and low efficiency. In addition, human factors may lead to errors and omissions, such as incorrect compilation options and missing test configuration information. Summary of the invention
[0004] In view of this, the present invention provides a HIL test system and a test method thereof to solve the problems of the existing HIL test system, which relies on local operation and has the waste of test resources and low efficiency.
[0005] In a first aspect, the present invention provides a HIL test system, the system comprising: a HIL test bench cluster and an electronic device, wherein the electronic device is communicatively connected with each HIL test bench in the HIL test bench cluster, wherein the electronic device comprises: a HIL test module, wherein:
[0006] The HIL test module is used to obtain the sequence to be tested, identify the name of the sequence to be tested, determine the target HIL test bench from the HIL test bench cluster, transmit the sequence to be tested to the target HIL test bench, and send a test instruction to the target HIL test bench;
[0007] The target HIL bench is used to identify the content of the sequence to be tested and determine the test content corresponding to the sequence to be tested after receiving the sequence to be tested and the test instructions; determine the target test software corresponding to the sequence to be tested according to the test content; based on the target test software, execute the test instructions on the target HIL bench to test the sequence to be tested, and generate a test report corresponding to the sequence to be tested.
[0008] In the HIL test system provided by the embodiment of the present application, the HIL test module obtains the sequence to be tested, identifies the name of the sequence to be tested, and determines the target HIL bench from the HIL bench cluster, thereby ensuring the accuracy of the determined target HIL bench, so that the user does not need to manually assign the target HIL bench to the sequence to be tested. The sequence to be tested is transmitted to the target HIL bench, and the test instructions are sent to the target HIL bench, so that the user does not need to input the sequence to be tested into the target HIL bench before arriving at the target HIL bench. After the target HIL bench receives the sequence to be tested and the test instructions, it identifies the content of the sequence to be tested and determines the test content corresponding to the sequence to be tested, thereby ensuring the accuracy of the determined test content. According to the test content, the target test software corresponding to the sequence to be tested is determined, thereby ensuring the accuracy of the determined target test software. Based on the target test software, the test instructions are executed on the target HIL bench, the sequence to be tested is tested, and a test report corresponding to the sequence to be tested is generated, thereby ensuring the accuracy of the generated test report corresponding to the sequence to be tested. The above HIL test system reduces errors and omissions that may be caused by human factors. In addition, there is no need for engineering testers to assign the test sequences to each HIL test bench, and there is no need for engineering testers to go to the test site. Therefore, it can also adapt to the rapid increase in test tasks brought about by rapid software iteration, which improves the flexibility and convenience of testing and further reduces the cost of testing.
[0009] In an optional implementation, the electronic device further includes: a version control module, wherein:
[0010] The target HIL bench is used to identify the content corresponding to the sequence to be tested, determine the target version of the target test software required to test the sequence to be tested; identify the current version of the target test software; if the current version is inconsistent with the target version, transmit the version information of the target version corresponding to the target test software to the HIL test module of the electronic device;
[0011] The HIL test module is used to obtain the installation package corresponding to the target test software of the target version from the version control module, and transmit the installation package to the target HIL test bench;
[0012] The target HIL bench is used to update the current version of the target test software to the target version based on the installation package.
[0013] The HIL test system provided by the embodiment of the present application, the target HIL bench identifies the content corresponding to the sequence to be tested, determines the target version of the target test software required to test the sequence to be tested, and ensures the accuracy of the target version corresponding to the determined target test software. The current version of the target test software is identified to ensure the accuracy of the identification result. If the current version is inconsistent with the target version, the version information of the target version corresponding to the target test software is transmitted to the HIL test module of the electronic device, so that the installation package corresponding to the target test software of the target version can be obtained based on the HIL test module. The HIL test module is used to obtain the installation package corresponding to the target test software of the target version from the version control module, and transmit the installation package to the target HIL bench; the target HIL bench is used to update the current version of the target test software to the target version based on the installation package, so that the target HIL bench can test the sequence to be tested based on the target test software of the target version, thereby ensuring the accuracy of the test of the sequence to be tested.
[0014] In an optional implementation, the HIL test module is further configured to wait for the target HIL bench to complete the test, generate a test report corresponding to the sequence to be tested, and after the test report corresponding to the sequence to be tested is transmitted back to the HIL test module, detect whether the sequence to be tested exists in the version control module;
[0015] If the sequence to be tested does not exist in the version control module, the sequence to be tested is stored in the version control module.
[0016] The HIL test system and HIL test module provided in the embodiment of the present application are also used to complete the test of the target HIL bench, generate a test report corresponding to the sequence to be tested, and after transmitting the test report corresponding to the sequence to be tested back to the HIL test module, detect whether there is a sequence to be tested in the version control module; if the sequence to be tested does not exist in the version control module, the sequence to be tested is stored in the version control module, so that the test sequence in the version control module can be updated, and the test sequence can be managed, which is convenient for extracting and testing the test sequence next time, thereby improving the efficiency of the HIL test.
[0017] In an optional implementation, the HIL test module is further configured to receive a test report corresponding to the sequence to be tested sent by the target HIL bench, and send the test report to the version control module;
[0018] The version control module is also used to identify the test report corresponding to the sequence to be tested, determine the category of the test report corresponding to the sequence to be tested, and store the test report together with other test reports of the same category according to the category of the test report.
[0019] The HIL test module of the HIL test system provided in the embodiment of the present application is also used to receive the test report corresponding to the sequence to be tested sent by the target HIL bench, and send the test report to the version control module, so that the test report can be stored. The version control module is also used to identify the test report corresponding to the sequence to be tested, determine the category of the test report corresponding to the sequence to be tested; according to the category of the test report, the test report is stored together with other test reports of the same category, thereby realizing effective management of the test report and facilitating query and tracing of the test report.
[0020] In an optional embodiment, the HIL test module is used to identify the name of the sequence to be tested and determine the test type corresponding to the sequence to be tested; determine at least one candidate HIL test bench corresponding to the sequence to be tested from the HIL test bench cluster according to the test type; and determine the target HIL test bench from each candidate HIL test bench.
[0021] The HIL test system and HIL test module provided in the embodiment of the present application are used to identify the name of the sequence to be tested and determine the test type corresponding to the sequence to be tested; determine at least one candidate HIL test bench corresponding to the sequence to be tested from the HIL test bench cluster according to the test type; determine the target HIL test bench from each candidate HIL test bench, thereby ensuring the accuracy of the determined target HIL test bench and avoiding inaccurate test report obtained by testing the sequence to be tested due to inaccurate target HIL test bench.
[0022] In an optional implementation, the HIL test module is used to obtain the current resource occupancy rate corresponding to each candidate HIL test bench and the number of pending tests in the message queue corresponding to each candidate HIL test bench; and determine the target HIL test bench from the candidate HIL test benches according to the current resource occupancy rate and the number of pending tests corresponding to each candidate HIL test bench.
[0023] The HIL test system and HIL test module provided in the embodiment of the present application are used to obtain the current resource occupancy rate corresponding to each candidate HIL test bench and the number of pending tests in the message queue corresponding to each candidate HIL test bench; according to the current resource occupancy rate and the number of pending tests corresponding to each candidate HIL test bench, the target HIL test bench is determined from each candidate HIL test bench. The accuracy of the determined target HIL test bench is ensured, and the normal operation of the target HIL test bench is avoided from being affected.
[0024] In an optional implementation, the test instruction includes the test execution time; wherein:
[0025] The HIL test module is also used to detect whether the received file information sent by the target HIL bench is received within a preset time after the sequence to be tested is transmitted to the target HIL bench;
[0026] If the received file information sent by the target HIL bench is received within the preset time, the sequence to be tested is identified and the test execution time corresponding to the sequence to be tested is determined;
[0027] Based on the test execution time, test instructions are sent to the target HIL bench.
[0028] The HIL test system and HIL test module provided in the embodiment of the present application are also used to detect whether the received file information sent by the target HIL bench is received within the preset time after the sequence to be tested is transmitted to the target HIL bench; if the received file information sent by the target HIL bench is received within the preset time, the sequence to be tested is identified, and the test execution time corresponding to the sequence to be tested is determined, thereby ensuring the accuracy of the test execution time corresponding to the determined sequence to be tested. Based on the test execution time, a test instruction is sent to the target HIL bench, thereby ensuring that the target HIL bench can receive the test instruction, and then the test of the sequence to be tested can be completed according to the test instruction.
[0029] In an optional implementation, the HIL test module is further configured to send detection connection status information to the target HIL stand if the received file information sent by the target HIL stand is not received within a preset time;
[0030] If the connection status normal information sent by the target HIL rack is received, it is determined that the connection status with the target HIL rack is normal, and the sequence to be tested is sent to the target HIL rack again;
[0031] If the normal connection status information sent by the target HIL rack is not received, another candidate HIL rack other than the target HIL rack is determined from the candidate HIL racks again; the sequence to be tested is transmitted to the candidate HIL rack, and a test instruction is sent to the candidate HIL rack.
[0032] The HIL test system and the HIL test module provided in the embodiment of the present application are also used to send connection status detection information to the target HIL bench if the received file information sent by the target HIL bench is not received within the preset time, so that the connection status between the target HIL bench and the electronic device can be detected. If the normal connection status information sent by the target HIL bench is received, it is determined that the connection status with the target HIL bench is normal, and the sequence to be tested is sent to the target HIL bench again, so that the target HIL bench can receive the sequence to be tested. If the normal connection status information sent by the target HIL bench is not received, another alternative HIL bench other than the target HIL bench is determined from the candidate HIL bench again; the sequence to be tested is transmitted to the alternative HIL bench, and a test instruction is sent to the alternative HIL bench, so that the sequence to be tested can be tested based on the alternative HIL bench.
[0033] In an optional implementation, the target HIL bench is used to obtain test data for testing the sequence to be tested, identify the test data, determine the test results corresponding to each test step in the sequence to be tested, record each test result, and generate a test report corresponding to the sequence to be tested.
[0034] The HIL test system and the target HIL test bench provided in the embodiment of the present application are used to obtain test data for testing the sequence to be tested, identify the test data, determine the test results corresponding to each test step in the sequence to be tested, and ensure the accuracy of the test results corresponding to each test step in the determined sequence to be tested. Each test result is recorded, and a test report corresponding to the sequence to be tested is generated, ensuring the accuracy of the generated test report.
[0035] In an optional implementation, the electronic device further includes: a mailbox management module, wherein:
[0036] The HIL test module is used to receive the test report sent by the target HIL test bench; the mailbox information of the target personnel corresponding to the sequence to be tested is obtained in the mailbox management module;
[0037] Based on the mailbox information, the test report is sent to the target mailbox of the target person.
[0038] The HIL test system provided in the embodiment of the present application, the HIL test module, is used to receive the test report sent by the target HIL bench; the mailbox information of the target person corresponding to the sequence to be tested is obtained in the mailbox management module, so as to ensure the accuracy of the mailbox information of the target person corresponding to the sequence to be tested. Based on the mailbox information, the test report is sent to the target mailbox of the target person, so that the target person can receive the test report corresponding to the sequence to be tested in time.
[0039] In a second aspect, the present invention provides a testing method, which is applied to an electronic device in a HIL testing system according to the first aspect and any one of the embodiments of the first aspect, and the method comprises:
[0040] Get the sequence to be tested;
[0041] Identify the name of the sequence to be tested and determine the target HIL test bench from the HIL test bench cluster in the HIL test system;
[0042] Transmit the sequence to be tested to the target HIL bench and send test instructions to the target HIL bench;
[0043] Receive the test report sent by the target HIL test bench.
[0044] The test method provided in the embodiment of the present application obtains the sequence to be tested, identifies the name of the sequence to be tested, determines the target HIL bench from the HIL bench cluster, and ensures the accuracy of the determined target HIL bench, so that the user does not need to manually assign the target HIL bench to the sequence to be tested. The sequence to be tested is transmitted to the target HIL bench, and the test instruction is sent to the target HIL bench, so that the user does not need to enter the sequence to be tested into the target HIL bench before arriving at the target HIL bench. So that after the target HIL bench receives the sequence to be tested and the test instruction, the test instruction is executed on the target HIL bench to test the sequence to be tested. Then, the test report sent by the target HIL bench is received. The accuracy of the test report corresponding to the received sequence to be tested is guaranteed. The above test method reduces the errors and omissions that may be caused by human factors. In addition, it is not necessary for engineering test personnel to assign the sequence to be tested to each HIL bench, and it is not necessary for engineering test personnel to go to the test site. Therefore, it can also adapt to the rapid increase of test tasks brought about by rapid software iteration, so that the flexibility and convenience of the test are improved, and the cost of the test is further reduced.
[0045] In a third aspect, the present invention provides a testing method, which is applied to a target HIL test bench in a HIL test bench cluster in a HIL test system according to the first aspect and any one of the embodiments of the first aspect, the method comprising:
[0046] Receiving a sequence to be tested and a test instruction sent from an electronic device in a HIL test system;
[0047] Identify the content of the sequence to be tested and determine the test content corresponding to the sequence to be tested;
[0048] Determine the target test software corresponding to the sequence to be tested according to the test content;
[0049] Based on the target test software, execute the test instructions on the target HIL bench, test the sequence to be tested, and generate the test report corresponding to the sequence to be tested;
[0050] Transfer test reports to electronic devices.
[0051] The test method provided by the embodiment of the present application is that the target HIL bench receives the sequence to be tested and the test instruction sent from the electronic device in the HIL test system. After the target HIL bench receives the sequence to be tested and the test instruction, it identifies the content of the sequence to be tested, determines the test content corresponding to the sequence to be tested, and ensures the accuracy of the determined test content. According to the test content, the target test software corresponding to the sequence to be tested is determined to ensure the accuracy of the determined target test software. Based on the target test software, the test instruction is executed on the target HIL bench, the sequence to be tested is tested, and a test report corresponding to the sequence to be tested is generated, ensuring the accuracy of the test report corresponding to the generated sequence to be tested. Then, the test report is transmitted to the electronic device. The above test method reduces the errors and omissions that may be caused by human factors. In addition, there is no need for engineering test personnel to assign the sequence to be tested to each HIL bench, and there is no need for engineering test personnel to go to the test site. Therefore, it can also adapt to the rapid increase of test tasks brought about by rapid software iteration, so that the flexibility and convenience of the test are improved, and the cost of the test is further reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 is a structural schematic diagram of a first HIL test system according to an embodiment of the present invention;
[0054] Figure 2 is a structural schematic diagram of a second HIL test system according to an embodiment of the present invention;
[0055] Figure 3 is a schematic structural diagram of a third HIL test system according to an embodiment of the present invention;
[0056] Figure 4 is a structural schematic diagram of a fourth HIL test system according to an embodiment of the present invention;
[0057] Figure 5 is a flow chart of a HIL testing method according to an embodiment of the present invention;
[0058] Figure 6 is a flow chart of another HIL testing method according to an embodiment of the present invention;
[0059] Figure 7 is a flow chart of a first testing method according to an embodiment of the present invention;
[0060] Figure 8 is a flow chart of a second testing method according to an embodiment of the present invention;
[0061] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0063] The present application embodiment provides a HIL test system, such as Figure 1 As shown, the system includes: a HIL test bench cluster and electronic equipment, wherein the electronic equipment is communicatively connected with each HIL test bench in the HIL test bench cluster, wherein the electronic equipment includes: a HIL test module, wherein:
[0064] The HIL test module is used to obtain the sequence to be tested, identify the name of the sequence to be tested, determine the target HIL test bench from the HIL test bench cluster, transmit the sequence to be tested to the target HIL test bench, and send a test instruction to the target HIL test bench;
[0065] The target HIL bench is used to identify the content of the sequence to be tested and determine the test content corresponding to the sequence to be tested after receiving the sequence to be tested and the test instructions; determine the target test software corresponding to the sequence to be tested according to the test content; based on the target test software, execute the test instructions on the target HIL bench to test the sequence to be tested, and generate a test report corresponding to the sequence to be tested.
[0066] Optionally, the HIL test module in the electronic device can receive the test task input by the user, and search the sequence to be tested from the storage space according to the test task. Optionally, the electronic device can also receive the sequence to be tested input by the user, and can also receive the sequence to be tested sent by other devices. The embodiment of the present application does not specifically limit the way in which the HIL test module obtains the HIL test module.
[0067] After acquiring the sequence to be tested, the HIL test module can identify the name of the sequence to be tested, and determine the target HIL test bench from the HIL test bench cluster according to the identification result. Then, the sequence to be tested is transmitted to the target HIL test bench, and a test instruction is sent to the target HIL test bench.
[0068] After receiving the sequence to be tested and the test instructions, the target HIL bench identifies the content of the sequence to be tested and determines the test content corresponding to the sequence to be tested. Then, according to the test content, the target test software corresponding to the sequence to be tested is determined. Based on the target test software, the test instructions are executed on the target HIL bench to test the sequence to be tested and generate a test report corresponding to the sequence to be tested.
[0069] The electronic device is installed with a CI software platform, wherein the CI software platform can be obtained by secondary software development of Jenkins. Figure 2 As shown in the figure, the CI software platform integrates the comprehensive management interface, email management interface, SVN configuration interface and HIL system test interface, and can manage tests, projects, testers, test tasks, HIL benches, test cases and test projects of automated tests, test results, etc.; and the CI software platform can statistically analyze test-related data and monitor the status of the HIL bench; test engineers do not need to go to the HIL bench site, they only need to submit the corresponding test tasks in the CI software platform, which can be automatically assigned to the HIL bench with the corresponding test function for automatic execution, and the test report results are sent back to the tester's email and the system software management interface through the email function and SSH communication function. If you need to update and iterate the test sequence and software code, you can use SVN configuration to pull and upload related update content.
[0070] Among them, the secondary software development of Jenkins is based on Python code research and development, and the software interface is developed based on Pyqt5 on the Pycharm platform. The CI software platform provides an interface calling function for calling other test software APIs, mainly through the API functions provided by Jenkins and the relevant operating software of the HIL system for integration and remote calling. In addition, the interface code, control code and main platform interface code are decoupled from each other. After the automatic iteration update and expansion of the platform software interface, the interface code can be automatically generated through the pyui5 module without affecting the operation of the software, achieving rapid development without affecting the stability of the software.
[0071] The integrated management interface of the integrated software is a Python-based Pyqt5 integrated development interface. The paramiko module is used to build an SFTP server, and the management and configuration interface of the HIL server files and local client files is implemented based on SSH communication.
[0072] The mailbox management interface of the integrated software is mainly based on Python's Pyqt5 integrated development interface and is developed using the paramiko module to realize the mailbox sending function. At the same time, the development of this function uses a fixed internal Foxmail mailbox as the mailbox for sending emails to ensure the security of files. The mailboxes required to receive emails can be added and configured in the interface. After the test task is completed, the mailbox function is automatically called by the test code to realize the mailbox sending feedback function of the test results.
[0073] The SVN configuration interface is mainly based on Python's Pyqt5 integrated development interface, and uses the SVN module to update and iterate test sequences and software codes.
[0074] The HIL system test interface is mainly based on Python's Pyqt5 integrated development interface. On the one hand, it integrates and calls the API of the corresponding HIL configuration software, and on the other hand, it calls the test sequence of the comprehensive management interface. At the same time, it packages the test configuration and the corresponding required test sequence and deploys it to the HIL device with one click to execute the test.
[0075] The permission management function for testers is a software login management interface developed based on Jenkins' user management system. It can configure the permissions required by administrators, ordinary users and visitors respectively, and complete functions such as login and operation restrictions on software users.
[0076] Statistical analysis of test-related data and monitoring of HIL bench status are based on the console operation information output of the HIL bench server and the information feedback of the control software of the HIL equipment as the data source of monitoring and analysis data, thereby extracting communication status data, deployment process status, deployment results, test success and other information.
[0077] The remote deployment function is implemented based on the Node connection method of the Jenkins server. The environment of this connection needs to be configured based on the java17 environment to achieve automated deployment of HIL test scripts.
[0078] In the HIL test system provided by the embodiment of the present application, the HIL test module obtains the sequence to be tested, identifies the name of the sequence to be tested, and determines the target HIL bench from the HIL bench cluster, thereby ensuring the accuracy of the determined target HIL bench, so that the user does not need to manually assign the target HIL bench to the sequence to be tested. The sequence to be tested is transmitted to the target HIL bench, and the test instructions are sent to the target HIL bench, so that the user does not need to input the sequence to be tested into the target HIL bench before arriving at the target HIL bench. After the target HIL bench receives the sequence to be tested and the test instructions, it identifies the content of the sequence to be tested and determines the test content corresponding to the sequence to be tested, thereby ensuring the accuracy of the determined test content. According to the test content, the target test software corresponding to the sequence to be tested is determined, thereby ensuring the accuracy of the determined target test software. Based on the target test software, the test instructions are executed on the target HIL bench, the sequence to be tested is tested, and a test report corresponding to the sequence to be tested is generated, thereby ensuring the accuracy of the generated test report corresponding to the sequence to be tested. The above-mentioned HIL test system reduces errors and omissions that may be caused by human factors. In addition, there is no need for engineering testers to assign the test sequences to each HIL test bench, and there is no need for engineering testers to go to the test site. Therefore, it can also adapt to the rapid increase in test tasks brought about by the rapid iteration of software, thereby improving the flexibility and convenience of testing and further reducing the cost of testing.
[0079] In an optional embodiment of the present application, Figure 3 As shown, the electronic device also includes: a version control module, wherein:
[0080] The target HIL bench is used to identify the content corresponding to the sequence to be tested, determine the target version of the target test software required to test the sequence to be tested; identify the current version of the target test software; if the current version is inconsistent with the target version, transmit the version information of the target version corresponding to the target test software to the HIL test module of the electronic device;
[0081] The HIL test module is used to obtain the installation package corresponding to the target test software of the target version from the version control module, and transmit the installation package to the target HIL test bench;
[0082] The target HIL bench is used to update the current version of the target test software to the target version based on the installation package.
[0083] Specifically, after receiving the sequence to be tested and the test instructions, the target HIL bench can identify the content corresponding to the sequence to be tested and determine the target version of the target test software required to test the sequence to be tested. Then, the target HIL bench identifies the current version of the target test software; if the current version is inconsistent with the target version, the version information of the target version corresponding to the target test software is transmitted to the HIL test module of the electronic device.
[0084] Exemplarily, the target HIL bench determines that the target version of the target test software required to test the sequence to be tested is version 4.0. The current version of the target test software is identified and determined to be version 3.0. If the current version is inconsistent with the target version, the target HIL bench transmits the version information of the target version corresponding to the target test software to the HIL test module of the electronic device.
[0085] The HIL test module can search for the installation package corresponding to the target version of the target test software from the version control module, and then transfer the installation package to the target HIL bench. The version control module stores installation packages of multiple versions of multiple software.
[0086] After receiving the installation package, the target HIL bench installs the target version of the target test software based on the installation package, thereby updating the current version of the target test software to the target version.
[0087] Among them, it should be noted that the CI software platform loaded in the electronic device provides multiple integrated interfaces, and by integrating multiple HIL-related test software APIs, multiple test software configurations can be set up in one interface and generate configuration files. Even in the case of continuous updates and iterations of HIL test software, as long as the corresponding functions of the called APIs remain unchanged, the CI software platform can still automatically adapt when adding new HIL test-related software, which shows that the platform still has flexible adaptability in the market where test software is constantly changing.
[0088] In addition, the CI software platform can set any time period within a day for one-click deployment testing based on the configuration file, avoiding lengthy, complex and diverse software configuration processes and software operations. At the same time, the configuration file automatically calls SVN, test software, mailbox and other functions in a sequential structure, allowing the CI software platform to form an automatic test loop, greatly improving the efficiency of the test.
[0089] In addition, the CI software platform is not only suitable for Windows systems, but also for testing local computers with Unix systems. However, it is necessary to first deploy and install the SSH connection in the Unix system, which improves the applicability of remote deployment systems.
[0090] The HIL test system provided by the embodiment of the present application, the target HIL bench identifies the content corresponding to the sequence to be tested, determines the target version of the target test software required to test the sequence to be tested, and ensures the accuracy of the target version corresponding to the determined target test software. The current version of the target test software is identified to ensure the accuracy of the identification result. If the current version is inconsistent with the target version, the version information of the target version corresponding to the target test software is transmitted to the HIL test module of the electronic device, so that the installation package corresponding to the target test software of the target version can be obtained based on the HIL test module. The HIL test module is used to obtain the installation package corresponding to the target test software of the target version from the version control module, and transmit the installation package to the target HIL bench; the target HIL bench is used to update the current version of the target test software to the target version based on the installation package, so that the target HIL bench can test the sequence to be tested based on the target test software of the target version, thereby ensuring the accuracy of the test of the sequence to be tested.
[0091] In an optional embodiment of the present application, the HIL test module is further used to wait for the target HIL bench to complete the test, generate a test report corresponding to the sequence to be tested, and after the test report corresponding to the sequence to be tested is returned to the HIL test module, detect whether there is a sequence to be tested in the version control module;
[0092] If the sequence to be tested does not exist in the version control module, the sequence to be tested is stored in the version control module.
[0093] Specifically, after the target HIL bench completes the test, generates a test report corresponding to the sequence to be tested, and transmits the test report corresponding to the sequence to be tested back to the HIL test module, the test report corresponding to the sequence to be tested can be sent to the HIL test module in the electronic device. After receiving the test report corresponding to the sequence to be tested, the HIL test module can query the sequence to be tested from the version control module. If the sequence to be tested is queried, it is determined that the sequence to be tested exists in the version control module; if the sequence to be tested is not queried, it is determined that the sequence to be tested does not exist in the version control module, and the sequence to be tested is stored in the version control module.
[0094] The HIL test system and HIL test module provided in the embodiment of the present application are also used to complete the test of the target HIL bench, generate a test report corresponding to the sequence to be tested, and after transmitting the test report corresponding to the sequence to be tested back to the HIL test module, detect whether there is a sequence to be tested in the version control module; if the sequence to be tested does not exist in the version control module, the sequence to be tested is stored in the version control module, so that the test sequence in the version control module can be updated, and the test sequence can be managed, which is convenient for extracting and testing the test sequence next time, thereby improving the efficiency of the HIL test.
[0095] Optionally, the HIL test module is further used to receive a test report corresponding to the sequence to be tested sent by the target HIL bench, and send the test report to the version control module;
[0096] The version control module is also used to identify the test report corresponding to the sequence to be tested, determine the category of the test report corresponding to the sequence to be tested, and store the test report together with other test reports of the same category according to the category of the test report.
[0097] Specifically, the HIL test module receives a test report corresponding to the sequence to be tested sent by the target HIL bench, and after receiving the test report, the test report may be stored in the version control module.
[0098] The version control module identifies the test report corresponding to the sequence to be tested, determines the category of the test report corresponding to the sequence to be tested, and stores the test report together with other test reports of the same category according to the category of the test report.
[0099] Exemplarily, the version control module can store the test reports corresponding to the same test sequence together, identify the test reports, and determine the category of the test report corresponding to the sequence to be tested, where the category can include test success, test failure, and can also be divided into multiple subcategories according to the cause of the test failure.
[0100] The HIL test system and HIL test module provided in the embodiment of the present application are also used to receive the test report corresponding to the sequence to be tested sent by the target HIL bench, and send the test report to the version control module, so that the test report can be stored. The version control module is also used to identify the test report corresponding to the sequence to be tested and determine the category of the test report corresponding to the sequence to be tested; according to the category of the test report, the test report is stored together with other test reports of the same category, thereby achieving effective management of the test report and facilitating query and tracing of the test report.
[0101] In an optional embodiment of the present application, the HIL test module is used to identify the name of the sequence to be tested and determine the test type corresponding to the sequence to be tested; according to the test type, determine at least one candidate HIL test bench corresponding to the sequence to be tested from the HIL test bench cluster; and determine the target HIL test bench from each candidate HIL test bench.
[0102] Specifically, the HIL test module can identify the name of the sequence to be tested and determine the test type corresponding to the sequence to be tested. Then, according to the test type, at least one candidate HIL test bench corresponding to the sequence to be tested is determined from the HIL test bench cluster. Then, each candidate HIL test bench is identified, and according to the identification result, a target HIL test bench is determined from each candidate HIL test bench.
[0103] Optionally, the HIL test module is used to obtain the current resource occupancy rate corresponding to each candidate HIL test bench and the number of pending tests in the message queue corresponding to each candidate HIL test bench; determine the target HIL test bench from the candidate HIL test benches according to the current resource occupancy rate and the number of pending tests corresponding to each candidate HIL test bench.
[0104] Specifically, the HIL test module can identify the current resource occupancy rate corresponding to each candidate HIL rack, determine the current resource occupancy rate corresponding to each candidate HIL rack and the number of pending tests in the message queue corresponding to each candidate HIL rack. Then, the message queue corresponding to each candidate HIL rack is identified, and the number of pending tests in the message queue corresponding to each candidate HIL rack is determined.
[0105] Optionally, the HIL test module may sort the candidate HIL racks in ascending order according to the current resource occupancy rates corresponding to the candidate HIL racks, and then determine the top N candidate HIL racks. Then, from the top N candidate HIL racks, the candidate HIL rack with the least number of pending tests in the message queue is determined as the target HIL rack.
[0106] Optionally, the HIL test module may sort the candidate HIL racks according to the number of pending tests in the message queue corresponding to each candidate HIL rack from small to large, and then determine the top N candidate HIL racks. Then, the candidate HIL rack with the smallest current resource occupancy rate is determined as the target HIL rack from the top N candidate HIL racks.
[0107] The HIL test system provided by the embodiment of the present application includes a HIL test module, which is used to identify the name of the sequence to be tested and determine the test type corresponding to the sequence to be tested; according to the test type, at least one candidate HIL test bench corresponding to the sequence to be tested is determined from the HIL test bench cluster; the HIL test module is also used to detect whether the received file information sent by the target HIL test bench is received within a preset time after the sequence to be tested is transmitted to the target HIL test bench; if the received file information sent by the target HIL test bench is received within the preset time, the sequence to be tested is identified and the test execution time corresponding to the sequence to be tested is determined, thereby ensuring the accuracy of the test execution time corresponding to the determined sequence to be tested. Based on the test execution time, a test instruction is sent to the target HIL test bench, thereby ensuring that the target HIL test bench can receive the test instruction, and then the test of the sequence to be tested can be completed according to the test instruction.
[0108] In an optional implementation manner of the present application, the test instruction includes a test execution time; wherein:
[0109] The HIL test module is also used to detect whether the received file information sent by the target HIL bench is received within a preset time after the sequence to be tested is transmitted to the target HIL bench;
[0110] If the received file information sent by the target HIL bench is received within the preset time, the sequence to be tested is identified and the test execution time corresponding to the sequence to be tested is determined;
[0111] Based on the test execution time, test instructions are sent to the target HIL bench.
[0112] The HIL test module is further configured to send detection connection status information to the target HIL test bench if the received file information sent by the target HIL test bench is not received within a preset time;
[0113] If the connection status normal information sent by the target HIL rack is received, it is determined that the connection status with the target HIL rack is normal, and the sequence to be tested is sent to the target HIL rack again;
[0114] If the normal connection status information sent by the target HIL rack is not received, another candidate HIL rack other than the target HIL rack is determined from the candidate HIL racks again; the sequence to be tested is transmitted to the candidate HIL rack, and a test instruction is sent to the candidate HIL rack.
[0115] Specifically, after the HIL test module transmits the sequence to be tested to the target HIL test bench, it can perform timing based on a timer to detect whether the received file information sent by the target HIL test bench is received within a preset time.
[0116] In one case, if the received file information sent by the target HIL bench is received within the preset time, the HIL test module determines that the current communication connection with the target HIL bench is normal. Then, the HIL test module can identify the sequence to be tested and determine the test execution time corresponding to the sequence to be tested. Based on the test execution time, a test instruction is generated and sent to the target HIL bench.
[0117] In another case, if the received file information sent by the target HIL rack is not received within a preset time, the HIL test module may send a detection connection status information to the target HIL rack, wherein the detection connection status information is used to detect the communication status between the target HIL rack and the electronic device.
[0118] After the detection connection status information is sent to the target HIL stand, timing may be performed based on a timer to detect whether the normal connection status information sent by the target HIL stand is received within a preset time.
[0119] If the normal connection status information sent by the target HIL rack is received within the preset time, it is determined that the connection status with the target HIL rack is normal, and the sequence to be tested is sent to the target HIL rack again.
[0120] If the normal connection status information sent by the target HIL test bench is not received within the preset time, another candidate HIL test bench other than the target HIL test bench is determined from the candidate HIL test benches again; the sequence to be tested is transmitted to the candidate HIL test bench, and a test instruction is sent to the candidate HIL test bench.
[0121] The HIL test system and HIL test module provided in the embodiment of the present application are also used to detect whether the received file information sent by the target HIL bench is received within the preset time after the sequence to be tested is transmitted to the target HIL bench; if the received file information sent by the target HIL bench is received within the preset time, the sequence to be tested is identified, and the test execution time corresponding to the sequence to be tested is determined, thereby ensuring the accuracy of the test execution time corresponding to the determined sequence to be tested. Based on the test execution time, a test instruction is sent to the target HIL bench, thereby ensuring that the target HIL bench can receive the test instruction, and then the test of the sequence to be tested can be completed according to the test instruction.
[0122] The HIL test module is also used for sending connection status detection information to the target HIL bench if the received file information sent by the target HIL bench is not received within a preset time, so that the connection status between the target HIL bench and the electronic device can be detected. If the connection status normal information sent by the target HIL bench is received, it is determined that the connection status with the target HIL bench is normal, and the sequence to be tested is sent to the target HIL bench again, so that the target HIL bench can receive the sequence to be tested. If the connection status normal information sent by the target HIL bench is not received, another alternative HIL bench other than the target HIL bench is determined from the candidate HIL bench again; the sequence to be tested is transmitted to the alternative HIL bench, and a test instruction is sent to the alternative HIL bench, so that the sequence to be tested can be tested based on the alternative HIL bench.
[0123] In an optional embodiment of the present application, the target HIL bench is used to obtain test data for testing the sequence to be tested, identify the test data, determine the test results corresponding to each test step in the sequence to be tested; record each test result, and generate a test report corresponding to the sequence to be tested. Specifically, the target HIL bench generates test data during the process of testing the sequence to be tested, identifies the test data, and determines the test results corresponding to each test step in the sequence to be tested; wherein the test results may include test success and test failure. Then, the target HIL bench records the test results corresponding to each test step, and generates a test report corresponding to the sequence to be tested. Optionally, if there is a test step whose corresponding test result is a test failure, the target HIL bench can also analyze the cause of the test failure and record the cause of the test failure in the test report.
[0124] The HIL test system and the target HIL test bench provided in the embodiment of the present application are used to obtain test data for testing the sequence to be tested, identify the test data, determine the test results corresponding to each test step in the sequence to be tested, and ensure the accuracy of the test results corresponding to each test step in the determined sequence to be tested. Each test result is recorded, and a test report corresponding to the sequence to be tested is generated, ensuring the accuracy of the generated test report.
[0125] In an optional embodiment of the present application, Figure 4 As shown, the electronic device also includes: a mailbox management module, wherein:
[0126] The HIL test module is used to receive the test report sent by the target HIL test bench; the mailbox information of the target personnel corresponding to the sequence to be tested is obtained in the mailbox management module;
[0127] Based on the mailbox information, the test report is sent to the target mailbox of the target person.
[0128] Specifically, the target HIL bench can send the test report to the electronic device based on the secure shell protocol. Then, after the HIL test module in the electronic device receives the test report sent by the target HIL bench, it obtains the mailbox information of the target person corresponding to the sequence to be tested in the mailbox management module. Then, based on the secure file transfer protocol, the test report is sent to the target mailbox of the target person.
[0129] The HIL test system provided in the embodiment of the present application, the HIL test module, is used to receive the test report sent by the target HIL bench; the mailbox information of the target person corresponding to the sequence to be tested is obtained in the mailbox management module, so as to ensure the accuracy of the mailbox information of the target person corresponding to the sequence to be tested. Based on the mailbox information, the test report is sent to the target mailbox of the target person, so that the target person can receive the test report corresponding to the sequence to be tested in time.
[0130] In this embodiment, a HIL testing method is provided, which can be used for electronic equipment in the above-mentioned HIL testing system. Figure 5 is a flow chart of a HIL testing method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0131] Step S101, obtaining a sequence to be tested.
[0132] Step S102 : identifying the name of the sequence to be tested, and determining a target HIL test bench from the HIL test bench cluster.
[0133] Step S103: transmitting the sequence to be tested to the target HIL bench, and sending a test instruction to the target HIL bench.
[0134] Step S104, receiving version information of a target version corresponding to the target test software transmitted by the target HIL bench.
[0135] Step S105 , obtaining an installation package corresponding to the target test software of the target version from the version control module, and transmitting the installation package to the target HIL bench.
[0136] Step S106, detecting whether there is a sequence to be tested in the version control module.
[0137] Step S107: If the sequence to be tested does not exist in the version control module, the sequence to be tested is stored.
[0138] Step S108: receiving a test report corresponding to the sequence to be tested sent by the target HIL test bench.
[0139] Step S109, identifying the test report corresponding to the sequence to be tested, and determining the category of the test report corresponding to the sequence to be tested; based on the category of the test report, storing the test report together with other test reports of the same category.
[0140] Step S110, obtaining the email information of the target person corresponding to the sequence to be tested; based on the email information, sending the test report to the target email of the target person.
[0141] An embodiment of the present invention provides a HIL test system. The structural diagram of the HIL test system is shown in FIG. Figure 2 As shown, including:
[0142] The structure of the HIL test system includes a remote client and a HIL bench. The client is mainly the CI platform software loaded on a mobile laptop. The platform software architecture mainly includes the integrated management interface, HIL scheduling test interface, SVN configuration interface, mailbox configuration interface, etc. Since the software interface is developed by Pyqt5 in python, the information import and export between different interfaces in the software is completed through the python interface program; the HIL system bench is mainly composed of the ECU under test and the HIL equipment and its related configuration software.
[0143] In this system architecture, the integrated management interface is mainly based on SSH communication, which is mainly divided into user interface management section, HIL test sequence management section, SVN management section, project management section and test process information management section.
[0144] User management, this section is mainly divided into two parts, one is the login management of the software client, the other is the user rights management of the server. You can add users, delete users, and modify user interface usage permissions on the Jenkins user management page or the CI platform user management interface.
[0145] HIL test sequence management: This column mainly transfers the existing test sequences of the HIL server to the CI platform port through SSH communication for integrated management. The modification of the test sequence can be uploaded to the HIL server through SVN, and can also be uploaded to the HIL server through the HIL test sequence management directory. Usually, the project uses SVN to upload, which is convenient for version management and update.
[0146] Project management: This column refers to the management of test projects created during HIL scheduling tests, so that the same project does not need to be configured again and project tasks can be executed with one click.
[0147] Test process information management: This column mainly receives information feedback from the entire HIL test process, monitors and outputs the current status of the HIL equipment, test sequence progress, and report generation and distribution in real time.
[0148] In the HIL scheduling test interface of this system architecture, the interface mainly includes the HIL test software configuration column, the test sequence configuration column and the task deployment column. The main communication method of this column mainly relies on Jenkins and the API interface code for communication and deployment, that is, the import of the test model, the reading of real-time output data and the generation of reports are all controlled by the API interface code. The CI platform client packages the test model configuration and the process configuration of the test sequence, and then controls the HIL equipment through its software API interface to deploy and run the HIL test task according to the configuration in the project package. After the operation is completed, the report is exported through the report template designed by Jaspersoft Studio to complete the HIL scheduling test task.
[0149] In the SVN configuration interface of this system architecture, there are three main columns, namely SVN_Checkout column, SVN_Submit column and SVN_Delete column. The SVN_Checkout column mainly extracts the files from the SVN target address according to the SVN address and account password information. After extraction, its directory and file information will be displayed in the SVN management column of the comprehensive management interface; the SVN_Submit column can submit the local target file to the SVN target address, and the same file will be overwritten and updated; the SVN_Delete column is to delete the files in the SVN target address. All column operations will generate operation records to facilitate operation management between different users.
[0150] In the mailbox configuration interface of this system architecture, it is mainly divided into two columns, namely mailbox user management configuration and mailbox export record. The configuration column is mainly for the target mailbox to receive the HIL test sequence configuration report that has not yet been executed. The mailbox record is mainly to automatically generate a record text after the email is sent. The text records whether the email is sent successfully, the target email, the error code after failure and other information.
[0151] In addition, in the embodiments of the present invention Figure 6 Detailed flow chart of the HIL test system.
[0152] S201. Use the SVN interface of the CI platform to export the target project version content and the current software version status, and submit after checking and updating.
[0153] S202. Check the status of the HIL device and the ECU connection status in the test process information management column of the integrated management interface of the CI platform. If the HIL device is occupied, the subsequent test tasks will be put into the queue and wait until the HIL device is idle. If it is idle, identify whether the information of the target ECU is consistent with the project ECU information. If it is consistent, the HIL scheduling test operation can be performed.
[0154] S203. Before the HIL scheduling test, first configure the email address of the person who will receive the report after the test is completed on the CI platform interface. After the test is completed, the HIL service starts sending emails by sending a python script that will identify the email address in the configured person column to send the report email.
[0155] S204. Create a test project in the integrated management interface of the CI platform, package the scheduled operation information, the configuration file of the HIL model and the test cases arranged in chronological order into a table file, specify the project in the HIL test interface and click Send Test Package, and send the project test package to the test project directory of the HIL via SSH communication.
[0156] S205 and S206, after receiving the project package, the HIL server reads its specified configuration and test case nouns, forms a text file and transmits it to the process information receiving column of the integrated management platform of the CI platform through SSH communication. If the file and configuration information are not received, it prompts to check the communication connection between the HIL server and the CI platform, and sends the project package again after checking.
[0157] S207, after the received configuration information is checked to be correct, the test starts, and the HIL system will execute the trigger test task at the specified time point in the configuration, and at the same time transmit the current project status in real time to the CI platform through the SSH communication service of the HIL server for process monitoring.
[0158] S208, after the test is completed, the test data will be output and the report template designed by Jaspersoft software will be used to generate an export test report under the python script. The report will be automatically transmitted to the integrated management interface of the CI platform through SSH communication, and the report will be distributed to the target mailbox of the mailbox interface.
[0159] It should be noted that, according to the needs of implementation, the various steps / components described in this application can be split into more steps / components, or two or more steps / components or parts of steps / components can be operated together.
[0160] The present application embodiment provides a testing method, such as Figure 7 As shown, the electronic device used in the HIL test system of any one of the above embodiments, the method includes:
[0161] Step S301, obtaining a sequence to be tested.
[0162] Step S302 : Identify the name of the sequence to be tested, and determine the target HIL test bench from the HIL test bench cluster in the HIL test system.
[0163] Step S303: transmitting the sequence to be tested to the target HIL bench, and sending a test instruction to the target HIL bench.
[0164] Step S304: receiving a test report sent by the target HIL test bench.
[0165] For a detailed introduction to the test method, please refer to the above introduction to the HIL test system, which will not be repeated here.
[0166] The test method provided in the embodiment of the present application obtains the sequence to be tested, identifies the name of the sequence to be tested, determines the target HIL bench from the HIL bench cluster, and ensures the accuracy of the determined target HIL bench, so that the user does not need to manually assign the target HIL bench to the sequence to be tested. The sequence to be tested is transmitted to the target HIL bench, and the test instructions are sent to the target HIL bench, so that the user does not need to input the sequence to be tested into the target HIL bench before arriving at the target HIL bench. As a result, after the target HIL bench receives the sequence to be tested and the test instructions, it executes the test instructions on the target HIL bench to test the sequence to be tested. Then, the test report sent by the target HIL bench is received. The accuracy of the test report corresponding to the received sequence to be tested is ensured. The above test method reduces errors and omissions that may be caused by human factors. In addition, there is no need for engineering test personnel to assign the sequence to be tested to each HIL bench, and there is no need for engineering test personnel to go to the test site. Therefore, it can also adapt to the rapid increase in test tasks brought about by rapid software iteration, so that the flexibility and convenience of the test are improved, and the test is further reduced.
[0167] The present application embodiment provides a testing method, such as Figure 8 As shown, the method applied to a target HIL test bench in a HIL test bench cluster in a HIL test system in any one of the above embodiments includes:
[0168] Step S401: receiving a sequence to be tested and a test instruction sent from an electronic device in a HIL test system.
[0169] Step S402: Identify the content of the sequence to be tested and determine the test content corresponding to the sequence to be tested.
[0170] Step S403: determining the target test software corresponding to the sequence to be tested according to the test content.
[0171] Step S404: Based on the target test software, the test instructions are executed on the target HIL bench to test the sequence to be tested, and a test report corresponding to the sequence to be tested is generated.
[0172] Step S405: transmitting the test report to the electronic device.
[0173] For a detailed introduction to the test method, please refer to the above introduction to the HIL test system, which will not be repeated here.
[0174] The test method provided by the embodiment of the present application is that the target HIL bench receives the sequence to be tested and the test instruction sent from the electronic device in the HIL test system. After the target HIL bench receives the sequence to be tested and the test instruction, it identifies the content of the sequence to be tested, determines the test content corresponding to the sequence to be tested, and ensures the accuracy of the determined test content. According to the test content, the target test software corresponding to the sequence to be tested is determined to ensure the accuracy of the determined target test software. Based on the target test software, the test instruction is executed on the target HIL bench, the sequence to be tested is tested, and a test report corresponding to the sequence to be tested is generated, ensuring the accuracy of the test report corresponding to the generated sequence to be tested. Then, the test report is transmitted to the electronic device. The above test method reduces the errors and omissions that may be caused by human factors. In addition, there is no need for engineering test personnel to assign the sequence to be tested to each HIL bench, and there is no need for engineering test personnel to go to the test site. Therefore, it can also adapt to the rapid increase of test tasks brought about by rapid software iteration, so that the flexibility and convenience of the test are improved, and the cost of the test is further reduced.
[0175] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.
[0176] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0177] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0178] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0179] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0180] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.
[0181] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0182] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0183] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A HIL test system, characterized in that: The system comprises: a HIL test bench cluster and electronic equipment, wherein the electronic equipment is communicatively connected with each HIL test bench in the HIL test bench cluster, wherein the electronic equipment comprises: a HIL test module, wherein: The HIL test module is used to obtain a sequence to be tested, identify the name of the sequence to be tested, determine a target HIL test bench from the HIL test bench cluster, transmit the sequence to be tested to the target HIL test bench, and send a test instruction to the target HIL test bench; The target HIL bench is used to, after receiving the sequence to be tested and the test instruction, identify the content of the sequence to be tested and determine the test content corresponding to the sequence to be tested; determine the target test software corresponding to the sequence to be tested according to the test content; based on the target test software, execute the test instruction on the target HIL bench, test the sequence to be tested, generate a test report corresponding to the sequence to be tested, and transmit the test report to the electronic device.
2. The HIL test system according to claim 1, characterized in that: The electronic device further comprises: a version control module, wherein: The target HIL bench is used to identify the content corresponding to the sequence to be tested, determine the target version of the target test software required to test the sequence to be tested; identify the current version of the target test software; if the current version is inconsistent with the target version, transmit the version information of the target version corresponding to the target test software to the HIL test module of the electronic device; The HIL test module is used to obtain the installation package corresponding to the target test software of the target version from the version control module, and transmit the installation package to the target HIL bench; The target HIL bench is used to update the current version of the target test software to the target version based on the installation package.
3. The HIL test system according to claim 2, characterized in that: The HIL test module is further configured to wait for the target HIL bench to complete the test, generate a test report corresponding to the sequence to be tested, and after transmitting the test report corresponding to the sequence to be tested back to the HIL test module, detect whether the sequence to be tested exists in the version control module; If the sequence to be tested does not exist in the version control module, the sequence to be tested is stored in the version control module.
4. The HIL test system according to claim 2 or 3, characterized in that: The HIL test module is further configured to receive the test report corresponding to the sequence to be tested sent by the target HIL bench, and send the test report to the version control module; The version control module is further used to identify the test report corresponding to the sequence to be tested, determine the category of the test report corresponding to the sequence to be tested; and store the test report together with other test reports of the same category according to the category of the test report.
5. The HIL test system according to claim 1, characterized in that: The HIL test module is used to identify the name of the sequence to be tested and determine the test type corresponding to the sequence to be tested; determine at least one candidate HIL test bench corresponding to the sequence to be tested from the HIL test bench cluster according to the test type; and determine the target HIL test bench from each of the candidate HIL test benches.
6. The HIL test system according to claim 5, characterized in that: The HIL test module is used to obtain the current resource occupancy rate corresponding to each of the candidate HIL racks and the number of pending tests in the message queue corresponding to each of the candidate HIL racks; The target HIL rack is determined from the candidate HIL racks according to the current resource occupancy rate and the number of tests to be processed corresponding to each of the candidate HIL racks.
7. The HIL test system according to claim 6, characterized in that: The test instruction includes the test execution time; wherein: The HIL test module is further configured to detect whether received file information sent by the target HIL test bench is received within a preset time after the sequence to be tested is transmitted to the target HIL test bench; If the received file information sent by the target HIL bench is received within the preset time, the sequence to be tested is identified to determine the test execution time corresponding to the sequence to be tested; Based on the test execution time, the test instruction is sent to the target HIL bench.
8. The HIL test system according to claim 7, characterized in that: The HIL test module is further configured to send detection connection status information to the target HIL stand if the received file information sent by the target HIL stand is not received within the preset time; If the connection status normal information sent by the target HIL rack is received, it is determined that the connection status with the target HIL rack is normal, and the sequence to be tested is sent to the target HIL rack again; If the normal connection status information sent by the target HIL rack is not received, another candidate HIL rack other than the target HIL rack is determined from the candidate HIL racks again; the sequence to be tested is transmitted to the candidate HIL rack, and the test instruction is sent to the candidate HIL rack.
9. The HIL test system according to claim 1, characterized in that: The target HIL bench is used to obtain test data for testing the sequence to be tested, identify the test data, and determine the test results corresponding to each test step in the sequence to be tested; Each of the test results is recorded, and the test report corresponding to the sequence to be tested is generated.
10. The HIL test system according to claim 1, characterized in that: The electronic device further comprises: a mailbox management module, wherein: The HIL test module is used to receive the test report sent by the target HIL bench; and obtain the mailbox information of the target person corresponding to the sequence to be tested in the mailbox management module; Based on the mailbox information, the test report is sent to the target mailbox of the target person.
11. A testing method, characterized in that: The electronic device used in the HIL test system according to any one of claims 1 to 10, the method comprising: Get the sequence to be tested; Identify the name of the sequence to be tested, and determine a target HIL test bench from a HIL test bench cluster in the HIL test system; Transmitting the sequence to be tested to the target HIL bench, and sending a test instruction to the target HIL bench; Receive a test report sent by the target HIL bench.
12. A testing method, characterized in that: Applied to a target HIL test bench in a HIL test bench cluster in a HIL test system according to any one of claims 1 to 10, the method comprising: Receiving a sequence to be tested and a test instruction sent from an electronic device in the HIL test system; Identifying the content of the sequence to be tested, and determining the test content corresponding to the sequence to be tested; Determining the target test software corresponding to the sequence to be tested according to the test content; Based on the target test software, executing the test instruction on the target HIL bench, testing the sequence to be tested, and generating a test report corresponding to the sequence to be tested; The test report is transmitted to the electronic device.