A diagnostic protocol automation testing method and system based on TCP / IP protocol

CN117193251BActive Publication Date: 2026-09-08EXCELFORE INFORMATION TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311266823.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2026-09-08
Estimated Expiration
2043-09-27

AI Technical Summary

Technical Problem

[0004](2)排查问题困难

Benefits of technology

[0055]The testing platform obtains a test case table, processes it using a rule engine to obtain the test cases to be executed, and sends them to the test script executor. The test script executor executes tests on the test cases based on a TCP/IP-based diagnostic protocol model and a unified diagnostic service model. The DoIP protocol stack under test responds accordingly to the execution of the test cases and feeds back to the test script executor, which processes the received responses. Based on the processing results, the test script executor generates test results and a test report, which are then sent to the DingTalk group and the testing platform, respectively. The testing platform stores the test results and test reports in the database and displays them. This invention eliminates the need to build a protocol stack environment within the complex ECU environment; instead, the protocol stack environment is built in a cloud-based virtual ECU environment for separate, professional testing. Furthermore, automated test reports are customizable, and test results can be synchronized to the DingTalk group for easy viewing. Additionally, testing costs are reduced; the cloud-based testing platform only requires selecting the content to be tested to perform automated testing, eliminating the need for professional testers using specialized testing tools. Testers only need to know what needs to be tested to execute the tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117193251B_ABST
    Figure CN117193251B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of vehicle-mounted remote control diagnosis, in particular to a diagnosis protocol automation testing method and system based on TCP / IP protocol, which comprises the following steps: a test platform acquires a test case table, processes the test case table using a rule engine to obtain to-be-executed cases, and sends the to-be-executed cases to a test script executor; the test script executor executes tests on the to-be-executed cases according to a diagnosis protocol model based on TCP / IP protocol and a unified diagnosis service model, and the to-be-tested DoIP protocol stack makes corresponding actual responses according to the execution of the to-be-executed cases; the test script executor generates test results and test reports according to the processing results of the actual responses, and sends the test results and test reports to DingDing groups and the test platform respectively; and the test platform stores the test results and test reports in a database and displays the test results and test reports. The present application can reduce test costs, reduce manual misjudgments, and thus improve test accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle remote control diagnostic technology, and in particular to an automated testing method and system for diagnostic protocols based on the TCP / IP protocol. Background Technology

[0002] Currently, remote diagnostic technologies generally employ diagnostic protocol testing based on the TCP / IP protocol. However, traditional TCP / IP-based diagnostic protocol testing often suffers from the following problems:

[0003] (1) The process takes a long time. Testing can only begin after the ECU development is completed.

[0004] (2) Troubleshooting is difficult. After the ECU is developed and integrated, if problems are encountered during use, there is a lot of content to analyze, making troubleshooting difficult.

[0005] (3) High testing cost. Traditional diagnostic protocol testing based on TCP / IP protocol requires the use of professional testing hardware such as CANOE.

[0006] (4) High skill requirements for testers. Traditional diagnostic protocol testing based on TCP / IP requires specialized personnel using specialized testing equipment, resulting in high learning costs for both the equipment and personnel. Summary of the Invention

[0007] This invention provides an automated testing method and system for diagnostic protocols based on the TCP / IP protocol. The technical solution is as follows:

[0008] On the one hand, an automated testing method for diagnostic protocols based on the TCP / IP protocol is provided. The automated testing method for diagnostic protocols based on the TCP / IP protocol is implemented by an automated testing system for diagnostic protocols based on the TCP / IP protocol. The automated testing system for diagnostic protocols based on the TCP / IP protocol includes a testing platform, a test script executor, and the DoIP protocol stack under test.

[0009] The method includes:

[0010] S1. The testing platform obtains a test case table, processes the test case table using a rule engine to obtain test cases to be executed, and sends the test cases to be executed to the test script executor.

[0011] S2. The test script executor performs tests on the test cases to be executed according to the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The DoIP protocol stack to be tested makes a corresponding actual response according to the execution of the test cases to be executed and feeds it back to the test script executor. The test script executor processes the received actual response.

[0012] S3. The test script executor generates test results and a test report based on the processing results of the actual response, and sends the test results and test report to the DingTalk group and the test platform respectively.

[0013] S4. The testing platform stores the test results and test reports in the database and displays the test results and test reports.

[0014] Optionally, step S1 uses a rule engine to process the test case table to obtain test cases to be executed, and sends the test cases to be executed to the test script executor, including:

[0015] S11. Parse the test case table, read the name of the test case table, and display the name of the table to be executed;

[0016] S12. Continue to parse the sheet columns of the test case table, treat each sheet column as a type of test case, and display multiple types of test cases according to the test case category;

[0017] S13. Read each test element in each row of each sheet column, treat each test element as a test case, and display multiple test cases;

[0018] S14. Based on the selection instructions issued by the user, determine the test case that the user wants to execute from multiple categories of test cases and multiple test cases, identify the test case that the user wants to execute as the test case to be executed, and send the test case to be executed to the test script executor.

[0019] Optionally, S13 reads each test element in each row of each sheet column, treats each test element as a test case, and displays multiple test cases, including:

[0020] Read each test element in each row of each sheet column. The test element includes test number, test environment, test steps, expected response, actual response, and test result.

[0021] Determine if any test element is missing from each sheet. If a test element is missing from a sheet, print the missing element information. If no test element is missing, display all test cases under each test category.

[0022] Optionally, sending the test case to be executed to the test script executor in step S14 includes:

[0023] The test case category, test case number, test case name, and steps of the test case to be executed are sent to the test script executor.

[0024] Optionally, the test script executor of S2 performs tests on the test cases to be executed according to the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases to be executed and feeds them back to the test script executor. The test script executor processes the received actual responses, including:

[0025] S21. The test script executor determines whether the test case to be executed belongs to the layer corresponding to the diagnostic protocol model based on TCP / IP protocol or the layer corresponding to the unified diagnostic service model.

[0026] S22a. If the test script executor determines that the test case to be executed belongs to the layer corresponding to the diagnostic protocol model based on the TCP / IP protocol, then it further determines the test module corresponding to the test case to be executed, performs the test on the test case to be executed according to the test module, and the DoIP protocol stack under test makes the corresponding actual response according to the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response.

[0027] S22b. If the test script executor determines that the test case to be executed belongs to the layer corresponding to the unified diagnostic service model, it first executes some modules in the test module of the DoIP layer, then executes the diagnostic service in the unified diagnostic service, and executes the test of the test case to be executed. The DoIP protocol stack under test makes a corresponding actual response based on the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response.

[0028] Optionally, the test modules in S22a include a vehicle declaration test module, a route activation test module, an entity status request module, and a DoIP time parameter test module;

[0029] The test script executor in S22a determines the test module corresponding to the test case to be executed, performs tests on the test case according to the test module, and the DoIP protocol stack under test makes a corresponding actual response based on the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response, including:

[0030] When the test module corresponding to the test case to be executed is the vehicle declaration test module, the test script executor establishes a UDP socket to send the simulated vehicle declaration message to the DoIP protocol stack under test, and the DoIP protocol stack under test replies with content; the test script executor receives the vehicle declaration message through the UDP socket, judges whether the test result is successful according to the expected response of the test case, if successful, the test case passes, if unsuccessful, the test case fails, records the test result and test process, and fills in the test data with the help of the Allure open source framework;

[0031] When the test module corresponding to the test case to be executed is the route activation test module, the vehicle declaration test module is tested first. When the vehicle declaration test module is successfully tested, a TCP socket is established to send the simulated route activation message to the DoIP protocol stack under test. The DoIP protocol stack under test responds, and the test script executor judges and processes according to the expected response of the test case.

[0032] When the test module corresponding to the test case to be executed is the entity status request module, the test script executor establishes a UDP socket and sends a simulated entity status request message. The DoIP protocol stack under test processes the response, and the test script executor makes judgments and processes based on the expected response of the test case.

[0033] When the test module corresponding to the test case to be executed is the DoIP time parameter test module, the test script executor sends a simulated time parameter request message and records the sending and receiving time as well as the time when the DoIP protocol stack under test receives and responds, and performs the corresponding test.

[0034] Optionally, some modules in the DoIP layer test module of S22b include a vehicle declaration test module and a route activation test module;

[0035] S22b first executes a portion of the test modules in the DoIP layer, then executes the diagnostic service in the unified diagnostic service, and performs tests on the test cases to be executed. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases to be executed, and feeds them back to the test script executor. The test script executor processes the received actual responses, including:

[0036] The test script executor first executes the vehicle declaration test module, establishes a UDP socket to send simulated vehicle diagnostic messages, and receives responses via the UDP socket.

[0037] After the vehicle declaration test module is successfully tested, the test script executor executes the route activation test module, establishes a TCP socket and establishes a connection with the DoIP protocol stack under test through a three-way handshake, sends a simulated route activation message, and the DoIP protocol stack under test processes the reply.

[0038] After the routing activation test module is successfully tested, the test script executor sends different simulated unified diagnostic service and TCP / IP-based diagnostic protocol messages according to different test cases. The DoIP protocol stack under test processes the response, and the test script executor processes the response content of the DoIP protocol stack under test.

[0039] On the other hand, an automated testing system for diagnostic protocols based on the TCP / IP protocol is provided, which is used to implement an automated testing method for diagnostic protocols based on the TCP / IP protocol.

[0040] The automated diagnostic protocol testing system based on TCP / IP protocol includes a test platform, a test script executor, and the DoIP protocol stack under test, wherein:

[0041] The testing platform is used to obtain a test case table, process the test case table using a rule engine to obtain test cases to be executed, send the test cases to be executed to the test script executor, store the test results and test reports in the database, and display the test results and test reports.

[0042] The test script executor is used to perform tests on the test cases to be executed according to the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The test script executor processes the received actual responses; based on the processing results of the actual responses, it generates test results and test reports, and sends the test results and test reports to the DingTalk group and the test platform respectively.

[0043] The DoIP protocol stack under test makes a corresponding actual response based on the execution of the test case to be executed, and feeds it back to the test script executor.

[0044] Optionally, the test platform is used for:

[0045] S11. Parse the test case table, read the name of the test case table, and display the name of the table to be executed;

[0046] S12. Continue to parse the sheet columns of the test case table, treat each sheet column as a type of test case, and display multiple types of test cases according to the test case category;

[0047] S13. Read each test element in each row of each sheet column, treat each test element as a test case, and display multiple test cases;

[0048] S14. Based on the selection instructions issued by the user, determine the test case that the user wants to execute from multiple categories of test cases and multiple test cases, identify the test case that the user wants to execute as the test case to be executed, and send the test case to be executed to the test script executor.

[0049] Optionally, the test platform is used for:

[0050] Read each test element in each row of each sheet column. The test element includes test number, test environment, test steps, expected response, actual response, and test result.

[0051] Determine if any test element is missing from each sheet. If a test element is missing from a sheet, print the missing element information. If no test element is missing, display all test cases under each test category.

[0052] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the above-described automated testing method for diagnostic protocols based on the TCP / IP protocol.

[0053] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement the above-described automated testing method for diagnostic protocols based on the TCP / IP protocol.

[0054] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0055] The testing platform obtains a test case table, processes it using a rule engine to obtain the test cases to be executed, and sends them to the test script executor. The test script executor executes tests on the test cases based on a TCP / IP-based diagnostic protocol model and a unified diagnostic service model. The DoIP protocol stack under test responds accordingly to the execution of the test cases and feeds back to the test script executor, which processes the received responses. Based on the processing results, the test script executor generates test results and a test report, which are then sent to the DingTalk group and the testing platform, respectively. The testing platform stores the test results and test reports in the database and displays them. This invention eliminates the need to build a protocol stack environment within the complex ECU environment; instead, the protocol stack environment is built in a cloud-based virtual ECU environment for separate, professional testing. Furthermore, automated test reports are customizable, and test results can be synchronized to the DingTalk group for easy viewing. Additionally, testing costs are reduced; the cloud-based testing platform only requires selecting the content to be tested to perform automated testing, eliminating the need for professional testers using specialized testing tools. Testers only need to know what needs to be tested to execute the tests. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a flowchart of an automated testing method for diagnostic protocols based on the TCP / IP protocol provided in an embodiment of the present invention;

[0058] Figure 2 This is a schematic diagram of the structure of a text spell checking model provided in an embodiment of the present invention;

[0059] Figure 3 This is a block diagram of an automated diagnostic protocol testing system based on the TCP / IP protocol provided in an embodiment of the present invention;

[0060] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0061] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0062] This invention provides an automated testing method for diagnostic protocols based on the TCP / IP protocol. This method can be implemented by an electronic device, which can be a terminal or a server. Figure 1 The flowchart shown is for an automated testing method for diagnostic protocols based on TCP / IP. The processing flow of this method may include the following steps:

[0063] S1. The test platform obtains the test case table, parses the test case table to obtain the test cases to be executed, and sends the test cases to be executed to the test script executor.

[0064] In one feasible implementation, users can import a test case table to be executed on the testing platform. The test case table needs to be written according to the rules specified by the platform. The sheet columns are for the same type of test cases, and each row includes elements such as test case number, test case name, test environment, test steps, expected response, actual response, and test result.

[0065] Optionally, S1 uses a rule engine to process the test case table to obtain the test cases to be executed, and sends the test cases to be executed to the test script executor. Specifically, this may include the following steps S11-S14:

[0066] S11. Parse the test case table, read the name of the test case table, and display the name of the table to be executed.

[0067] S12. Continue parsing the sheet columns of the test case table, treating each sheet column as a type of test case, and displaying multiple categories of test cases according to the test case category.

[0068] S13. Read each test element in each row of each sheet column, treat each test element as a test case, and display multiple test cases.

[0069] Alternatively, the specific steps of S13 can be as follows:

[0070] like Figure 2 As shown, each test element in each row of each sheet column is read. The test element includes the test number, test environment, test steps, expected response, actual response, and test result.

[0071] Determine if any test element is missing from each sheet. If a test element is missing from a sheet, print the missing element information. If no test element is missing, display all test cases under each test category.

[0072] S14. Based on the selection instructions issued by the user, determine the test case that the user wants to execute from multiple categories of test cases and multiple test cases, identify the test case that the user wants to execute as the test case to be executed, and send the test case to be executed to the test script executor.

[0073] Alternatively, the specific steps of S14 can be as follows:

[0074] Send the test case category, test case number, test case name and steps to the test script executor.

[0075] In one feasible implementation, during the display, each test case and each type of test case will have a selection box next to it. Users can select as needed, click the selection box to check the content to be executed, and click Execute. The test platform receives the selection instruction issued by the user and determines the test cases selected by the user as the test cases to be executed.

[0076] S2. The test script executor performs tests on the test cases to be executed based on the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases to be executed and feeds them back to the test script executor. The test script executor processes the received actual responses.

[0077] In one feasible implementation, the protocol stack under test is built on a cloud-based virtual ECU environment. Once a part of the development is completed during the development phase, it can be integrated into the virtual environment. Testers can write and execute the corresponding scripts on the automated testing platform.

[0078] The diagnostic protocol model based on TCP / IP and the unified diagnostic service model are two different layers in network protocols, according to ISO 13400 and ISO 14229 respectively. Therefore, the test script executor needs to make a layered judgment to determine which layer the test case to be executed belongs to.

[0079] Alternatively, the operation steps of S2 can be as follows:

[0080] S21. The test script executor determines whether the test case to be executed belongs to the layer corresponding to the diagnostic protocol model based on TCP / IP protocol or the layer corresponding to the unified diagnostic service model.

[0081] S22a. If the test script executor determines that the test case to be executed belongs to the layer corresponding to the diagnostic protocol model based on the TCP / IP protocol, it further determines the test module corresponding to the test case to be executed, performs the test on the test case to be executed according to the test module, and the DoIP protocol stack under test makes the corresponding actual response according to the execution of the test case to be executed and feeds it back to the test script executor. The test script executor processes the received actual response.

[0082] Specifically, the test modules in S22a may include a vehicle declaration test module, a route activation test module, an entity status request module, and a DoIP time parameter test module;

[0083] Based on this, the specific operation of S22a can be as follows:

[0084] (1) When the test module corresponding to the test case to be executed is the vehicle declaration test module, the test script executor establishes a UDP socket to send the simulated vehicle declaration message to the DoIP protocol stack under test, and the DoIP protocol stack under test replies with content; the vehicle declaration message is received through the UDP socket, and the test result is judged as successful according to the expected response of the test case. If successful, the test case passes; if unsuccessful, the test case fails. The test result and test process are recorded, and the test data is filled in with the help of the Allure open source framework.

[0085] Allure is a lightweight, flexible, multilingual test reporting tool.

[0086] (2) When the test module corresponding to the test case to be executed is the route activation test module, the vehicle declaration test module is tested first. When the vehicle declaration test module is successfully tested, a TCP socket is established to send the simulated route activation message to the DoIP protocol stack under test. The DoIP protocol stack under test responds, and the test script executor judges and processes according to the expected response of the test case.

[0087] (3) When the test module corresponding to the test case to be executed is the entity status request module, the test script executor establishes a UDP socket to send a simulated entity status request message, the DoIP protocol stack under test processes the response, and the test script executor makes a judgment and processing based on the expected response of the test case.

[0088] (4) When the test module corresponding to the test case to be executed is the DoIP time parameter test module, the test script executor sends a simulated time parameter request message and records the sending and receiving time as well as the time when the DoIP protocol stack under test receives and responds, and performs the corresponding test.

[0089] S22b. If the test script executor determines that the test case to be executed belongs to the layer corresponding to the unified diagnostic service model, it first executes some modules in the test module of the DoIP layer, then executes the diagnostic service in the unified diagnostic service, and executes the test of the test case to be executed. The DoIP protocol stack under test makes the corresponding actual response based on the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response.

[0090] Specifically, some modules in the test module of the DoIP layer of S22b may include a vehicle declaration test module and a route activation test module;

[0091] Based on this, the specific operation of S22b can be as follows:

[0092] The test script executor first executes the vehicle declaration test module, establishes a UDP socket to send simulated vehicle diagnostic messages, and receives responses via the UDP socket.

[0093] After the vehicle declaration test module is successfully tested, the test script executor executes the route activation test module, establishes a TCP socket and establishes a connection with the DoIP protocol stack under test through a three-way handshake, sends a simulated route activation message, and the DoIP protocol stack under test processes the reply.

[0094] After the routing activation test module is successfully tested, the test script executor sends different simulated unified diagnostic service and TCP / IP-based diagnostic protocol messages according to different test cases. The DoIP protocol stack under test processes the response, and the test script executor processes the response content of the DoIP protocol stack under test.

[0095] It should be noted that the method for simulating messages mentioned in the above steps can be as follows: according to the message format specified in the ISO 13400 and ISO 14229 protocols, the test script abstracts the format defined in the specification into a format that can be used in the script, fills the message to be sent in the test case into the format specified in ISO 13400 and ISO 14229, and then converts the DoIP message to be sent into a binary stream for transmission.

[0096] Current DoIP testing requires completing test cases first, and then using dedicated testing equipment such as CANOE to perform tests based on those test cases. This places high demands on both the testers and the testing equipment. In contrast, this application allows the testing platform to directly read and automatically execute test cases after completion. This eliminates the need for dedicated testing equipment, and testers do not need to be DoIP experts; they only need to understand the testing requirements and select the relevant test content. The platform will then execute the corresponding test cases, saving both manpower and resources.

[0097] S3. The test script executor generates test results and test reports based on the actual response processing results, and sends the test results and test reports to the DingTalk group and the test platform respectively.

[0098] In one feasible implementation, the current test report requires testers to manually complete the test according to the test cases using dedicated testing equipment, and then write a test report by hand based on the results of the test case execution. The test report data is incomplete and may contain inaccuracies.

[0099] After completing the DoIP test, this application will automatically generate a version-customized test report. The report may include the test process, test results, testers, test start time, end time, etc. Using automatically generated test reports can avoid errors or omissions in manually collected data and can better record the current status.

[0100] S4. The testing platform stores the test results and test reports in the database and displays the test results and test reports.

[0101] In one feasible implementation, the testing platform will display the start time, end time, execution time, test content, test results, and test report of the current test task for testers to view, and store the relevant test output in the database.

[0102] Currently, test results require testers to manually observe the responses from the DoIP protocol stack under test and make their own judgments. After the test is completed, the testers output the results to a group chat for everyone to view. This application, however, can automate the result processing, avoiding human error, and output the test results via a DingTalk robot after processing.

[0103] In this embodiment of the invention, the testing platform obtains a test case table, processes the test case table using a rule engine to obtain the test cases to be executed, and sends the test cases to the test script executor. The test script executor executes tests on the test cases to be executed based on a diagnostic protocol model and a unified diagnostic service model based on the TCP / IP protocol. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases and feeds them back to the test script executor. The test script executor processes the received actual responses. Based on the processing results of the actual responses, the test script executor generates test results and test reports, and sends the test results and test reports to the DingTalk group and the testing platform, respectively. The testing platform stores the test results and test reports in the database and displays the test results and test reports. Using this invention, there is no need to build a protocol stack environment in the complex environment of the ECU. Instead, the protocol stack environment is built in the cloud virtual ECU environment for separate and professional testing of the protocol stack. Moreover, the automated test report is customizable, and the test results can be synchronized to the DingTalk group for easy viewing. In addition, testing costs are reduced. The cloud-based testing platform only requires you to select the content you want to test to perform automated testing. There is no need for professional testers to use professional testing tools. Testers only need to know what needs to be tested to execute the test.

[0104] Figure 3This is a block diagram of an automated testing system for diagnostic protocols based on the TCP / IP protocol, illustrated in an exemplary embodiment. The system is used to implement an automated testing method for diagnostic protocols based on the TCP / IP protocol. The automated testing system for diagnostic protocols based on the TCP / IP protocol includes a test platform, a test script executor, and a DoIP protocol stack under test, wherein:

[0105] The testing platform is used to obtain a test case table, process the test case table using a rule engine to obtain test cases to be executed, send the test cases to be executed to the test script executor, store the test results and test reports in the database, and display the test results and test reports.

[0106] The test script executor is used to perform tests on the test cases to be executed according to the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The test script executor processes the received actual responses; based on the processing results of the actual responses, it generates test results and test reports, and sends the test results and test reports to the DingTalk group and the test platform respectively.

[0107] The DoIP protocol stack under test makes a corresponding actual response based on the execution of the test case to be executed, and feeds it back to the test script executor.

[0108] Optionally, the test platform is used for:

[0109] S11. Parse the test case table, read the name of the test case table, and display the name of the table to be executed;

[0110] S12. Continue to parse the sheet columns of the test case table, treat each sheet column as a type of test case, and display multiple types of test cases according to the test case category;

[0111] S13. Read each test element in each row of each sheet column, treat each test element as a test case, and display multiple test cases;

[0112] S14. Based on the selection instructions issued by the user, determine the test case that the user wants to execute from multiple categories of test cases and multiple test cases, identify the test case that the user wants to execute as the test case to be executed, and send the test case to be executed to the test script executor.

[0113] Optionally, the test platform is used for:

[0114] Read each test element in each row of each sheet column. The test element includes test number, test environment, test steps, expected response, actual response, and test result.

[0115] Determine if any test element is missing from each sheet. If a test element is missing from a sheet, print the missing element information. If no test element is missing, display all test cases under each test category.

[0116] In this embodiment of the invention, the testing platform obtains a test case table, processes the test case table using a rule engine to obtain the test cases to be executed, and sends the test cases to the test script executor. The test script executor executes tests on the test cases to be executed based on a diagnostic protocol model and a unified diagnostic service model based on the TCP / IP protocol. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases and feeds them back to the test script executor. The test script executor processes the received actual responses. Based on the processing results of the actual responses, the test script executor generates test results and test reports, and sends the test results and test reports to the DingTalk group and the testing platform, respectively. The testing platform stores the test results and test reports in the database and displays the test results and test reports. Using this invention, there is no need to build a protocol stack environment in the complex environment of the ECU. Instead, the protocol stack environment is built in the cloud virtual ECU environment for separate and professional testing of the protocol stack. Moreover, the automated test report is customizable, and the test results can be synchronized to the DingTalk group for easy viewing. In addition, testing costs are reduced. The cloud-based testing platform only requires you to select the content you want to test to perform automated testing. There is no need for professional testers to use professional testing tools. Testers only need to know what needs to be tested to execute the test.

[0117] Figure 4 This is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present invention. The electronic device 400 may be a test platform, a test script executor, or a DoIP protocol stack under test as described in this application. The electronic device 400 may vary considerably due to different configurations or performance, and may include one or more central processing units (CPUs) 401 and one or more memories 402. The memory 402 stores at least one instruction, which is loaded and executed by the processor 401 to implement the steps of the Chinese text spelling check method described above.

[0118] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to complete the aforementioned Chinese text spelling check method. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device.

[0119] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An automated testing method for diagnostic protocols based on TCP / IP, characterized in that, The automated testing method for diagnostic protocols based on TCP / IP protocol is implemented by an automated testing system for diagnostic protocols based on TCP / IP protocol. The automated testing system for diagnostic protocols based on TCP / IP protocol includes a testing platform, a test script executor, and the DoIP protocol stack to be tested. The method includes: S1. The testing platform obtains a test case table, processes the test case table using a rule engine to obtain test cases to be executed, and sends the test cases to be executed to the test script executor. S2. The test script executor performs tests on the test cases to be executed according to the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The DoIP protocol stack to be tested makes a corresponding actual response according to the execution of the test cases to be executed and feeds it back to the test script executor. The test script executor processes the received actual response. S3. The test script executor generates test results and a test report based on the processing results of the actual response, and sends the test results and test report to the DingTalk group and the test platform respectively. S4. The testing platform stores the test results and test reports in the database and displays the test results and test reports. Specifically, S1 uses a rule engine to process the test case table to obtain test cases to be executed, and sends the test cases to be executed to the test script executor, including: S11. Parse the test case table, read the name of the test case table, and display the name of the table to be executed; S12. Continue to parse the sheet columns of the test case table, treat each sheet column as a type of test case, and display multiple types of test cases according to the test case category; S13. Read each test element in each row of each sheet column, treat each test element as a test case, and display multiple test cases; S14. Based on the selection instructions issued by the user, determine the test case that the user wants to execute from multiple categories of test cases and multiple test cases, determine the test case that the user wants to execute as the test case to be executed, and send the test case to be executed to the test script executor. S13 reads each test element from each row of each sheet column, treats each test element as a test case, and displays multiple test cases, including: Read each test element in each row of each sheet column. The test element includes test number, test environment, test steps, expected response, actual response, and test result. Determine if any test element is missing from each sheet. If a test element is missing from a sheet, print the missing element information. If no test element is missing, display all test cases under each test category. Sending the test case to be executed to the test script executor in step S14 includes: The test case category, test case number, test case name, and steps of the test case to be executed are sent to the test script executor.

2. The test script executor of S2 performs tests on the test cases to be executed based on the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases to be executed and feeds them back to the test script executor. The test script executor processes the received actual responses, including: S21. The test script executor determines whether the test case to be executed belongs to the layer corresponding to the diagnostic protocol model based on TCP / IP protocol or the layer corresponding to the unified diagnostic service model. S22a. If the test script executor determines that the test case to be executed belongs to the layer corresponding to the diagnostic protocol model based on the TCP / IP protocol, then it further determines the test module corresponding to the test case to be executed, performs the test on the test case to be executed according to the test module, and the DoIP protocol stack under test makes the corresponding actual response according to the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response. S22b. If the test script executor determines that the test case to be executed belongs to the layer corresponding to the unified diagnostic service model, it first executes some modules in the test module of the DoIP layer, then executes the diagnostic service in the unified diagnostic service, and executes the test of the test case to be executed. The DoIP protocol stack under test makes a corresponding actual response based on the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response.

3. The method according to claim 1, characterized in that, The test modules in S22a include a vehicle declaration test module, a route activation test module, an entity status request module, and a DoIP time parameter test module. The test script executor in S22a determines the test module corresponding to the test case to be executed, performs tests on the test case according to the test module, and the DoIP protocol stack under test makes a corresponding actual response based on the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response, including: When the test module corresponding to the test case to be executed is the vehicle declaration test module, the test script executor establishes a UDP socket to send the simulated vehicle declaration message to the DoIP protocol stack under test, and the DoIP protocol stack under test replies with content; the test script executor receives the vehicle declaration message through the UDP socket, judges whether the test result is successful according to the expected response of the test case, if successful, the test case passes, if unsuccessful, the test case fails, records the test result and test process, and fills in the test data with the help of the Allure open source framework; When the test module corresponding to the test case to be executed is the route activation test module, the vehicle declaration test module is tested first. When the vehicle declaration test module is successfully tested, a TCP socket is established to send the simulated route activation message to the DoIP protocol stack under test. The DoIP protocol stack under test responds, and the test script executor judges and processes according to the expected response of the test case. When the test module corresponding to the test case to be executed is the entity status request module, the test script executor establishes a UDP socket and sends a simulated entity status request message. The DoIP protocol stack under test processes the response, and the test script executor makes judgments and processes based on the expected response of the test case. When the test module corresponding to the test case to be executed is the DoIP time parameter test module, the test script executor sends a simulated time parameter request message and records the sending and receiving time as well as the time when the DoIP protocol stack under test receives and responds, and performs the corresponding test.

4. The method according to claim 2, characterized in that, The test modules of the DoIP layer of S22b include a vehicle declaration test module and a route activation test module. S22b first executes a portion of the test modules in the DoIP layer, then executes the diagnostic service in the unified diagnostic service, and performs tests on the test cases to be executed. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases to be executed, and feeds them back to the test script executor. The test script executor processes the received actual responses, including: The test script executor first executes the vehicle declaration test module, establishes a UDP socket to send simulated vehicle diagnostic messages, and receives responses via the UDP socket. After the vehicle declaration test module is successfully tested, the test script executor executes the route activation test module, establishes a TCP socket and establishes a connection with the DoIP protocol stack under test through a three-way handshake, sends a simulated route activation message, and the DoIP protocol stack under test processes the reply. After the routing activation test module is successfully tested, the test script executor sends different simulated unified diagnostic service and TCP / IP-based diagnostic protocol messages according to different test cases. The DoIP protocol stack under test processes the response, and the test script executor processes the response content of the DoIP protocol stack under test.

5. An automated testing system for diagnostic protocols based on TCP / IP, characterized in that, The TCP / IP-based automated testing system for diagnostic protocols is used to implement an automated testing method for diagnostic protocols based on the TCP / IP protocol. The automated diagnostic protocol testing system based on TCP / IP protocol includes a test platform, a test script executor, and the DoIP protocol stack under test, wherein: The testing platform is used to obtain a test case table, process the test case table using a rule engine to obtain test cases to be executed, send the test cases to be executed to the test script executor, store the test results and test reports in the database, and display the test results and test reports. The test script executor is used to perform tests on the test cases to be executed according to the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The test script executor processes the received actual responses; based on the processing results of the actual responses, it generates test results and test reports, and sends the test results and test reports to the DingTalk group and the test platform respectively. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases to be executed, and feeds them back to the test script executor; Specifically, S1 uses a rule engine to process the test case table to obtain test cases to be executed, and sends the test cases to be executed to the test script executor, including: S11. Parse the test case table, read the name of the test case table, and display the name of the table to be executed; S12. Continue to parse the sheet columns of the test case table, treat each sheet column as a type of test case, and display multiple types of test cases according to the test case category; S13. Read each test element in each row of each sheet column, treat each test element as a test case, and display multiple test cases; S14. Based on the selection instructions issued by the user, determine the test case that the user wants to execute from multiple categories of test cases and multiple test cases, determine the test case that the user wants to execute as the test case to be executed, and send the test case to be executed to the test script executor. S13 reads each test element from each row of each sheet column, treats each test element as a test case, and displays multiple test cases, including: Read each test element in each row of each sheet column. The test element includes test number, test environment, test steps, expected response, actual response, and test result. Determine if any test element is missing from each sheet. If a test element is missing from a sheet, print the missing element information. If no test element is missing, display all test cases under each test category. Sending the test case to be executed to the test script executor in step S14 includes: The test case category, test case number, test case name, and steps of the test case to be executed are sent to the test script executor.

6. The test script executor of S2 performs tests on the test cases to be executed according to the diagnostic protocol model and unified diagnostic service model based on the TCP / IP protocol. The DoIP protocol stack under test makes corresponding actual responses based on the execution of the test cases to be executed and feeds them back to the test script executor. The test script executor processes the received actual responses, including: S21. The test script executor determines whether the test case to be executed belongs to the layer corresponding to the diagnostic protocol model based on TCP / IP protocol or the layer corresponding to the unified diagnostic service model. S22a. If the test script executor determines that the test case to be executed belongs to the layer corresponding to the diagnostic protocol model based on the TCP / IP protocol, then it further determines the test module corresponding to the test case to be executed, performs the test on the test case to be executed according to the test module, and the DoIP protocol stack under test makes the corresponding actual response according to the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response. S22b. If the test script executor determines that the test case to be executed belongs to the layer corresponding to the unified diagnostic service model, it first executes some modules in the test module of the DoIP layer, then executes the diagnostic service in the unified diagnostic service, and executes the test of the test case to be executed. The DoIP protocol stack under test makes a corresponding actual response based on the execution of the test case to be executed, and feeds it back to the test script executor. The test script executor processes the received actual response.

Citation Information

Patent Citations

  • Protocol stack test method and device, test system and computer readable storage medium

    CN113938412A

  • Automatic testing method, device and equipment based on remote control vehicle and medium

    CN115963810A