SOA service test method, system, device and medium

By obtaining and parsing test cases, packets and service matrix in SOA service tests, and automatically running test scripts, the high-cost and cumbersome testing problems in the existing technology are solved, the testing efficiency and accuracy are improved, and the SOA service testing is realized Automation and efficiency.

CN119094417APending Publication Date: 2024-12-06Z-ONE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411437424.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In SOA service testing, the existing technology has high-cost testing software and equipment that are difficult to obtain, and parsing Ethernet packets is complicated and complicated, manual testing is large and error-prone, which reduces the testing efficiency.

Method used

By obtaining test case information, test message information and overall service matrix, we automatically analyze service information and run test scripts, and generate test reports, simplifying the SOA service testing process and improving testing efficiency and accuracy.

Benefits of technology

It realizes automated analysis and precise testing of SOA service tests, reduces manual intervention and errors, and improves the systematic and efficient testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094417A_ABST
    Figure CN119094417A_ABST
Patent Text Reader

Abstract

The invention discloses an SOA service test method, system and device and a medium, and the method comprises the steps: obtaining test case information, test message information and an overall service matrix which is used for describing a mapping relation between providers and consumers of all services; analyzing service information based on the overall service matrix; running a corresponding test script based on the service information and the test case information; and the test script performs an SOA service test according to the test message information to generate a test report. According to the invention, the working efficiency during SOA testing can be improved, and manual repeated testing work is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle testing, and in particular to a SOA service testing method, system, equipment and medium. Background Art

[0002] With the advent of the intelligent era, the demand for intelligent cockpits, intelligent driving, intelligent cloud services and other intelligent functions in automobiles is becoming more and more urgent, and the requirements for computing power have been greatly improved. As a result, more chips and software and hardware architectures are needed to support these functions. SOA, as a service-oriented architecture, is highly flexible and reusable. Services can be shared and reused between different systems and applications, which can meet existing needs well. It is the architecture adopted by most domestic and foreign OEMs.

[0003] At present, when testing SOA services, the Ethernet-related messages of the entire vehicle are usually mirrored through port mirroring, and then the messages are opened using test software, and the messages are analyzed by importing the XML file corresponding to the service. However, this method has the following disadvantages: First, professional testing software and equipment are often expensive, and it is difficult for testers to have one. Second, only the most original data can be obtained when parsing Ethernet messages. In order to analyze the problem, testers need to find the service corresponding to the Ethernet message in the numerous SOA service matrices. The operation is cumbersome and complicated, which reduces the test efficiency. Third, each service needs to be verified during the test, and manual testing is labor-intensive, cumbersome, and prone to errors. Summary of the invention

[0004] In view of the above technical problems, the present invention provides a SOA service testing method, system, device and medium, which can improve the work efficiency during SOA testing and reduce manual repetitive testing work.

[0005] A first aspect of the present invention provides a SOA service testing method, comprising: Acquire test case information, test message information, and an overall service matrix, where the overall service matrix is ​​used to describe the mapping relationship between all service providers and consumers; parsing service information based on the overall service matrix; Run a corresponding test script based on the service information and the test case information; The test script performs SOA service testing according to the test message information and generates a test report.

[0006] In a possible implementation manner, obtaining the overall service matrix includes: Get vehicle configuration information and service matrix path; Establish an ECU class based on the vehicle configuration information; Traversing the storage service matrix file under the service matrix path; Traverse each element of the storage service matrix file and add it to its corresponding ECU class; Based on the information of all ECU classes, an overall service matrix table containing all ECU class information is generated.

[0007] In one possible implementation, the ECU class includes ECU attribute information and a service adding function, wherein the ECU attribute information includes the ECU name, the ECU address, and a service class for expressing a list of services provided by the ECU, and the service adding function is used to add services to the service class.

[0008] In one possible implementation, the service class includes service attribute information, an interface adding function and an instance adding function, the service attribute information includes the service name, the service ID, the interface list Interface class included in the service and the instance list Instance class of the service, the interface adding function is used to add an interface to the Interface class, and the instance adding function is used to add an instance to the Instance class.

[0009] In a possible implementation, the Interface class includes Interface attribute information, and the Interface attribute information includes an interface method ID, an interface name, an interface type, and a protocol used by the interface.

[0010] In a possible implementation, the Instance class includes Instance attribute information, and the Instance attribute information includes the name of the ECU using the instance, the ID of the instance, and the port number used by the instance.

[0011] A second aspect of the present invention provides a SOA service testing system, including a client and a backend. The client is used to obtain test case information, test message information and an overall service matrix, where the overall service matrix is ​​used to describe the mapping relationship between all service providers and consumers; The backend is used to parse service information based on the overall service matrix; run corresponding test scripts based on the service information and the test case information; the test script performs SOA service testing according to the test message information, generates a test report and sends it to the client.

[0012] In a possible implementation, the client includes a service matrix extraction interface, a test case selection interface, and a test configuration interface; The service matrix extraction interface is used to obtain the path of the service matrix file and start the service matrix extraction process to generate an overall service matrix containing all service information; The test case selection interface is used to obtain the test cases that need to be executed and display the pass status of the test results and the test progress; The test configuration interface is used to obtain the test message path, the overall service matrix path and the vehicle model configuration information.

[0013] In a possible implementation, the backend includes a service matrix extraction script and a test script; The service matrix extraction script is used to parse the service matrix file, generate an overall service matrix containing all service information, and store the overall service matrix to a specified path; The test script is used to execute corresponding tests according to the selected test cases, verify the service functions, and generate a test report to return to the client.

[0014] According to a third aspect of the present invention, there is provided an electronic device, comprising: At least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method described in the first aspect of the embodiment of the present invention.

[0015] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the method according to the first aspect of the embodiment of the present invention is executed.

[0016] The present invention realizes the automatic parsing of service information and the automatic execution of test scripts by acquiring test case information, test message information and the overall service matrix, greatly improving the test efficiency. At the same time, the test script can perform accurate SOA service testing based on specific test message information, automatically generate test reports, reduce manual intervention and errors, improve the accuracy and comprehensiveness of the test, and make the test process more systematic and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a structural diagram of an embodiment of the SOA service testing system of the present invention.

[0018] Figure 2 This is a flowchart of an embodiment of the SOA service testing method of the present invention.

[0019] Figure 3 The figure is a schematic diagram of the composition of an ECU class in an embodiment of the present invention.

[0020] Figure 4It is a flow chart of an embodiment of the SOA service testing method of the present invention.

[0021] Description of the accompanying drawings: 1. Client; 11. Service matrix extraction interface; 12. Test case selection interface; 13. Test configuration interface; 2. Backend; 21. Service matrix extraction script; 22. Test script. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0023] It should be understood that the terms "first", "second", and "third" etc. in the claims, specifications, and drawings of the present disclosure are used to distinguish different objects rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present disclosure indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections. It should also be understood that the terms used in this disclosure specification are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0024] Reference Figure 1 The embodiment of the present invention provides a SOA service testing system, including a client 1 and a backend 2: The client 1 is used to obtain test case information, test message information and an overall service matrix, where the overall service matrix is ​​used to describe the mapping relationship between all service providers and consumers; The backend 2 is used to parse service information based on the overall service matrix; run corresponding test scripts based on the service information and the test case information; the test script 22 performs SOA service testing according to the test message information, generates a test report and sends it to the client 1.

[0025] Specifically, the client 1 in one embodiment of the present invention adopts a desktop program design based on a PC, and the desktop client 1 is developed using PYQT5 and packaged as an EXE application. Visual display is performed in the client 1 application, and the display includes a service matrix extraction interface 11, a test case selection interface 12, and a test configuration interface 13.

[0026] The service matrix extraction interface 11 is used to obtain the path of the service matrix file and start the service matrix extraction process to generate an overall service matrix containing all service information.

[0027] In one embodiment of the present invention, the service matrix extraction interface 11 includes a path selector for the service matrix path, which is used to select the service matrix path; a path selector after the overall service matrix is ​​generated, which is used to select the specific path stored in the overall service matrix generated after the service matrix extraction; and a button component for starting the service matrix extraction, through which the overall service matrix extraction is started by clicking the button event of the client 1.

[0028] The test case selection interface 12 is used to obtain the test cases that need to be executed and display the pass status of the test results and the test progress.

[0029] In one embodiment of the present invention, the test case selection interface 12 includes a test case selector, which uses the QTreeWidget component in pyqt5. The test case selector can select the test case to be tested, and can feedback the test results after the test is completed, and can display the test pass status of the test case; it also includes a text box component for test progress feedback, and the text box component can feedback the test progress of the back end 2 during the test to the text box, which includes the current test message, the start test and the end test of the test case and other information; finally, it includes a start test component and an abort test component. After the client 1 clicks the start test component, the client 1 will transmit the test case selection status and the information of the test configuration interface 13 to the back end 2 to start the test. When the abort test component is clicked, the back end 2 will stop the test.

[0030] The test configuration interface 13 is used to obtain the test message path, the overall service matrix path and the vehicle model configuration information.

[0031] In one embodiment of the present invention, the test configuration interface 13 includes a path selector for the test message, which is used to select the specific path of the message required for the test; a path selector for test report generation, which is used to select the specific path of the generated test report; a path selector for the overall service matrix during testing, which is used to select the overall service matrix containing specific information of all services during testing; a path selector for the EXCEL table of vehicle model configuration during testing, which is used to select the specific vehicle model configuration during testing, such as the MAC, IP address and other information of each Ethernet node in the vehicle model; and also includes a button component for saving the configuration. Through the button click event of the client 1, the information configured in the test configuration interface 13 will be saved to an initialization configuration file named test.ini and stored in a specified path.

[0032] It is particularly mentioned that when the client 1 application is opened, it will search whether there is an initialization configuration file of test.ini in the specified path. If it exists, the various information configurations of the test configuration interface 13 will be performed according to the content in the test.ini initialization configuration file. If it does not exist, the initialization configuration will not be performed. When the Save button is clicked on the test configuration interface 13, the initialization configuration file of test.ini in the specified path will be saved according to the configuration information of the current interface. When the test.ini in the specified path does not exist, a new file will be created. When the file exists, the file will be overwritten. Therefore, when the Save button is clicked, if the test configuration file of test.ini when it was opened last time needs to be saved, the test.ini file needs to be renamed to avoid overwriting the test.ini file after clicking the Save button.

[0033] In one embodiment of the present invention, the backend 2 includes a service matrix extraction script 21 and a test script 22 .

[0034] The service matrix extraction script 21 is used to parse the service matrix file, generate an overall service matrix containing all service information, and store the overall service matrix to a specified path.

[0035] In one embodiment of the present invention, the service matrix extraction script 21 is executed as an independent process when running, and is programmed in Python. Before the service matrix extraction script 21 is run, a vehicle model configuration file (EXCEL format) needs to be specified. The configuration file is configured by the tester according to the actual situation. The configuration file specifies (1) all SOA-related node names contained in the vehicle model; (2) the MAC addresses of all nodes; (3) the IP addresses of all nodes. At the same time, the service matrix extraction script 21 creates ECU class information for each node, which contains the specific information of all services contained in the node. During the service matrix extraction process, the service matrix extraction script 21 generates an overall service matrix table containing all ECU class information based on all ECU class information. And output the table to the specified path provided by the client 1.

[0036] The test script 22 is used to execute corresponding tests according to the selected test cases, verify the service functions, and generate a test report to return to the client 1.

[0037] Test script 22 will traverse all message files with suffixes of .pcap and .pcapng under the path of the test message provided by client 1. At the same time, test script 22 will traverse all message files, extract the ECU class containing all service information obtained by script 21 according to the service matrix, and start testing. After the test is completed, a test message is generated and the test result is returned to client 1. Client 1 will display the test success or test failure information for each selected test case on the test case selection interface 12.

[0038] Based on the SOA service testing system described in the above embodiments, an embodiment of the present invention further provides a SOA service testing method.

[0039] Reference Figure 2 , a SOA service testing method, including S1, obtaining test case information, test message information and an overall service matrix, where the overall service matrix is ​​used to describe the mapping relationship between all service providers and consumers; S2, parsing service information based on the overall service matrix; S3, running a corresponding test script based on the service information and the test case information; S4, the test script performs SOA service testing according to the test message information and generates a test report.

[0040] Specifically, in step S1, the client 1 first obtains the test case to be tested through the test case selection interface 12, and obtains the path of the specified test message and the path of the overall service matrix through the test configuration interface 13, and then uploads these test case information, test message information and overall service matrix to the backend 2. After receiving this information, the backend 2 begins to prepare for subsequent service analysis and test execution. The overall service matrix is ​​used to describe the relationship between all service providers and consumers in the system, and provides basic data for subsequent service analysis and testing.

[0041] In step S2, the backend 2 uses the service matrix extraction script 21 to parse the service information through the received overall service matrix file. Based on the overall service matrix uploaded by the client 1, the service matrix extraction script 21 traverses the mapping relationship between service providers and consumers one by one, and extracts the detailed information of each service, including the interface, instance, provider and consumer of the service. The parsed service information will be stored in the backend 2 as the basis for the subsequent execution of the test script. In this process, the client 1 is mainly used to provide the overall service matrix path and display the extraction results to the user.

[0042] In step S3, the client 1 obtains the test cases to be executed through the test case selection interface 12, and uploads the test case information to the backend 2. After receiving, the backend 2 runs the corresponding test script according to the service information parsed in step S2 and the test case information provided by the client 1. The test script 22 will call related services, verify service functions, and prepare for message testing based on the service information and the requirements in the test case. The client 1 is mainly used to trigger the execution of the test script 22 and monitor the test progress and feedback.

[0043] In step S4, the test script 22 of the backend 2 performs specific tests on the SOA service according to the test message information provided by the client 1. The test script 22 traverses the message file, verifies the interaction between the service provider and the consumer according to the parsed service information and the requirements in the test case, and detects whether the expected behavior is met. During the test, the backend 2 generates detailed log records and detects errors. After the test is completed, the backend 2 generates a test report and returns its results to the client 1. The client 1 then displays the test results and reports through the interface for the user to view and analyze the test situation.

[0044] In one embodiment of the present invention, obtaining the overall service matrix includes: obtaining vehicle configuration information and a service matrix path; establishing an ECU class based on the vehicle configuration information; traversing the storage service matrix file under the service matrix path; traversing each element of the storage service matrix file and adding it to its corresponding ECU class; and generating an overall service matrix table containing all ECU class information based on all ECU class information.

[0045] In one embodiment of the present invention, referring to Figure 3 , the ECU class includes ECU attribute information and a service adding function. The ECU attribute information includes the ECU name, ECU address, and a service class used to express the service list provided by the ECU. The service adding function is used to add services to the service class. Specifically, when creating the ECU class, the ECU class is first created for each node by parsing the vehicle model configuration file. In the initial creation, the ECU class includes the following information: (1) the name, IP, and MAC address of the node; (2) a list with the parameter name service_list, and the elements in the list are all service classes; (3) a function named add_service, which is used to add elements of the serivce class to the service_list list. It should be noted that when the ECU class is just created, service_list is a blank list. Because the service matrix has not been parsed at this time, no elements are added to the list.

[0046] In one embodiment of the present invention, the service class includes service attribute information, an interface adding function and an instance adding function. The service attribute information includes a service name, a service ID, an interface list Interface class included in the service and an instance list Instance class of the service. The interface adding function is used to add an interface to the Interface class, and the instance adding function is used to add an instance to the Instance class. Specifically, the service class provides all information about the current service, including: (1) a string with a parameter name of serviceID, which indicates the ID of the current service; (2) a string with a parameter name of servicename, which indicates the name of the current service; (3) a list with a parameter name of Interface_list, in which all elements in the list are Interface class, and the parameter stores all service interface information of the current service; (4) a list with a parameter name of Instance_list, in which all elements in the list are Instance class. The parameter stores all instance information of the current service; (5) a function with a function name of add_Interface, which adds elements of the Interface class to the Interface_list list; (5) a function with a function name of add_Instance, which adds elements of the Instance class to the Instance_list list.

[0047] In one embodiment of the present invention, the Interface class includes Interface attribute information, and the Interface attribute information includes the method ID of the interface, the name of the interface, the interface type, and the protocol used by the interface. Specifically, the Interface class provides all the information of the current interface, including: (1) a string with a parameter name of MethodID, which indicates the ID of the current interface; (2) a string with a parameter name of MethodName, which indicates the name of the current interface; (3) a string with a parameter name of type, which indicates the type of the current interface, whether it is a Method, Event, setter, getter, etc. type interface; (4) a string with a parameter name of protocol, which indicates whether the transport layer protocol used by the current interface message is TCP or UDP when it is transmitted.

[0048] In one embodiment of the present invention, the Instance class includes Instance attribute information, which includes the name of the ECU using the instance, the ID of the instance, and the port number used by the instance. Specifically, the Instance class provides all the information of the current instance, including: (1) a string parameter with the parameter name ClientECU, which is the name of the ECU, indicating that the current instance is a node named ClientECU consuming the service; (2) an integer parameter with the parameter name InstanceID, which indicates the ID of the current instance; (3) an integer parameter with the parameter name port, which indicates the port number used by the transport layer when the message of the current interface is transmitted.

[0049] Exemplarily, the overall service matrix acquisition process in one embodiment of the present invention is as follows: Figure 4 As shown, first, parse the obtained vehicle configuration file, which is usually an EXCEL table containing basic information of each ECU (electronic control unit), such as name, IP address, MAC address, etc. By reading this file, the basic configuration of all relevant nodes in the vehicle is obtained.

[0050] According to the parsed vehicle configuration information, a corresponding ECU class is created for each node (i.e. each ECU). Each ECU class contains the basic information of the node, such as IP, MAC, name, etc. At the same time, the ECU class also contains a service list (service_list), which is used to store the services provided by the ECU to ensure that the subsequent service matrix parsing has the correct object to store the corresponding service information.

[0051] After the basic ECU class is established, a path list is created based on the pre-provided service matrix path. This list contains the paths where all service matrix files are located. The service matrix file stores information about each service, including providers, consumers, service IDs, interfaces, etc. The purpose of creating this path list is to traverse these files and parse and assign the service information in the files to the corresponding ECU class.

[0052] Start traversing all files under the specified path and check whether these files conform to the format or naming rules of the service matrix file. Through this traversal, you can identify which files are service matrix files. During the traversal process, each file will be judged. If the file conforms to the format or naming rules of the service matrix file (such as the file extension is a specified type, or the file content conforms to the structure of the service matrix), it will be identified as a service matrix file and the file path will be saved for subsequent parsing. If it is not a service matrix file, skip the file and continue to check other files.

[0053] The identified service matrix files are parsed one by one. The goal of the parsing is to extract the service information in the file, including the service provider, consumer, service ID, interface, etc. Based on the content of the service matrix, the system will create a service object for each service and associate it with the ECU class that provides the service.

[0054] After parsing the service matrix file, each service information extracted is stored in its corresponding ECU class. Each ECU class contains a service_list, which stores all service information provided by the ECU. At this point, the information in the ECU class will be more complete, including not only basic information (such as IP and MAC), but also the specific services it provides.

[0055] After parsing a service matrix file, it will continue to traverse all service matrix file paths. At the same time, it will check whether all files have been traversed. If not, it will continue to perform the steps of parsing service matrix files until all files have been processed.

[0056] After all service matrix files are parsed, a complete overall service matrix table is generated based on the information of all established ECU classes. The matrix table contains information about all ECU classes and the services they provide, as well as the consumer and provider relationships of each service. This overall service matrix table is the basis for subsequent service testing and verification, and can provide a global view of service interactions for the system.

[0057] based on Figure 4 The overall service matrix extraction process shown in the figure parses the vehicle configuration information and service matrix file, creates a corresponding class for each ECU node, and stores its service information in the ECU class. The resulting overall service matrix table provides complete basic data for subsequent service testing. The automation of this process greatly improves the efficiency of service information extraction, reduces errors in manual operations, and ensures the accuracy and comprehensiveness of service interaction relationships.

[0058] In one embodiment of the present invention, the client 1 transmits the location of the service matrix file to the backend 2, and the backend 2 needs to parse all service matrices to generate an overall service matrix, which is an EXCEL table with all service information.

[0059] In one embodiment of the present invention, the client 1 needs to transmit the obtained test specific configuration, such as the specific path of the EXCEL table containing all service information, the specific path of the EXCEL table containing the IP, MAC address and other information of each ECU of the test vehicle model, etc. to the backend 2 In one embodiment of the present invention, the backend 2 will create a data container with the class name of ECU, which contains basic data information such as NAME, IP, MAC, etc., and also contains a list of services provided by the ECU, including specific information of the services.

[0060] In one embodiment of the present invention, the backend 2 will parse the EXCEL table containing the IP, MAC, NAME address and other information of each node of the test vehicle model, and establish an ECU class for each node, which contains the IP, MAC, NAME and other information.

[0061] In one embodiment of the present invention, the backend 2 will parse the EXCEL table containing all service information, and will add the service consumption information to the ECU class according to each service provider and consumer, to form a set of information that can reflect that the ECU can provide all services and the services are consumed by those ECUs.

[0062] In one embodiment of the present invention, the client 1 also needs to transmit the specific path of the message used for the test to the backend 2 .

[0063] In one embodiment of the present invention, the backend 2 will parse the specific path of the test message, traverse the folder where the path is located, and store the specific paths of all files with .pcap, .pcapng suffixes in the folder into the list container.

[0064] In one embodiment of the present invention, the client 1 transmits the information of the test cases to be tested to the backend 2, and the backend 2 executes the script of the selected test cases according to the selected test cases. When the test script 22 of the backend 2 is executed, it traverses the list of specific paths storing files with .pcap, .pcapng suffixes, verifies the message according to the information of the ECU class, and performs the test.

[0065] In one embodiment of the present invention, after the test is completed, the test script 22 of the backend 2 will print the error information in the test process into the log and store it in a designated folder.

[0066] In one embodiment of the present invention, the test script 22 of the backend 2 will return the test results to the client 1 after all tests are completed, and the client 1 can directly observe the test results.

[0067] The embodiment of the present invention also discloses an electronic device.

[0068] An electronic device comprises at least one processor; and at least one memory in communication with the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the SOA service testing method as described in any one of the above embodiments.

[0069] The embodiment of the present invention also discloses a readable storage medium.

[0070] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the SOA service testing method described in any one of the above embodiments.

[0071] It can be understood that computer-readable storage media may include: any entity or device capable of carrying a computer program, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc. A computer program includes a computer program code. The computer program code may be in source code form, object code form, an executable file, or some intermediate form, etc. A computer-readable storage medium may include: any entity or device capable of carrying a computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc.

[0072] In certain embodiments of the present invention, the electronic device may include a controller or a processor, and the controller is a single-chip microcomputer chip that integrates a processor, a memory, a communication module, etc. The processor may refer to a processor included in the controller. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.

[0073] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0074] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0075] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A SOA service testing method, characterized in that: include: Acquire test case information, test message information, and an overall service matrix, where the overall service matrix is ​​used to describe the mapping relationship between all service providers and consumers; parsing service information based on the overall service matrix; Run a corresponding test script based on the service information and the test case information; The test script performs SOA service testing according to the test message information and generates a test report.

2. The SOA service testing method according to claim 1, characterized in that: The obtaining of the overall service matrix comprises: Get vehicle configuration information and service matrix path; Establish an ECU class based on the vehicle configuration information; Traversing the storage service matrix file under the service matrix path; Traverse each element of the storage service matrix file and add it to its corresponding ECU class; Based on the information of all ECU classes, an overall service matrix table containing all ECU class information is generated.

3. The SOA service testing method according to claim 2, characterized in that: The ECU class includes ECU attribute information and a service adding function. The ECU attribute information includes the ECU name, the ECU address and a service class for expressing a list of services provided by the ECU. The service adding function is used to add services to the service class.

4. The SOA service testing method according to claim 3, characterized in that: The service class includes service attribute information, an interface adding function and an instance adding function. The service attribute information includes the service name, the service ID, the interface list Interface class included in the service and the instance list Instance class of the service. The interface adding function is used to add an interface to the Interface class, and the instance adding function is used to add an instance to the Instance class.

5. The SOA service testing method according to claim 4, characterized in that: The Interface class includes Interface attribute information, and the Interface attribute information includes the method ID of the interface, the name of the interface, the interface type, and the protocol used by the interface.

6. The SOA service testing method according to claim 4, characterized in that: The Instance class includes Instance attribute information, and the Instance attribute information includes the name of the ECU using the instance, the ID of the instance, and the port number used by the instance.

7. A SOA service testing system, characterized in that: Including client and backend, The client is used to obtain test case information, test message information and an overall service matrix, where the overall service matrix is ​​used to describe the mapping relationship between all service providers and consumers; The backend is used to parse service information based on the overall service matrix; Run a corresponding test script based on the service information and the test case information; The test script performs a SOA service test according to the test message information, generates a test report and sends it to the client.

8. The SOA service testing system according to claim 7, characterized in that: The client includes a service matrix extraction interface, a test case selection interface and a test configuration interface; The service matrix extraction interface is used to obtain the path of the service matrix file and start the service matrix extraction process to generate an overall service matrix containing all service information; The test case selection interface is used to obtain the test cases that need to be executed and display the pass status of the test results and the test progress; The test configuration interface is used to obtain the test message path, the overall service matrix path and the vehicle model configuration information.

9. The SOA service testing system according to claim 7, characterized in that: The backend includes a service matrix extraction script and a test script; The service matrix extraction script is used to parse the service matrix file, generate an overall service matrix containing all service information, and store the overall service matrix to a specified path; The test script is used to execute corresponding tests according to the selected test cases, verify the service functions, and generate a test report to return to the client.

10. An electronic device, characterized in that: include: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the SOA service testing method according to any one of claims 1 to 6.

11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the SOA service testing method according to any one of claims 1 to 6 is executed.