Protocol testing method, device, equipment, medium and vehicle

Through automated protocol detection and testing processes, the high cost and inefficiency problems caused by manual operations are solved, and the entire process from protocol version update to test report generation is realized.

CN119743415APending Publication Date: 2025-04-01BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410649631.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

During the protocol development phase, testers need to manually perform multiple operational steps, resulting in high labor costs, inefficient testing and long testing time.

Method used

By obtaining the time stamp of the target protocol based on a preset detection program, determining the latest version of the protocol, and automatically performing download, flashing and testing operations to generate a test report.

Benefits of technology

It realizes that the entire process of downloading, flashing and testing operations is automatically completed when the target protocol version is updated, without manual operations, reducing labor costs and testing time and improving testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743415A_ABST
    Figure CN119743415A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a protocol testing method, device, equipment, medium and vehicle, wherein the protocol testing method comprises: determining whether the latest version of the target protocol is the target protocol to be updated based on the timestamp of the target protocol under the target path, and if so, executing the download operation of the latest version of the target protocol; when it is determined that the download of the latest version of the target protocol is successful, executing the flash operation of the latest version of the target protocol; when it is determined that the flash operation of the latest version of the target protocol is successful, executing the test operation of at least one test item corresponding to the latest version of the target protocol, and generating a target test report corresponding to the test operation, thereby, when the version of the target protocol is updated, the whole process of downloading, flashing and testing the latest version of the target protocol can be automatically realized without manual operation by the tester, and the seamless connection of the entire test process can be realized, thereby reducing labor costs and test time, and improving test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of testing technology, and in particular to a protocol testing method, device, equipment, medium and vehicle. Background Art

[0002] For continuously integrated protocols such as the Electronic Control Unit (ECU) protocol and any other protocol that retains bus communication, the protocol development phase is a continuous integration process. Developers merge new requirements and defect repair codes into the most recent protocol version every day, and then start compiling the protocol version. After the protocol version is compiled, testers are required to manually perform subsequent protocol test environment setup, download the latest protocol version, flash the protocol version, test the protocol version, etc. Since each operation step in the test process needs to be manually executed by the tester, there are problems of high labor costs, low test efficiency and long test time. Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure provides a protocol testing method, device, equipment, medium and vehicle.

[0004] A first aspect of an embodiment of the present disclosure provides a protocol testing method, the method comprising:

[0005] Based on a preset detection program, obtain the timestamp of the target protocol under the target path, determine the latest version of the target protocol based on the timestamp, obtain the version number of the latest version of the target protocol, and determine whether the latest version of the target protocol is the target protocol to be updated based on the version number and the current version number. If so, perform the download operation of the latest version of the target protocol;

[0006] Obtaining a download identifier corresponding to the download operation, and when determining that the download status corresponding to the download identifier is a successful download, calling a preset version flashing program based on a first preset interface, and performing a flashing operation of the latest version of the target protocol based on the preset version flashing program;

[0007] Obtain a flash identifier corresponding to the flash operation, and when it is determined that the flash status corresponding to the flash identifier is a successful flash, call a preset version test program based on a second preset interface, and execute a test operation of at least one test item corresponding to the latest version of the target protocol in a preset test environment based on the preset version test program, and generate a target test report corresponding to the test operation.

[0008] A second aspect of an embodiment of the present disclosure provides a protocol testing device, the device comprising:

[0009] The protocol download module is used to obtain the timestamp of the target protocol under the target path based on a preset detection program, determine the latest version of the target protocol based on the timestamp, obtain the version number of the latest version of the target protocol, and determine whether the latest version of the target protocol is the target protocol to be updated based on the version number and the current version number. If so, perform the download operation of the latest version of the target protocol;

[0010] The protocol flashing module is used to obtain a download identifier corresponding to the download operation, and when it is determined that the download status corresponding to the download identifier is a successful download, call a preset version flashing program based on a first preset interface, and perform a flashing operation of the latest version of the target protocol based on the preset version flashing program;

[0011] The protocol testing module is used to obtain a flashing identifier corresponding to a flashing operation. When it is determined that the flashing status corresponding to the flashing identifier is a successful flashing, a preset version testing program is called based on a second preset interface. Based on the preset version testing program, a test operation of at least one test item corresponding to the latest version of the target protocol is executed in a preset test environment, and a target test report corresponding to the test operation is generated.

[0012] A third aspect of an embodiment of the present disclosure provides an electronic device, the device comprising:

[0013] Memory;

[0014] Processor; and

[0015] A computer program, wherein the computer program is stored in a memory and is configured to be executed by a processor to implement the protocol testing method of the first aspect as described above.

[0016] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the protocol testing method of the first aspect described above is implemented.

[0017] A fifth aspect of an embodiment of the present disclosure provides a vehicle, comprising the protocol testing device of the second aspect, or the electronic device of the third aspect.

[0018] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0019] The protocol testing method, apparatus, device, medium and vehicle provided by the embodiments of the present disclosure can obtain the timestamp of the target protocol under the target path based on a preset detection program, determine the latest version of the target protocol based on the timestamp, obtain the version number of the latest version of the target protocol, determine whether the latest version of the target protocol is the target protocol of the version to be updated based on the version number and the current version number, and if the latest version of the target protocol is the target protocol of the version to be updated, execute the download operation of the latest version of the target protocol, obtain the download identifier corresponding to the download operation, and when it is determined that the download status corresponding to the download identifier is a successful download, call the preset version flashing program based on the first preset interface, and execute the latest version of the target protocol based on the preset version flashing program. Flash operation, obtain the flash identifier corresponding to the flash operation, and when it is determined that the flash status corresponding to the flash identifier is a successful flash, call the preset version test program based on the second preset interface, and execute the test operation of at least one test item corresponding to the latest version of the target protocol in the preset test environment based on the preset version test program, and generate a target test report corresponding to the test operation. Therefore, when it is determined that the version of the target protocol is updated, the response program can be called based on the preset interface to automatically realize the whole process of downloading, flashing, and testing the latest version of the target protocol, without the need for manual operation by the tester, and the seamless connection of the entire test process can be achieved, thereby reducing labor costs and testing time, while improving testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0022] Figure 1 is a flow chart of a protocol testing method provided by an embodiment of the present disclosure;

[0023] Figure 2 is a flow chart of a defect reporting method provided by an embodiment of the present disclosure;

[0024] Figure 3 is a flow chart of another protocol testing method provided by an embodiment of the present disclosure;

[0025] Figure 4 is a structural diagram of a protocol testing device provided by an embodiment of the present disclosure;

[0026] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0030] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0031] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0032] In view of the problems of high labor cost, low testing efficiency and long testing time in the protocol testing process in the above-mentioned prior art, the embodiment of the present disclosure provides a protocol testing method, which can be applied to protocol automation testing based on continuous integration, and can also be applied to protocol automation testing after version update. The method is introduced in conjunction with specific embodiments below.

[0033] Figure 1It is a flowchart of a protocol testing method provided by an embodiment of the present disclosure. The method can be executed by a protocol testing device. The protocol testing device can be implemented in software and / or hardware. The protocol testing device can be configured in an electronic device, such as a server or a terminal or a server cluster, wherein the terminal can specifically include a computer or a tablet computer, a vehicle-mounted terminal, or any device that can be used to process the protocol testing method.

[0034] like Figure 1 As shown, the protocol testing method provided by the embodiment of the present disclosure includes the following steps.

[0035] S110. Based on a preset detection program, obtain the timestamp of the target protocol under the target path, and determine the latest version of the target protocol based on the timestamp, obtain the version number of the latest version of the target protocol, and determine whether the latest version of the target protocol is the target protocol to be updated based on the version number and the current version number. If so, execute the download operation of the latest version of the target protocol.

[0036] In an embodiment of the present disclosure, after receiving a protocol test instruction, the electronic device may perform version detection on the target protocol corresponding to the protocol test instruction, and when detecting that the version of the target protocol is updated, execute a download operation of the latest version of the target protocol.

[0037] In the disclosed embodiment, the target protocol may be a protocol corresponding to a control unit that retains bus communication (such as CAN bus, LIN bus) in a vehicle system, such as an electronic control unit protocol, referred to as ECU protocol, a micro control unit protocol, referred to as MCU protocol, etc.

[0038] In the disclosed embodiment, the target path is the packaging path corresponding to the target protocol on the cloud platform; the preset detection program is pre-set for detecting the target protocol under the target path, including the detection and acquisition of the timestamp of the target protocol.

[0039] In the embodiment of the present disclosure, the current version number is the version number corresponding to the target protocol that has recently completed testing.

[0040] In the embodiment of the present disclosure, the protocol test instruction includes protocol identification information corresponding to the protocol test instruction.

[0041] Specifically, after receiving the protocol test instruction, the electronic device parses the protocol test instruction, obtains the protocol identification information, determines the target protocol corresponding to the protocol identification information according to the protocol identification information, determines the current version number corresponding to the target protocol and the current version update time, and obtains the timestamp of the target protocol under the target path based on the preset detection program, and determines the latest version of the target protocol according to the timestamp, obtains the version number of the latest version of the target protocol, compares the version number with the current version number, and compares the timestamp of the latest version of the target protocol with the current version update time to determine whether the latest version of the target protocol is the target protocol of the version to be updated, that is, the latest compiled target protocol. When the version number is different from the current version number, and / or the timestamp of the latest version of the target protocol is after the current version update time, it is determined that the latest version of the target protocol is the target protocol of the version to be updated, and the download of the latest version of the target protocol is automatically triggered, and the download operation of the latest version of the target protocol is executed.

[0042] In some embodiments of the present disclosure, the electronic device may obtain a timestamp of a target protocol under a target path once based on a preset detection program interval and a preset time period; it may also obtain a timestamp of a target protocol under a target path within a preset time period based on a preset detection program interval and a preset time period; it may also detect whether there is a software package corresponding to the target protocol under the target path within a target date based on a preset detection program interval and a preset time period.

[0043] Exemplarily, the electronic device can detect whether the target path corresponding to the target protocol of the cloud platform contains the software package corresponding to the target protocol of the latest date, such as the detection day, every 10 minutes based on a preset detection program. This can be understood as checking the compilation status of the version branch of the target protocol. When it is determined that the software package corresponding to the target protocol of the latest date is included, that is, the version branch compilation is completed, it is determined whether the software package corresponding to the target protocol is the software package corresponding to the target protocol of the version to be updated. If so, it is downloaded, otherwise vice versa; when it is determined that the software package corresponding to the target protocol of the latest date is not included, wait for the next 10-minute cycle detection.

[0044] S120. Obtain a download identifier corresponding to the download operation. When it is determined that the download status corresponding to the download identifier is a successful download, call a preset version flashing program based on a first preset interface, and perform a flashing operation of the latest version of the target protocol based on the preset version flashing program.

[0045] In an embodiment of the present disclosure, after executing the download operation of the latest version of the target protocol, the electronic device determines whether the latest version of the target protocol has been downloaded successfully. When it is determined that the latest version of the target protocol has been downloaded successfully, a flash operation is triggered to execute the flash operation of the latest version of the target protocol.

[0046] In the disclosed embodiment, the flash operation may be understood as burning the latest version of the target protocol into a specific address segment of the control unit or controller chip memory corresponding to the target protocol.

[0047] In the embodiment of the present disclosure, the first preset interface is a preset interface for calling a preset version flashing program, wherein the preset version flashing program may be a Bootloader test program.

[0048] Specifically, during the process of executing the download operation of the latest version of the target protocol, the electronic device determines the corresponding download identifier based on the stage corresponding to the download operation, and determines the download status corresponding to the download identifier based on the correspondence between the preset download identifier and the download status. When the download status corresponding to the download identifier is a successful download, it is determined that the latest version of the target protocol has been downloaded successfully, and further calls the preset version flashing program based on the first preset interface, and then performs the flashing operation of the latest version of the target protocol based on the preset version flashing program. The specific implementation method of the flashing operation is similar to the existing implementation method of flashing software, which will not be repeated here.

[0049] The download indicators include downloading, download failure, and download success.

[0050] The preset version flashing program is a pre-set program for flashing the protocol.

[0051] S130. Obtain a flash identifier corresponding to the flash operation. When it is determined that the flash status corresponding to the flash identifier is a successful flash, call a preset version test program based on a second preset interface, and execute a test operation of at least one test item corresponding to the latest version of the target protocol in a preset test environment based on the preset version test program, and generate a target test report corresponding to the test operation.

[0052] In an embodiment of the present disclosure, after executing the flash operation of the latest version of the target protocol, the electronic device determines whether the flash of the latest version of the target protocol is successful. When it is determined that the flash of the latest version of the target protocol is successful, a test operation is triggered to execute a test operation of at least one test item corresponding to the new version of the target protocol, and a target test report corresponding to the test operation is generated according to the test result corresponding to the test operation.

[0053] In the disclosed embodiment, at least one test item corresponding to the latest version of the target protocol is pre-configured by the tester according to actual conditions, and the tester may also set the number of executions corresponding to each test item according to actual conditions.

[0054] At least one test item may include one or more of CAN / CAN FD communication test, network management test, diagnostic protocol test, Bootloader test, etc., wherein CAN FD is the abbreviation of CAN with Flexible Data rate, that is, variable rate CAN bus.

[0055] In the embodiment of the present disclosure, the second preset interface is a preset interface for calling a preset version testing program.

[0056] The preset version test program may be any existing test program that can realize the test operation of automatically executing the test items, and is not limited here.

[0057] The preset test environment includes a preset hardware test environment and a preset software test environment, wherein the hardware test environment is a pre-built hardware test environment suitable for different control units under test or controllers under test corresponding to different protocols, and the software test environment is a software test environment suitable for different control units under test or controllers under test corresponding to different protocols, which is built based on preset environment building components.

[0058] In the embodiments of the present disclosure, different test items corresponding to different tested control units or tested controllers are different corresponding to different protocols. The preset test environment includes test environments for different test items corresponding to different tested control units or tested controllers. Therefore, the test environment can be set up only once to complete parallel testing of different test items corresponding to different tested control units or tested controllers.

[0059] Specifically, during the process of executing the flash operation of the latest version of the target protocol, the electronic device determines the corresponding flash identifier based on the stage corresponding to the flash operation, and determines the flash status corresponding to the flash identifier according to the correspondence between the preset flash identifier and the flash status. When the flash status corresponding to the flash identifier is that the flash is successful, it is determined that the latest version of the target protocol is flashed successfully, and at least one test item corresponding to the latest version of the target protocol is determined, and a test operation is performed on the at least one test item based on the preset version test procedure and the execution order between the test items, and a target test report corresponding to the test operation is generated according to the test result corresponding to the test operation.

[0060] The flashing flags include flashing in progress, flashing successful, and flashing failed.

[0061] The preset version test program is a pre-set program for performing a test operation on at least one test item in the target protocol.

[0062] In the embodiment of the present disclosure, it is possible to obtain the timestamp of the target protocol under the target path based on a preset detection program, determine the latest version of the target protocol based on the timestamp, obtain the version number of the target protocol of the latest version, determine whether the target protocol of the latest version is the target protocol of the version to be updated based on the version number and the current version number, and if the target protocol of the latest version is the target protocol of the version to be updated, perform a download operation of the target protocol of the latest version, obtain a download identifier corresponding to the download operation, and when it is determined that the download status corresponding to the download identifier is a successful download, call a preset version flashing program based on a first preset interface, perform a flashing operation of the target protocol of the latest version based on the preset version flashing program, and obtain the flashing operation. A corresponding flash mark is made, and when it is determined that the flash status corresponding to the flash mark is a successful flash, a preset version test program is called based on a second preset interface, and a test operation of at least one test item corresponding to the latest version of the target protocol is performed in a preset test environment based on the preset version test program, and a target test report corresponding to the test operation is generated. Therefore, when it is determined that the version of the target protocol is updated, the response program can be called based on the preset interface to automatically realize the entire process of downloading, flashing, and testing the latest version of the target protocol, without the need for manual operation by the tester, and the seamless connection of the entire test process can be achieved, thereby reducing labor costs and testing time, while improving testing efficiency.

[0063] In the embodiment of the present disclosure, the latest version of the target protocol includes at least one test item corresponding to the target protocol and a target execution number corresponding to each test item.

[0064] Based on the second preset interface, a preset version test program is called, and based on the preset version test program, a test operation of at least one test item corresponding to the target protocol of the version to be updated is executed in a preset test environment. Specifically, it may include: obtaining the test parameters corresponding to each test item; for each test item, calling the preset version test program based on the second preset interface, so that the preset version test program executes the test operation corresponding to the test item based on the test parameters; when determining that the test of the test item is completed based on the correspondence between the test operation identifier and the preset test status, determining the number of tests for the test item, and comparing the number of tests with the target execution number; when the comparison result is that the number of tests is less than the target execution number, continuing to execute the test operation of the test item until the number of tests reaches the target execution number.

[0065] Specifically, when the electronic device determines that the latest version of the target protocol has been successfully flashed, it obtains the test parameters corresponding to each test item of the target protocol, and executes the corresponding test operations of each test item in sequence based on the execution order of each test item. For each test item, the preset version test program is called based on the second preset interface, and the test parameters are input into the preset version test program so that the preset version test program executes the test operation corresponding to the test item based on the test parameters. At the same time, based on the correspondence between the test operation identifier and the preset test status, the test status corresponding to the test operation identifier is determined. When the test status corresponding to the test operation identifier is the test completed, the test number of tests for the test item is determined, and the test number is compared with the target execution number. When the comparison result is that the test number is less than the target execution number, the test operation of the test item continues to be executed until the test number reaches the target execution number. When the comparison result is that the test number is greater than or equal to the target execution number, a corresponding test report is generated. Thus, the test items corresponding to each target protocol and the execution number of each test item can be configured according to actual conditions, thereby realizing flexible and automated testing of the target protocol test and improving the flexibility of automated testing.

[0066] In an embodiment of the present disclosure, the protocol testing method may further include: based on the correspondence between a preset download identifier and a download status, when it is determined that the download status corresponding to the download identifier is a download failure, determining that the download of the latest version of the target protocol has failed, deleting the file that failed to download, and performing a re-download operation of the latest version of the target protocol after a preset time interval until the download of the latest version of the target protocol is successful.

[0067] In the embodiment of the present disclosure, the file that fails to be downloaded can be understood as a discarded file generated during the download operation.

[0068] The preset time may be a preset interval time period, such as 10 minutes, then the download operation is performed after an interval of 10 minutes.

[0069] In the disclosed embodiments, when the latest version of the target protocol fails to be downloaded, the files that failed to be downloaded can be deleted, thereby avoiding the failure of the re-download operation due to the failure to delete the files that failed to be downloaded. At the same time, the re-download operation is performed after a preset interval until the latest version of the target protocol is successfully downloaded, thereby avoiding the failure of the re-download operation due to network factors, busy factors of the device processing transactions, etc. At the same time, it also avoids the situation where the download is stopped due to unsuccessful download, which ultimately leads to the failure to execute subsequent operations.

[0070] In the disclosed embodiment, the protocol testing method may further include: when it is determined that the flash status corresponding to the flash identifier is a flash failure based on the correspondence between the preset flash identifier and the flash status, determining that the flashing of the latest version of the target protocol has failed, calling a preset power-on program, and re-powering on the test device based on the preset power-on program; in response to the successful re-powering on of the test device, determining the number of executions corresponding to the flash operation; when the number of executions is less than or equal to a preset number threshold, performing a re-flash operation of the latest version of the target protocol; when the number of executions is greater than the preset number threshold, generating a first test defect report, and reporting the first test defect report.

[0071] In the embodiment of the present disclosure, the preset power-on program can be understood as a pre-set program for re-powering on the test equipment, wherein the re-powered test equipment may include a power supply, a relay, a test auxiliary device, and the like.

[0072] The first test defect report can be understood as a test defect report generated based on information such as the flash process, flash log, flash time, flash failure reason, and identification information of the latest version of the target protocol of each flash operation in at least two flash operations.

[0073] Reporting the first test defect report may include at least one of reporting the first test defect report to a test platform center, reporting to a defect management center, and sending the first test defect report to relevant testers in the form of a message.

[0074] In the disclosed embodiment, when the latest version of the target protocol fails to be flashed, the test device can be powered on again, and the flash operation of the latest version of the target protocol can be performed again after the test device is powered on again, thereby increasing the probability of a successful flash operation and further improving the test efficiency.

[0075] In an embodiment of the present disclosure, generating a target test report corresponding to a test operation may specifically include: obtaining a test sub-report corresponding to at least one test item; performing format conversion processing on at least one test sub-report, and integrating the at least one test sub-report after the format conversion processing to obtain a target test report.

[0076] In the embodiment of the present disclosure, the format conversion process refers to converting the file format of the test sub-report to ensure that the file format of the test sub-report can be applicable to different test platform centers.

[0077] In the disclosed embodiment, a target test report can be generated by performing format conversion and integration processing on the test sub-reports corresponding to each test item, so as to facilitate subsequent testers to view the target test report.

[0078] Figure 2 is a flow chart of a defect reporting method provided by an embodiment of the present disclosure, such as Figure 2 As shown, the defect reporting method may include the following steps:

[0079] S210: After generating a target test report corresponding to the test operation, perform a failed item capture operation on the target test report, and determine whether the target test report has at least one failed item based on a capture result corresponding to the failed item capture operation.

[0080] In the embodiment of the present disclosure, a failed item is an item whose test result indicates a test failure.

[0081] The specific implementation method of crawling failed items is similar to the existing implementation method of crawling target text in a document, and will not be described in detail here.

[0082] In the embodiment of the present disclosure, when it is determined that the target test report has at least one failed item, step S220 is executed, otherwise, the target test report is directly reported.

[0083] S220. When it is determined that the target test report has at least one failed item, extract test item information corresponding to the at least one failed item and test information corresponding to the test operation.

[0084] In the embodiment of the present disclosure, the test item information may include information such as the test item name, test steps, test logs, and test message files.

[0085] The test information may include information such as the test time corresponding to the test operation, the test version information of the target protocol, etc.

[0086] S230: Generate a second test defect report based on the test item information and the test information, and report the second test defect report.

[0087] In the embodiment of the present disclosure, after obtaining the test item information and the test information, the electronic device generates a second test defect report according to the test item information and the test information, and performs reporting processing on the second test defect report based on preset reporting rules. The specific reporting processing method is similar to the above-mentioned reporting processing method for the first test defect report, and will not be repeated here.

[0088] In the embodiment of the present disclosure, after the first test defect report and the second test defect report are reported and processed, the confirmation status of the first test defect report and the second test defect report can also be automatically analyzed to obtain the confirmation status corresponding to each failed item, and the confirmation status is displayed.

[0089] The confirmation status includes the problem confirmation status, the status where more information is required to confirm whether a defect has occurred, namely the moreinfo status, the tester pending confirmation status, etc. Thus, corresponding measures can be conveniently executed according to different confirmation statuses.

[0090] In the embodiment of the present disclosure, after generating the target test report, it is possible to determine whether there is at least one failed item in the target test report, and then when there is at least one failed item, a second test defect report is generated based on the test item information of the failed item and the test information corresponding to the test operation, and the second test defect report is reported, thereby facilitating the test personnel to further analyze and improve the test defects, i.e., the failed items.

[0091] Figure 3 is a flowchart of another protocol testing method provided by an embodiment of the present disclosure, such as Figure 3 As shown, the protocol testing method may include the following steps:

[0092] S310: In response to the version update of the target protocol, execute a download operation of the latest version of the target protocol.

[0093] S320: When it is determined that the download is successful, a preset version flashing program is called based on the first preset interface, and a flashing operation is performed on the latest version of the target protocol based on the preset version flashing program.

[0094] In the embodiment of the present disclosure, when performing a flashing operation, it is determined whether the flashing is successful. If the flashing is successful, step S360 is executed; if the flashing fails, steps S340-S350 are executed.

[0095] S330: When it is determined that the download fails, the file that failed to be downloaded is deleted, and the latest version of the target protocol is downloaded again after a preset time interval until the latest version of the target protocol is successfully downloaded.

[0096] S340: When it is determined that the flashing fails, call a preset power-on program, re-power on the test device based on the preset power-on program, and in response to the test device being re-powered on successfully, perform another flashing operation based on a preset flashing rule.

[0097] S350: If the flashing is still not successful within the preset number of times, a first test defect report is generated and reported.

[0098] S360: When it is determined that the flashing is successful, a preset version test program is called based on the second preset interface, and a test operation is performed on at least one test item in a preset test environment based on the preset version test program.

[0099] S370. Obtain a test sub-report corresponding to at least one test item.

[0100] S380: Perform format conversion processing on at least one test sub-report, and integrate the at least one test sub-report after the format conversion processing to obtain a target test report.

[0101] S390: Perform a failed item capture operation on the target test report, and determine whether there is at least one failed item.

[0102] In the embodiment of the present disclosure, when it is determined that there is at least one failed item, step S3010 is executed, otherwise, step S3020 is executed.

[0103] S3010: extract test item information corresponding to at least one failed item and test information corresponding to the test operation, generate a second test defect report based on the test item information and the test information, and report the second test defect report.

[0104] S3020. Report the target test report.

[0105] It should be noted that the specific implementation of the above steps S310-S3010 is similar to the implementation of the relevant technical features in the above embodiments of the present disclosure, and will not be repeated here.

[0106] In the embodiments of the present disclosure, the test steps of the latest version of the target protocol can be automatically implemented in response to the version update of the target protocol, and the situations that may be encountered in the test step are set in each test step, ensuring the efficient and fast execution of the latest version of the target protocol without the need for manual operation by the tester, thereby achieving seamless connection of the entire testing process, thereby reducing labor costs and testing time, and improving testing efficiency.

[0107] In the disclosed embodiment, by automatically downloading and flashing the latest version of the target protocol, executing test operations by itself, generating test reports, and submitting test defect reports, the test time is shortened to 30% of manual testing, thereby improving test efficiency and ensuring test quality.

[0108] Figure 4 1 is a schematic diagram of the structure of a protocol testing device provided in an embodiment of the present disclosure. The protocol testing device in the embodiment of the present disclosure can be set in an electronic device, and the electronic device can be a server or a terminal or a server cluster, wherein the terminal can specifically include a computer or a tablet computer, a vehicle-mounted terminal, or any device that can be used to process the protocol testing method, etc., which is not limited here.

[0109] like Figure 4 As shown, the protocol testing device 400 may include a protocol downloading module 410 , a protocol flashing module 420 and a protocol testing module 430 .

[0110] The protocol download module 410 can be used to obtain the timestamp of the target protocol under the target path based on a preset detection program, and determine the latest version of the target protocol based on the timestamp, obtain the version number of the latest version of the target protocol, and determine whether the latest version of the target protocol is the target protocol to be updated based on the version number and the current version number. If so, execute the download operation of the latest version of the target protocol.

[0111] The protocol flashing module 420 can be used to obtain a download identifier corresponding to a download operation. When it is determined that the download status corresponding to the download identifier is a successful download, a preset version flashing program is called based on a first preset interface, and a flashing operation of the latest version of the target protocol is performed based on the preset version flashing program.

[0112] The protocol testing module 430 can be used to obtain a flash identifier corresponding to a flash operation. When it is determined that the flash status corresponding to the flash identifier is a successful flash, a preset version testing program is called based on a second preset interface. Based on the preset version testing program, a test operation of at least one test item corresponding to the latest version of the target protocol is executed in a preset test environment, and a target test report corresponding to the test operation is generated.

[0113] In the embodiment of the present disclosure, it is possible to obtain the timestamp of the target protocol under the target path based on a preset detection program, determine the latest version of the target protocol based on the timestamp, obtain the version number of the target protocol of the latest version, determine whether the target protocol of the latest version is the target protocol of the version to be updated based on the version number and the current version number, and if the target protocol of the latest version is the target protocol of the version to be updated, perform a download operation of the target protocol of the latest version, obtain a download identifier corresponding to the download operation, and when it is determined that the download status corresponding to the download identifier is a successful download, call a preset version flashing program based on a first preset interface, perform a flashing operation of the target protocol of the latest version based on the preset version flashing program, and obtain the flashing operation. A corresponding flash mark is made, and when it is determined that the flash status corresponding to the flash mark is a successful flash, a preset version test program is called based on a second preset interface, and a test operation of at least one test item corresponding to the latest version of the target protocol is performed in a preset test environment based on the preset version test program, and a target test report corresponding to the test operation is generated. Therefore, when it is determined that the version of the target protocol is updated, the response program can be called based on the preset interface to automatically realize the entire process of downloading, flashing, and testing the latest version of the target protocol, without the need for manual operation by the tester, and the seamless connection of the entire test process can be achieved, thereby reducing labor costs and testing time, while improving testing efficiency.

[0114] In some embodiments of the present disclosure, the latest version of the target protocol includes at least one test item and a target execution number corresponding to each test item.

[0115] The protocol test module 430 can be specifically used to obtain the test parameters corresponding to each test item; for each test item, call the preset version test program based on the second preset interface, so that the preset version test program executes the test operation corresponding to the test item based on the test parameters; when determining that the test of the test item is completed based on the correspondence between the test operation identifier and the preset test status, determine the number of tests for the test item, and compare the number of tests with the target execution number; when the comparison result is that the number of tests is less than the target execution number, continue to execute the test operation of the test item until the number of tests reaches the target execution number.

[0116] In some embodiments of the present disclosure, the protocol testing device 400 may further include a first retry module.

[0117] The first retry module can be used to determine that the download status corresponding to the download identifier is a download failure based on the correspondence between the preset download identifier and the download status, determine that the download of the latest version of the target protocol has failed, delete the file that failed to download, and perform the download operation of the latest version of the target protocol again after a preset time interval until the download of the latest version of the target protocol is successful.

[0118] In some embodiments of the present disclosure, the protocol testing device 400 may further include a second retry module.

[0119] The second retry module can be used to determine that the flashing of the latest version of the target protocol has failed when the flashing status corresponding to the flashing identifier is a flashing failure based on the correspondence between the preset flashing identifier and the flashing status, call the preset power-on program, and re-power on the test device based on the preset power-on program; in response to the successful re-powering on of the test device, determine the number of executions corresponding to the flashing operation; when the number of executions is less than or equal to a preset number threshold, execute the re-flash operation of the latest version of the target protocol; when the number of executions is greater than the preset number threshold, generate a first test defect report, and report the first test defect report.

[0120] In some embodiments of the present disclosure, the protocol test module 430 can also be specifically used to obtain test sub-reports corresponding to at least one test item; perform format conversion processing on at least one test sub-report, and integrate the at least one test sub-report after the format conversion processing to obtain a target test report.

[0121] In some embodiments of the present disclosure, the protocol testing device 400 may further include a defect reporting module.

[0122] The defect reporting module can be used to perform a failed item capture operation on the target test report after generating a target test report corresponding to the test operation, and determine whether there is at least one failed item in the target test report based on the capture result corresponding to the failed item capture operation; when it is determined that there is at least one failed item in the target test report, extract the test project information corresponding to the at least one failed item and the test information corresponding to the test operation; generate a second test defect report based on the test project information and the test information, and report the second test defect report.

[0123] It should be noted that Figure 4 The protocol testing device 400 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.

[0124] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.

[0125] In the disclosed embodiment, Figure 5 The electronic device shown may be a server or a terminal or a server cluster, wherein the terminal may specifically include a computer or a tablet computer, a vehicle-mounted terminal, or any device that can be used for the protocol testing method, etc., which is not limited here.

[0126] like Figure 5 As shown, the electronic device may include a processor 510 and a memory 520 storing computer program instructions.

[0127] Specifically, the processor 510 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0128] The memory 520 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 520 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 520 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 520 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 520 is a non-volatile solid-state memory. In a particular embodiment, the memory 520 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0129] The processor 510 reads and executes the computer program instructions stored in the memory 520 to perform the steps of the protocol testing method provided in the embodiment of the present disclosure.

[0130] In one example, the electronic device may further include a transceiver 530 and a bus 540. Figure 5 As shown, the processor 510, the memory 520 and the transceiver 530 are connected via a bus 540 and communicate with each other.

[0131] The bus 540 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 540 may include one or more buses.

[0132] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the protocol testing method provided by the embodiments of the present disclosure.

[0133] The above-mentioned storage medium may, for example, include a memory 520 of computer program instructions, and the above-mentioned instructions may be executed by the processor 510 of the electronic device to complete the protocol test method provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0134] The embodiments of the present disclosure also provide a vehicle, which includes a protocol testing device or the above-mentioned electronic device, and can implement the various processes and effects in the above-mentioned embodiments of the present disclosure, which will not be elaborated here.

[0135] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0136] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A protocol testing method, characterized in that: The method comprises: Obtaining the timestamp of the target protocol under the target path based on a preset detection program, determining the latest version of the target protocol based on the timestamp, obtaining the version number of the latest version of the target protocol, determining whether the latest version of the target protocol is the target protocol to be updated based on the version number and the current version number, and if so, executing the download operation of the latest version of the target protocol; Obtaining a download identifier corresponding to the download operation, and when determining that the download status corresponding to the download identifier is a successful download, calling a preset version flashing program based on a first preset interface, and performing a flashing operation of the latest version of the target protocol based on the preset version flashing program; Obtain a flash identifier corresponding to the flash operation, and when it is determined that the flash status corresponding to the flash identifier is a successful flash, call a preset version test program based on a second preset interface, and execute a test operation of at least one test item corresponding to the target protocol of the latest version in a preset test environment based on the preset version test program, and generate a target test report corresponding to the test operation.

2. The method according to claim 1, characterized in that The latest version of the target protocol includes at least one test item and a target execution number corresponding to each test item; the calling of a preset version test program based on a second preset interface, and the execution of a test operation of at least one test item corresponding to the latest version of the target protocol in a preset test environment based on the preset version test program, include: Get the test parameters corresponding to each test item; For each test item, calling the preset version test program based on the second preset interface, so that the preset version test program performs the test operation corresponding to the test item based on the test parameters; When it is determined that the test item is completed based on the correspondence between the test operation identifier and the preset test status, the test number of the test item is determined, and the test number is compared with the target execution number; When the comparison result is that the test number is less than the target execution number, the test operation of the test item continues to be executed until the test number reaches the target execution number.

3. The method according to claim 1, characterized in that The method further comprises: When it is determined that the download status corresponding to the download identifier is a download failure based on the correspondence between the preset download identifier and the download status, it is determined that the download of the latest version of the target protocol has failed, the file that failed to be downloaded is deleted, and the latest version of the target protocol is downloaded again after a preset time interval until the latest version of the target protocol is downloaded successfully.

4. The method according to claim 1, characterized in that: The method further comprises: When it is determined that the flashing state corresponding to the flashing identifier is a flashing failure based on the correspondence between the preset flashing identifier and the flashing state, it is determined that the flashing of the latest version of the target protocol fails, a preset power-on program is called, and the test device is powered on again based on the preset power-on program; In response to the test device being powered on again successfully, determining the number of executions corresponding to the flash operation; When the number of executions is less than or equal to a preset number threshold, performing a re-flash operation of the latest version of the target protocol; When the execution times are greater than the preset times threshold, a first test defect report is generated, and the first test defect report is reported.

5. The method according to claim 1 or claim 2, characterized in that: The generating a target test report corresponding to the test operation includes: Obtaining a test sub-report corresponding to each of the at least one test item; The at least one test sub-report is format-converted, and the at least one test sub-report after the format conversion is integrated to obtain the target test report.

6. The method according to claim 1, characterized in that After generating a target test report corresponding to the test operation, the method further includes: Performing a failed item capture operation on the target test report, and determining whether there is at least one failed item in the target test report based on a capture result corresponding to the failed item capture operation; When it is determined that the target test report has at least one failed item, extracting test item information respectively corresponding to the at least one failed item and test information corresponding to the test operation; A second test defect report is generated based on the test item information and the test information, and a reporting process is performed on the second test defect report.

7. A protocol testing device, characterized in that: include: A protocol download module, used to obtain the timestamp of the target protocol under the target path based on a preset detection program, and determine the latest version of the target protocol based on the timestamp, obtain the version number of the latest version of the target protocol, and determine whether the latest version of the target protocol is the target protocol to be updated based on the version number and the current version number, and if so, execute the download operation of the latest version of the target protocol; A protocol flashing module, used to obtain a download identifier corresponding to the download operation, and when determining that the download status corresponding to the download identifier is a successful download, call a preset version flashing program based on a first preset interface, and perform a flashing operation of the latest version of the target protocol based on the preset version flashing program; A protocol testing module is used to obtain a flashing identifier corresponding to the flashing operation. When it is determined that the flashing status corresponding to the flashing identifier is a successful flashing, a preset version testing program is called based on a second preset interface. Based on the preset version testing program, a test operation of at least one test item corresponding to the latest version of the target protocol is executed in a preset test environment, and a target test report corresponding to the test operation is generated.

8. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A vehicle, characterized in that: It comprises the protocol testing device as claimed in claim 7 or the electronic device as claimed in claim 8.