Controller testing method and device, electronic equipment and storage medium
By establishing communication between the diagnostic server and the remote test end, receiving remote test instructions and testing the vehicle controller, the problem of complex operation of vehicle controller diagnostic test in the prior art is solved, and remote diagnosis is realized and automated testing.
Patent Information
- Application Number
- CN202311015043.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art has problems such as complex operation, large functional differences, physical connection dependence and inability to achieve remote diagnosis in the diagnostic test of vehicle controllers.
By establishing communication between the diagnostic server and the remote test end, receiving remote test instructions, testing the controller under test according to the instructions, obtaining response data, and analyzing the response data based on the diagnostic protocol to obtain diagnostic results, and finally sending the diagnostic results to Remote test end.
Remote diagnosis of vehicle controllers is achieved, reducing the professional skills and experience requirements of testers, and reducing the dependence on professional capabilities through automated testing.
Smart Images

Figure CN119472573A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of testing technology, and in particular to a controller testing method and device, electronic equipment, and storage medium. Background Art
[0002] At present, the diagnostic test of vehicle controllers is generally performed using external diagnostic instruments purchased from suppliers. However, the method of using diagnostic instruments to diagnose controllers has the disadvantages of complex operation, different functions of different diagnostic instruments, and reliance on physical connections. Therefore, this method also requires high professional skills and experience of testers; and it is impossible to achieve remote diagnosis of controllers. Therefore, how to achieve remote diagnosis of controllers has become an urgent issue. Summary of the invention
[0003] The present disclosure provides a controller testing method and device, electronic equipment and storage medium, the main purpose of which is to achieve remote diagnosis of a vehicle controller.
[0004] According to a first aspect of the present disclosure, a controller testing method is provided, which is applied to a diagnostic server, wherein the diagnostic server is connected to a host computer, and the host computer is used to establish communication between the diagnostic server and the controller under test; the method comprises:
[0005] Receive remote test instructions sent by the remote test end;
[0006] Testing the controller under test according to the remote test instruction to obtain response data of the controller under test;
[0007] Analyzing the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test;
[0008] The diagnostic result is sent to the remote testing end.
[0009] Optionally, the receiving a remote test instruction sent by the remote test terminal includes:
[0010] Based on a remote service interface, a remote test instruction sent by a remote test terminal is received, wherein the remote service interface is configured on the diagnostic server.
[0011] Optionally, testing the controller under test according to the remote test instruction includes:
[0012] Determining a diagnostic service code corresponding to the remote test instruction based on a diagnostic protocol client, wherein the diagnostic protocol client is configured on the diagnostic server;
[0013] The controller under test is tested based on the diagnostic service code.
[0014] Optionally, the method further includes:
[0015] Initializing the diagnostic protocol client and creating a receiving thread for the response data;
[0016] Based on the receiving thread, response data of the controller under test is received.
[0017] Optionally, analyzing the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test includes:
[0018] Determining a response type and a response value corresponding to the response data according to the diagnostic protocol;
[0019] Based on the response type and the response value, a diagnosis result of the controller under test is generated.
[0020] Optionally, the method further includes:
[0021] Based on the context switching method, the remote service interface, the diagnostic protocol client and the threads created by them are managed.
[0022] According to a second aspect of the present disclosure, a controller testing method is provided, which is applied to a remote testing end and includes:
[0023] Loading test cases and generating remote test instructions corresponding to the test cases;
[0024] Sending the remote test instruction to a diagnostic server, wherein the diagnostic server tests the controller under test according to the remote test instruction to obtain response data of the controller under test, and the diagnostic server analyzes the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test;
[0025] The diagnosis result sent by the diagnosis server is received.
[0026] Optionally, the loading of the test case and generating a remote test instruction corresponding to the test case includes:
[0027] Parsing the test case to generate target parameters;
[0028] Based on a preset transmission format, the target parameters are encapsulated into the remote test instructions.
[0029] According to a third aspect of the present disclosure, a controller testing device is provided, which is applied to a diagnostic server, wherein the diagnostic server is connected to a host computer, and the host computer is used to establish communication between the diagnostic server and the controller under test; the device comprises:
[0030] A first receiving unit, used for receiving a remote test instruction sent by a remote test terminal;
[0031] A testing unit, used to test the controller under test according to the remote test instruction and obtain response data of the controller under test;
[0032] An analysis unit, configured to analyze the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test;
[0033] The first sending unit is used to send the diagnosis result to the remote test end.
[0034] Optionally, the first receiving unit is further used for:
[0035] Based on a remote service interface, a remote test instruction sent by a remote test terminal is received, wherein the remote service interface is configured on the diagnostic server.
[0036] Optionally, the testing unit includes:
[0037] A first determination module, configured to determine a diagnostic service code corresponding to the remote test instruction based on a diagnostic protocol client, wherein the diagnostic protocol client is configured on the diagnostic server;
[0038] A testing module is used to test the controller under test based on the diagnostic service code.
[0039] Optionally, the device further comprises:
[0040] A creation unit, used for initializing the diagnostic protocol client and creating a receiving thread for the response data;
[0041] The third receiving unit is used to receive the response data of the controller under test based on the receiving thread.
[0042] Optionally, the analysis unit includes:
[0043] A second determination module, used to determine a response type and a response value corresponding to the response data according to the diagnostic protocol;
[0044] A generating module is used to generate a diagnosis result of the controller under test based on the response type and the response value.
[0045] Optionally, the device further comprises:
[0046] The management unit is used to manage the remote service interface, the diagnostic protocol client and the threads created by them based on context switching.
[0047] According to a fourth aspect of the present disclosure, a controller testing device is provided, which is applied to a remote testing end and includes:
[0048] A generating unit, used for loading a test case and generating a remote test instruction corresponding to the test case;
[0049] a second sending unit, configured to send the remote test instruction to a diagnostic server, wherein the diagnostic server tests the controller under test according to the remote test instruction to obtain response data of the controller under test, and the diagnostic server analyzes the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test;
[0050] The second receiving unit is used to receive the diagnosis result sent by the diagnosis server.
[0051] Optionally, the generating unit includes:
[0052] A parsing module, used to parse the test case and generate target parameters;
[0053] The encapsulation module is used to encapsulate the target parameters into the remote test instructions based on a preset transmission format.
[0054] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:
[0055] at least one processor; and
[0056] a memory communicatively connected to the at least one processor; wherein,
[0057] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect and / or the second aspect.
[0058] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect and / or the second aspect.
[0059] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method described in the first aspect and / or the second aspect.
[0060] The present disclosure provides a controller testing method and device, electronic device and storage medium, receiving a remote test instruction sent by a remote test terminal; testing the tested controller according to the remote test instruction to obtain response data of the tested controller; analyzing the response data based on a diagnostic protocol to obtain a diagnostic result of the tested controller; and sending the diagnostic result to the remote test terminal. Compared with the related art, the embodiment of the present disclosure tests the tested controller by receiving a remote test instruction from a remote test terminal; remote testing of the tested controller can be realized, and the remote test instruction can realize automatic testing of the tested controller, thereby reducing the reliance on the professional ability of the tester.
[0061] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0063] Figure 1 A flowchart of a controller testing method provided by an embodiment of the present disclosure;
[0064] Figure 2 It is a schematic diagram of a port forwarding function;
[0065] Figure 3 A flowchart of another controller testing method provided by an embodiment of the present disclosure;
[0066] Figure 4 A schematic diagram for a controller test;
[0067] Figure 5 A flowchart of another controller testing method provided by an embodiment of the present disclosure;
[0068] Figure 6 A schematic diagram of the structure of a controller testing device provided in an embodiment of the present disclosure;
[0069] Figure 7 A schematic diagram of the structure of a controller testing device provided in an embodiment of the present disclosure;
[0070] Figure 8 A schematic diagram of the structure of a controller testing device provided in an embodiment of the present disclosure;
[0071] Fig. 9 A schematic block diagram of an exemplary electronic device 600 provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0072] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0073] The following describes the controller testing method and apparatus, electronic device, and storage medium according to the embodiments of the present disclosure with reference to the accompanying drawings.
[0074] Figure 1 A flowchart of a controller testing method provided in an embodiment of the present disclosure.
[0075] like Figure 1 As shown, the method comprises the following steps:
[0076] Step 101: Receive a remote test instruction sent by a remote test terminal.
[0077] In an embodiment of the present disclosure, the remote service interface is used to receive a remote test instruction sent by a remote test terminal; the remote service interface is a remote diagnostic interface program configured in a diagnostic server. The remote test instruction includes target parameters for the controller under test. The remote service interface tests the controller under test through the remote service interface based on the target parameters in the remote test instruction. The remote service interface can be understood as a client that provides a diagnostic service interface configured by the diagnostic server.
[0078] The remote test end is a program or physical terminal that performs remote testing by calling a remote service interface configured by the diagnostic service end, and the present disclosure does not limit this.
[0079] Step 102: Test the controller under test according to the remote test instruction to obtain response data of the controller under test.
[0080] In the embodiment of the present disclosure, after receiving the remote test instruction, the remote service interface in the diagnostic server calls the diagnostic protocol client to test the controller under test. After the test of the controller under test is completed, response data corresponding to the test case will be obtained.
[0081] The diagnostic server is connected to the host computer, which is used to establish communication between the diagnostic server and the controller under test. Figure 2Take 172.31.10.32 (port 13400) of TCP Server B as an example to explain the connection relationship between the diagnostic server, the host computer and the controller under test. If it is not possible to directly connect to TCP Server B (analogous to the controller under test), the TCP Server B address 172.31.10.32 and port 13400 are forwarded to TCP Server A (analogous to the host computer) with port 13401. Usually, TCP Server A and TCP Server B are in the same local area network, and the IP can be directly connected (pinged) and accessed. If a TCP Client (analogous to the diagnostic server) wants to remotely access 172.31.10.32 (port 13400) of TCP Server B, it can access TCP Server B by remotely accessing the IP of TCP Server A (port 13401). The diagnostic protocol client is a client configured according to the diagnostic protocol and deployed in the diagnostic server; it should be noted that the embodiments of the present disclosure do not limit the specific diagnostic protocol of the diagnostic protocol.
[0082] In some embodiments of the present disclosure, the service address (IP) and port of the controller under test are mapped to the local (host computer) through the port forwarding program deployed in the host computer; the connection status between the server and the controller under test and the connection status between the server and the client are managed respectively through the client deployed in the host computer and the server in the diagnostic server. This improves the stability of the communication between the diagnostic server and the controller under test.
[0083] Step 103: Analyze the response data based on the diagnostic protocol to obtain a diagnostic result of the controller under test.
[0084] In an embodiment of the present disclosure, after the test of the controller under test is completed according to the remote test instruction, the response data of the controller under test will be obtained. The controller under test transmits the response data to the host computer, and the host computer forwards the response data to the diagnostic server. In the diagnostic protocol client of the diagnostic server, the response data is analyzed based on the diagnostic protocol. Exemplarily, the remote test instruction includes an instruction to read the vehicle identification code. After receiving the instruction to read the vehicle identification code, the controller under test encapsulates the vehicle identification code into response data and sends it to the diagnostic server. The diagnostic protocol client then parses the response data according to the diagnostic protocol to obtain the vehicle identification code. It can be understood that if different tests are performed on the controller under test, the response data obtained will be very different; it needs to be parsed according to the diagnostic protocol to obtain the corresponding diagnostic result.
[0085] Step 104: Send the diagnosis result to the remote testing end.
[0086] In the embodiment of the present disclosure, after the diagnostic protocol client obtains the diagnostic result corresponding to the remote test instruction, the diagnostic result is sent to the remote test end. Based on this, remote diagnosis of the controller is realized, and the tester can get rid of the limitations of time and space.
[0087] In some embodiments of the present disclosure, the obtained diagnostic results, response data, etc. are uploaded to the remote test segment end; the automatic collection of diagnostic results and response data, as well as the management of diagnostic data can be achieved.
[0088] The present disclosure provides a controller testing method, which includes receiving a remote test instruction sent by a remote test terminal; testing the controller under test according to the remote test instruction to obtain response data of the controller under test; analyzing the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test; and sending the diagnostic result to the remote test terminal. Compared with the related art, the embodiment of the present disclosure tests the controller under test by receiving a remote test instruction from a remote test terminal; remote testing of the controller under test can be realized, and the remote test instruction can realize automatic testing of the controller under test, thereby reducing the reliance on the professional ability of the tester.
[0089] In order to clearly illustrate the embodiment of the present disclosure, the embodiment of the present disclosure provides a flowchart of another controller testing method.
[0090] like Figure 3 As shown, the method comprises the following steps:
[0091] Step 201: receiving a remote test instruction sent by a remote test terminal based on a remote service interface.
[0092] Specifically, in the disclosed embodiment, the remote service interface is used to receive remote test instructions sent by the remote test terminal; the remote service interface is a remote diagnostic interface program configured in the diagnostic server. The remote service interface can provide a remote diagnostic HTTP request interface to be responsible for receiving remote test instructions. The remote service interface accepts target parameters for data transmission in JSON format, and the target parameters include but are not limited to: target IP address, diagnostic port, diagnostic logical address, diagnostic security mask (used for DoIP protocol security access algorithm), security access level, diagnostic service ID (UDSonIP protocol), diagnostic sub-function ID (UDSonIP protocol), diagnostic data identifier (Diagnostic Data Identifier, DID) diagnostic data, etc.
[0093] Step 202: Determine the diagnostic service code corresponding to the remote test instruction based on the diagnostic protocol client.
[0094] Step 203: testing the controller under test based on the diagnostic service code.
[0095] Specifically, in the embodiments of the present disclosure, remote testing of the controller is implemented based on the DoIP diagnostic protocol. The diagnostic service is encoded as a diagnostic service ID. By parsing the remote test instructions, the diagnostic service ID (UDSonIP protocol) is obtained. The diagnostic service ID is sent to the controller under test to test the controller under test. It should be noted that both the UDSonIP protocol and the DoIP protocol are based on Ethernet communication protocols to transmit UDS protocol data. In essence, it is mainly based on the UDS protocol to test the controller under test. The subsequent differences between the UDSonIP protocol and the DoIP protocol in this disclosure will not be repeated.
[0096] Step 204: Determine the response type and response value corresponding to the response data according to the diagnosis protocol.
[0097] Step 205: Generate a diagnosis result of the controller under test based on the response type and the response value.
[0098] Specifically, in the embodiment of the present disclosure, the diagnostic protocol is the UDSonIP protocol. After the controller under test is tested according to the remote test instruction, the response data of the controller under test will be obtained. Figure 4 As shown in the figure, DoIP Client is a diagnostic protocol client; a client developed according to the DoIP protocol. DoIP Client parses the response data according to the UDSonIP protocol to obtain the corresponding response type and response value. The response type and response value are combined with other data, and packaged according to a predetermined format to obtain data that can be transmitted to the remote test end. Other data can be, for example, the IP, port and other data of the controller under test, which is not limited in the embodiments of the present disclosure.
[0099] Step 206: Send the diagnosis result to the remote testing end.
[0100] Specifically, in the embodiment of the present disclosure, after the diagnostic protocol client obtains the diagnostic result corresponding to the remote test instruction, the diagnostic result is sent to the remote test end. The diagnostic result is transmitted to the remote test end in the form of JSON format data.
[0101] In summary, the embodiments of the present disclosure can not only realize remote testing of the controller, but also generate remote testing instructions based on test cases, which can lower the operating threshold of the tester, and has a unified diagnostic interface (remote service interface) to realize automated testing.
[0102] As an implementable manner of the embodiment of the present disclosure, when the diagnostic protocol client is initialized, a receiving thread for the response data is created; based on the receiving thread, the response data of the controller under test is received.
[0103] Specifically, when the DoIP Client is initialized, the target IP, target port, maximum delay of UDS response, etc. in the DoIP protocol can be specified, which are the basic parameters of the DoIP protocol. When the DoIP client is initialized, a response data receiving thread is created to receive the response data of the controller under test.
[0104] As an achievable method of the disclosed embodiment, when the DoIP client performs diagnosis, in order to prevent the DoIP client from creating a receiving thread or other threads, causing the program to be unable to exit, thereby affecting the diagnosis, the remote service interface, the diagnostic protocol client and the threads created by them can be managed based on context switching.
[0105] Specifically, the program design uses context switching to complete a diagnostic life cycle. Exemplarily, taking Python language as an example, the With statement is used to transform the client instance. The execution subject in the With statement exits and destroys the thread after execution. The remote service interface calls the diagnostic interface of the DoIP client in the context through the target parameter information, thereby creating a DoIP client instance. The instance calls different diagnostic services according to different service IDs to perform diagnostic processes such as (session control, read and write DID, read DTC, clear DTC, etc.), and judges the response type, and finally returns the response type and response value. The target parameter information may include but is not limited to the target IP address, diagnostic port, diagnostic logical address, diagnostic security mask (used for DoIP protocol security access algorithm), security access level and other information.
[0106] In order to clearly illustrate the embodiment of the present disclosure, the embodiment of the present disclosure provides a flowchart of another controller testing method.
[0107] like Figure 5 As shown, the method comprises the following steps:
[0108] Step 301: load a test case and generate a remote test instruction corresponding to the test case.
[0109] As a refinement of an embodiment of the present disclosure, the loading of the test case and the generation of the remote test instruction corresponding to the test case include: parsing the test case to generate target parameters; and encapsulating the target parameters into the remote test instruction based on a preset transmission format.
[0110] In an embodiment of the present disclosure, a complete test case is imported into a remote test terminal, and the test case is parsed to generate corresponding target parameters. The target parameters include, but are not limited to: target IP address, diagnostic port, diagnostic logical address, diagnostic security mask (used for DoIP protocol for security access algorithm), security access level, diagnostic service ID (UDSonIP protocol), diagnostic sub-function ID (UDSonIP protocol), diagnostic data identifier (Diagnostic Data Identifier, DID) diagnostic data, etc. The preset transmission format is JSON format, and the remote test terminal encapsulates the target parameters into data in JSON format.
[0111] Step 302, sending the remote test instruction to the diagnostic server, wherein the diagnostic server tests the controller under test according to the remote test instruction to obtain response data of the controller under test, and the diagnostic server analyzes the response data based on the diagnostic protocol to obtain the diagnostic result of the controller under test.
[0112] In an embodiment of the present disclosure, a remote test instruction is sent to a diagnostic server so that the diagnostic server tests the controller under test according to the remote test instruction.
[0113] In some embodiments of the present disclosure, the diagnostic service interface of the remote service interface can also be called by the Web terminal. Develop a Web terminal, and design a test bench management system in the Web terminal; display the host computer address and other information of these benches on the system page, and maintain the basic information. The Web page has a better UI and intuitive display capabilities, which can simplify user operations. Users can design diagnostic test cases (i.e., diagnostic processes) or diagnostic debugging on the Web terminal, and support the saving function of these debugging history or case studies to facilitate data analysis and result display. Users can perform remote diagnosis in multiple forms and on multiple devices on the Web terminal.
[0114] Step 303: receiving the diagnosis result sent by the diagnosis server.
[0115] In the embodiments of the present disclosure, the remote service interface provides a diagnostic service interface with a unified format, high compatibility, and strong portability. Therefore, the remote test end can conveniently call the diagnostic service interface, and can realize remote diagnosis of the controller.
[0116] It should be noted that the embodiments of the present disclosure may include multiple steps. For the convenience of description, these steps are numbered, but these numbers do not limit the execution time slots or execution order between the steps; these steps can be implemented in any order, and the embodiments of the present disclosure do not limit this.
[0117] Corresponding to the above controller testing method, the present invention also provides a controller testing device. Since the device embodiment of the present invention corresponds to the above method embodiment, details not disclosed in the device embodiment can be referred to the above method embodiment, and will not be repeated in the present invention.
[0118] Figure 6 A schematic diagram of a controller test device provided in an embodiment of the present disclosure, such as Figure 6 As shown, including:
[0119] A first receiving unit 41 is used to receive a remote test instruction sent by a remote test terminal;
[0120] The testing unit 42 is used to test the controller under test according to the remote testing instruction and obtain response data of the controller under test;
[0121] An analysis unit 43, configured to analyze the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test;
[0122] The first sending unit 44 is configured to send the diagnosis result to the remote test end.
[0123] The present disclosure provides a controller testing device, which receives a remote test instruction sent by a remote test terminal; tests the controller under test according to the remote test instruction to obtain response data of the controller under test; analyzes the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test; and sends the diagnostic result to the remote test terminal. Compared with the related art, the embodiment of the present disclosure tests the controller under test by receiving a remote test instruction from a remote test terminal; can realize remote testing of the controller under test, and the remote test instruction can realize automatic testing of the controller under test, thereby reducing the dependence on the professional ability of the tester.
[0124] Furthermore, in a possible implementation of this embodiment, the first receiving unit 41 is further configured to:
[0125] Based on a remote service interface, a remote test instruction sent by a remote test terminal is received, wherein the remote service interface is configured on the diagnostic server.
[0126] Furthermore, in a possible implementation of this embodiment, Figure 7 As shown, the testing unit 42 includes:
[0127] A first determination module 421 is used to determine the diagnostic service code corresponding to the remote test instruction based on the diagnostic protocol client, wherein the diagnostic protocol client is configured on the diagnostic server;
[0128] The testing module 422 is used to test the controller under test based on the diagnostic service code.
[0129] Furthermore, in a possible implementation of this embodiment, Figure 7 As shown, the device also includes:
[0130] A creation unit 45, configured to initialize the diagnostic protocol client and create a receiving thread for the response data;
[0131] The third receiving unit 46 is used to receive the response data of the controller under test based on the receiving thread.
[0132] Furthermore, in a possible implementation of this embodiment, Figure 7 As shown, the analysis unit 43 includes:
[0133] A second determination module 431 is used to determine a response type and a response value corresponding to the response data according to the diagnosis protocol;
[0134] The generating module 432 is used to generate a diagnosis result of the controller under test based on the response type and the response value.
[0135] Furthermore, in a possible implementation of this embodiment, Figure 7 As shown, the device also includes:
[0136] The management unit 47 is used to manage the remote service interface, the diagnostic protocol client and the threads created by them based on context switching.
[0137] Figure 8 A schematic diagram of a controller test device provided in an embodiment of the present disclosure, such as Figure 8 As shown, including:
[0138] A generating unit 51 is used to load a test case and generate a remote test instruction corresponding to the test case;
[0139] A second sending unit 52 is used to send the remote test instruction to a diagnostic server, wherein the diagnostic server tests the controller under test according to the remote test instruction to obtain response data of the controller under test, and the diagnostic server analyzes the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test;
[0140] The second receiving unit 53 is used to receive the diagnosis result sent by the diagnosis server.
[0141] Furthermore, in a possible implementation of this embodiment, the generating unit 51 includes:
[0142] The parsing module 511 is used to parse the test case and generate target parameters;
[0143] The encapsulation module 512 is used to encapsulate the target parameter into the remote test instruction based on a preset transmission format.
[0144] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.
[0145] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0146] Fig. 9 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0147] like Fig. 9 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 602 or a computer program loaded from a storage unit 608 to a RAM (Random Access Memory) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An I / O (Input / Output) interface 605 is also connected to the bus 604.
[0148] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0149] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as a method for controller testing. For example, in some embodiments, the method for controller testing may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the aforementioned controller testing method in any other appropriate manner (for example, by means of firmware).
[0150] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0151] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0152] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0153] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0154] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0155] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0156] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0157] The various numerical numbers such as first and second involved in the present disclosure are only for the convenience of description and are not used to limit the scope of the embodiments of the present disclosure, but also indicate the order of precedence.
[0158] At least one in the present disclosure may also be described as one or more, and a plurality may be two, three, four or more, which is not limited in the present disclosure. In the embodiments of the present disclosure, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D", etc., and there is no order of precedence or size between the technical features described by the "first", "second", "third", "A", "B", "C" and "D".
[0159] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0160] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A controller testing method, characterized in that: Applied to a diagnostic server, the diagnostic server is connected to a host computer, and the host computer is used to establish communication between the diagnostic server and the controller under test; the method includes: Receive remote test instructions sent by the remote test end; Testing the controller under test according to the remote test instruction to obtain response data of the controller under test; Analyzing the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test; The diagnostic result is sent to the remote testing end.
2. The method according to claim 1, characterized in that The receiving of the remote test instruction sent by the remote test terminal includes: Based on a remote service interface, a remote test instruction sent by a remote test terminal is received, wherein the remote service interface is configured on the diagnostic server.
3. The method according to claim 1, characterized in that The step of testing the controller under test according to the remote test instruction comprises: Determining a diagnostic service code corresponding to the remote test instruction based on a diagnostic protocol client, wherein the diagnostic protocol client is configured on the diagnostic server; The controller under test is tested based on the diagnostic service code.
4. The method according to claim 1, characterized in that The method further comprises: Initializing the diagnostic protocol client and creating a receiving thread for the response data; Based on the receiving thread, response data of the controller under test is received.
5. The method according to claim 1, characterized in that The step of analyzing the response data based on the diagnostic protocol to obtain the diagnostic result of the controller under test includes: Determining a response type and a response value corresponding to the response data according to the diagnostic protocol; Based on the response type and the response value, a diagnosis result of the controller under test is generated.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Based on the context switching method, the remote service interface, the diagnostic protocol client and the threads created by them are managed.
7. A controller testing method, characterized in that: Applied to remote test end, including: Loading test cases and generating remote test instructions corresponding to the test cases; Sending the remote test instruction to a diagnostic server, wherein the diagnostic server tests the controller under test according to the remote test instruction to obtain response data of the controller under test, and the diagnostic server analyzes the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test; The diagnosis result sent by the diagnosis server is received.
8. The method according to claim 7, characterized in that The loading of the test case and generating the remote test instruction corresponding to the test case includes: Parsing the test case to generate target parameters; Based on a preset transmission format, the target parameters are encapsulated into the remote test instructions.
9. A controller testing device, characterized in that: Applied to a diagnostic server, the device comprises: A first receiving unit, used for receiving a remote test instruction sent by a remote test terminal; A testing unit, used to test the controller under test according to the remote test instruction and obtain response data of the controller under test; An analysis unit, configured to analyze the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test; The first sending unit is used to send the diagnosis result to the remote test end.
10. A device for testing a controller, characterized in that: Applied to remote test end, including: A generating unit, used for loading a test case and generating a remote test instruction corresponding to the test case; a second sending unit, configured to send the remote test instruction to a diagnostic server, wherein the diagnostic server tests the controller under test according to the remote test instruction to obtain response data of the controller under test, and the diagnostic server analyzes the response data based on a diagnostic protocol to obtain a diagnostic result of the controller under test; The second receiving unit is used to receive the diagnosis result sent by the diagnosis server.
11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.