Communication test method and device of application program, equipment, storage medium and vehicle

By automatically converting the application's topology information into test code, the problem of low testing efficiency caused by manually writing code in existing technologies is solved, and efficient and accurate communication system testing is achieved.

CN121098733APending Publication Date: 2025-12-09SHANGHAI LIXIANG AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410743589.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

In the existing application communication system testing process, a large amount of test code needs to be written manually, resulting in low testing efficiency and a high risk of errors.

Method used

By acquiring the topology information between the applications under test, the code is automatically converted into test code to simulate the communication modes and connection methods between the applications, enabling communication testing without the need for manual code writing.

Benefits of technology

It improves the efficiency of communication system testing, reduces human error, and ensures the accuracy and efficiency of the testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121098733A_ABST
    Figure CN121098733A_ABST
Patent Text Reader

Abstract

The invention discloses a communication test method and device of an application program, equipment, a storage medium and a vehicle. The method comprises the following steps: acquiring a first topological structure among a plurality of to-be-tested application programs; topological structure information corresponding to the first topological structure is obtained, the topological structure information comprises a plurality of test nodes, and a connection mode and a communication mode among the test nodes, the test nodes are used for simulating the application program, and the test nodes comprise a publisher node and a subscriber node; converting the topological structure information into a test code; and running the test code to realize the communication test among the plurality of application programs. According to the embodiment of the invention, the communication test efficiency of the application program can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, and in particular relates to a communication testing method, apparatus, device, storage medium and vehicle for an application. Background Technology

[0002] In modern automotive development, Data Distribution Service (DDS) has become a key technology for achieving efficient and reliable communication between devices due to its real-time performance, high reliability, scalability, and security. DDS provides a middleware solution based on a publish-subscribe model, allowing for efficient data transfer between different applications on different devices.

[0003] However, before applying DDS to transmit data between different applications, the communication system between the applications needs to be tested. Traditional communication system testing requires users to manually write a large amount of test code, which is not only time-consuming but also prone to errors, resulting in inefficient communication system testing. Summary of the Invention

[0004] This application provides a communication testing method, apparatus, device, storage medium, and vehicle for applications, which can solve the problem of low efficiency in existing communication system testing.

[0005] In a first aspect, embodiments of this application provide a communication testing method for an application, the method comprising:

[0006] Obtain the initial topology among the multiple applications under test;

[0007] Obtain the topology information corresponding to the first topology, wherein the topology information includes multiple test nodes, the connection method and communication mode between the multiple applications, wherein the test nodes are used to simulate the application, and the multiple test nodes include publisher nodes and subscriber nodes;

[0008] Convert the topology information into test code;

[0009] Run the test code to perform communication tests between the multiple applications.

[0010] In some embodiments, converting the topology information into test code includes:

[0011] In response to the user's first input, obtain the data structure information corresponding to the first input, whereby the first input is used to define the data structure during the test process;

[0012] The data structure information and the topology information are converted into the test code.

[0013] In some embodiments, converting the data structure information and the topology information into the test code includes:

[0014] Obtain the test templates corresponding to the communication scenarios of the multiple applications;

[0015] The data structure information and the topology information are injected into the test template to obtain test cases;

[0016] The test cases are converted into the test code.

[0017] In some embodiments, obtaining the topology information corresponding to the first topology includes:

[0018] If the first topology is a historical topology, query the topology information corresponding to the first topology from the database of the test system.

[0019] If the first topology is not a historical topology, obtain the topology information corresponding to the user's second input, which is used to define the first topology.

[0020] In some embodiments, obtaining the topology information corresponding to the user's second input includes:

[0021] Determine the file type of the topology file;

[0022] Invoke the file parser corresponding to the file type;

[0023] The topology file is parsed by the file parser to obtain the topology information.

[0024] In some embodiments, after running the test code to implement communication tests between the plurality of applications, the method further includes:

[0025] Obtain the execution result of the test code;

[0026] A test report is generated based on at least one of the following: data integrity, transmission efficiency, and latency, as shown in the results.

[0027] Secondly, embodiments of this application provide a communication testing apparatus for an application, the apparatus comprising:

[0028] The first acquisition module is used to acquire the first topology among the multiple applications to be tested;

[0029] The second acquisition module is used to acquire topology information corresponding to the first topology, wherein the topology information includes multiple test nodes, the connection method and communication mode between the multiple test nodes, wherein the test nodes are used to simulate the application, and the multiple test nodes include publisher nodes and subscriber nodes;

[0030] A conversion module is used to convert the topology information into test code;

[0031] The runtime module is used to run the test code to perform communication tests between the multiple applications.

[0032] Thirdly, embodiments of this application provide a communication testing device for an application, the device including: a processor and a memory storing computer program instructions;

[0033] The communication test method for the above application is implemented when the processor executes computer program instructions.

[0034] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the communication testing method of the application described above.

[0035] Fifthly, embodiments of this application provide a vehicle that includes computer program instructions, which, when executed by a processor, implement the communication testing method of the application described above.

[0036] In this application, a first topology structure between multiple applications under test is obtained; topology information corresponding to the first topology structure is obtained, wherein the topology information includes multiple test nodes, the connection methods and communication modes between the multiple test nodes, each test node simulating an application, and the multiple test nodes include publisher nodes and subscriber nodes; the topology information is converted into test code; and the test code is run to implement communication testing between multiple applications. In this way, the distribution of applications, as well as the connection methods and communication modes between applications, can be written into the topology information, and then the topology information is automatically converted into test code for execution. This method can replicate the communication between applications, complete the communication testing of applications, and eliminate the need for users to manually write code, thereby improving the efficiency of communication system testing. Attached Figure Description

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

[0038] Figure 1 This is a flowchart illustrating a communication testing method for an application provided in an embodiment of this application;

[0039] Figure 2 This is a schematic diagram of the architecture of a communication testing method for an application provided in an embodiment of this application;

[0040] Figure 3 This is a flowchart illustrating a communication testing method for an application provided in another embodiment of this application;

[0041] Figure 4 This is a schematic diagram of the structure of a communication testing device for an application provided in an embodiment of this application;

[0042] Figure 5 This is a schematic diagram of the hardware structure of a communication testing device for an application provided in an embodiment of this application. Detailed Implementation

[0043] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples of this application.

[0044] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0045] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The embodiments will now be described in detail with reference to the accompanying drawings.

[0046] Specifically, in order to address the problems of the prior art, embodiments of this application provide a communication testing method, apparatus, device, storage medium, and vehicle for applications. The communication testing method for applications provided in this application embodiment will be described first below.

[0047] Figure 1 A flowchart illustrating a communication testing method for an application provided in one embodiment of this application is shown. The method includes the following steps:

[0048] S110, obtain the first topology among the multiple applications under test.

[0049] In this embodiment, the application communication testing method is applied to the test system. The first topology between multiple applications refers to the way and layout in which these applications are interconnected and communicate with each other. The first topology describes the data flow and interaction relationships between the multiple applications.

[0050] S120, Obtain the topology information corresponding to the first topology, wherein the topology information includes multiple test nodes, the connection method and communication mode between the multiple applications, wherein the test nodes are used to simulate the application, and the multiple test nodes include publisher nodes and subscriber nodes.

[0051] In this embodiment, since the communication between multiple applications is being tested, the communication mode and connection method between the multiple applications must first be obtained, and the communication mode and connection method between the multiple applications must be simulated before the test is performed.

[0052] Therefore, in order to simulate the communication patterns and connection methods between multiple applications, it is necessary to obtain the topology information corresponding to the first topology between multiple applications. This topology information includes multiple test nodes, as well as the connection methods and communication patterns between the multiple test nodes, where each test node corresponds to one application.

[0053] After obtaining the topology information, multiple test nodes can be set up based on the topology information. Each test node can perform the same communication and data processing tasks as the corresponding application. The communication path and data flow between multiple test nodes can be designed according to the connection method and communication mode in the topology information, so as to realize the communication test between multiple applications.

[0054] S130, convert the topology information into test code;

[0055] S140, Run the test code to perform communication tests between the multiple applications.

[0056] In this embodiment, after obtaining the topology information, a set of test cases can be defined based on the topology information. These test cases describe specific test scenarios, expected communication modes, and results. Then, test code can be generated based on the defined test cases, and the generated test code can be run to simulate the actual communication environment and execute the test cases to complete communication tests between multiple applications.

[0057] In this embodiment, a first topology structure between multiple applications under test is obtained; topology information corresponding to the first topology structure is obtained, wherein the topology information includes multiple test nodes, connection methods and communication modes between the multiple applications, each test node simulating an application, and the multiple test nodes include publisher nodes and subscriber nodes; the topology information is converted into test code; and the test code is run to implement communication testing between the multiple applications. In this way, the distribution of applications, as well as the connection methods and communication modes between applications, can be written into the topology information, and then the topology information is automatically converted into test code for execution. This method can replicate the communication between applications, complete the communication testing of applications, and eliminates the need for users to manually write code, thereby improving the efficiency of communication system testing.

[0058] As an optional embodiment, converting the topology information into test code includes:

[0059] In response to the user's first input, obtain the data structure information corresponding to the first input, whereby the first input is used to define the data structure during the test process;

[0060] The data structure information and the topology information are converted into the test code.

[0061] In this embodiment, in addition to obtaining the topology information corresponding to multiple applications, users can also define the data structures used in communication testing according to their own needs. The data structures describe the format and type of data transmitted between multiple test nodes. These data structures define the content of data packets, such as field names, data types, and data lengths.

[0062] Users can define the data structure during the test process using the first input to generate data structure information. The topology information then describes the connections and communication patterns between test nodes, while the data structure information describes the specific content and format of the data transmitted between the test nodes. By combining these two, effective test code can be generated to simulate and verify communication between applications.

[0063] For example, the first input is the input for writing a data structure file, which includes the data structure information. For example, the data structure file can be in IDL (Interface Definition Language) format, and the data structures in the data structure file can be defined according to the OMG (Object Management Group) standard. The data structure file can include the names of data types, attributes, and their relationships.

[0064] After that, the IDL parser can be invoked based on the format of the data structure file. The IDL parser can parse the data structure file in IDL format and guide the generation of test code.

[0065] This approach allows for flexible selection of data structures during the testing process, adapts flexibly to different testing environments, and effectively supports testing of communication between applications in dynamically changing system development environments.

[0066] As an optional embodiment, converting the data structure information and the topology information into the test code includes:

[0067] Obtain the test templates corresponding to the communication scenarios of the multiple applications;

[0068] The data structure information and the topology information are injected into the test template to obtain test cases;

[0069] The test cases are converted into the test code.

[0070] In this embodiment, the test template can be a predefined script structure used to generate specific test code. The test template contains some general test logic and framework, which can be customized and extended according to specific test requirements and parameters.

[0071] Depending on the application's communication scenario, test templates can be categorized into various types. Examples include Java test templates, C++ test templates, and Python test templates. Furthermore, test templates can encompass scenarios such as simulating data sending and receiving verification, and performance testing. Users can write multiple test templates based on their coding language, testing environment, or testing requirements, and store these templates within the testing system.

[0072] Once a test task is obtained, the corresponding test template can be selected based on the programming language and communication scenario of the multiple applications in the test task. Then, the data structure information and topology information are filled into the appropriate positions in the test template to obtain test cases. Finally, the filled test template can be converted into executable test code using an automation tool.

[0073] Specifically, the conversion process may include automated code generation, compilation, and preliminary error checking to ensure that the generated code meets the expected functionality.

[0074] In this way, test code can be automatically generated based on defined data structures and topologies without requiring users to manually input code, thus improving the efficiency of test code generation.

[0075] As an optional embodiment, obtaining the topology information corresponding to the first topology includes:

[0076] If the first topology is a historical topology, query the topology information corresponding to the first topology from the database of the test system.

[0077] If the first topology is not a historical topology, obtain the topology information corresponding to the user's second input, which is used to define the first topology.

[0078] In this embodiment, the historical topology is a topology that already exists in the test system. If the first topology is a historical topology, the test system's database will contain the corresponding topology information, which can then be directly retrieved from the database, thus reusing the topology information. If the first topology is not a historical topology, the user can also define new topology information based on the first topology to record the first topology. Once created, the first topology can be reused or used for testing various data types in different scenarios.

[0079] In this way, the testing system can be adapted to communication testing of applications with various topologies, and each topology only needs to be defined by the user once and can be used repeatedly for testing, thus improving testing efficiency.

[0080] As an optional embodiment, the second input is the input for writing a topology structure file, which includes the topology structure information;

[0081] The feature is that obtaining the topology information corresponding to the user's second input includes:

[0082] Determine the file type of the topology file;

[0083] Invoke the file parser corresponding to the file type;

[0084] The topology file is parsed by the file parser to obtain the topology information.

[0085] In this embodiment, when defining the first topology using the second input, the topology information can be recorded in a topology file, which describes each test node and their interactions. After obtaining the topology file, a file parser can be called according to the file's format to parse the file and obtain the topology information.

[0086] For example, the topology file can be a JSON (JavaScript Object Notation) file. Users can build or modify the topology on a graphical interface tool to obtain the final JSON-formatted topology file that records the topology information.

[0087] Subsequently, a JSON parser can be invoked based on the format of the topology file. The JSON parser can parse the JSON-formatted topology file, guiding the generation of test code. Once parsed, the topology files are registered in the code generator's context information to guide subsequent code production. The topology parsed by the JSON parser not only defines multiple applications and their interactions but also provides the necessary context for generating test cases. After processing these topology configurations, the information obtained by the JSON parser can be used to simulate real-world communication scenarios, thereby creating test cases with a complexity comparable to real-world interactions.

[0088] This method allows for the efficient generation of test cases without manual intervention, resulting in automated test code.

[0089] As an optional embodiment, after running the test code to implement communication tests between the plurality of applications, the method further includes:

[0090] Obtain the execution result of the test code;

[0091] A test report is generated based on at least one of the following: data integrity, transmission efficiency, and latency, as shown in the results.

[0092] In this embodiment, after generating the test code, the generated test code can be executed, and the test results can be observed and recorded. Specifically, the test can be conducted in a simulated environment or an actual deployment environment to verify multiple metrics of communication effectiveness and data structure. These multiple metrics include at least data integrity, transmission efficiency, and latency.

[0093] After obtaining multiple metrics, the test results can be analyzed in detail to identify potential problems and areas for improvement, generating a test report. This report can help developers further optimize data structure design and communication strategies, as well as further adjust and optimize the test template.

[0094] This method allows for the effective simulation and testing of communication between multiple applications. It verifies the system's correctness and performance, identifies potential problems and bottlenecks, and ultimately improves the system's reliability and stability.

[0095] As an optional embodiment, Figure 2 This can be a schematic diagram of the architecture of an automated testing tool, such as... Figure 2 As shown, the topology information is input into the JSON parser as a JSON file. This JSON file contains the system topology and data flow configuration, namely the number of publisher and subscriber nodes, and their connection methods. The JSON parser parses the JSON-formatted topology file and injects the parsed results into the code generator.

[0096] In addition, such as Figure 2 As shown, the data structure file can be in IDL (Interface Definition Language) format. The data structure in the data structure file can be defined in accordance with the OMG (Object Management Group) standard. The data structure file can include the names of data types, attributes, and their relationships.

[0097] Subsequently, the IDL parser can be invoked based on the format of the data structure file. The IDL parser can precisely parse IDL files conforming to the OMG standard using a highly customized syntax tree, extracting data type and communication interface definitions. The syntax rule file, written as needed, is parsed into parser code. Through custom parser code, the parsed information is categorized and stored into different types, based on the types contained in the IDL. The information of each type parsed by the parser is also injected into the code generator. The information types can include at least structure types, enumeration types, basic data types, Map types, sequence types, and array types.

[0098] Based on the parsing results of the JSON parser and the various types of information obtained by the IDL parser, the code generator can combine templates to generate the final test files. The code generator can intelligently build test environments by simulating nodes in a network and the connections between them to generate test files. Depending on the application's communication scenario, test templates can be categorized into several types, such as Java test templates, C++ test templates, and Python test templates. Java test templates correspond to Java format test files, C++ test templates to C++ format test files, and Python test templates to Python format test files.

[0099] Furthermore, as an optional embodiment, Figure 3 This illustrates a complete process for the communication testing method of the aforementioned application. For example... Figure 3 As shown, the system first determines whether to reuse the default topology. The default topology is a historical topology structure. If the default topology is reused, the corresponding topology structure information is directly retrieved from the database, thus reusing the topology structure information. If the default topology is not reused, the user can define new topology structure information by writing a new JSON topology file and then parse the new JSON topology file.

[0100] If the new JSON topology file is successfully parsed to obtain topology structure information, or if the topology structure information of the default topology is reused, then an IDL file conforming to the OMG standard is obtained and parsed by the IDL parser. If the IDL file is successfully parsed and the user-defined data structure and communication interface information are extracted, test code can be generated based on the topology structure information and the data structure and communication interface information. If the parsing of the new JSON topology file or the parsing of the IDL file fails, an alarm error message can be output to the user to indicate that there is an error in the file parsing process.

[0101] Specifically, during the process of generating test code, it is necessary to further determine whether to reuse previous templates. If previous templates are reused, the topology information, data structure, and communication interface information are directly injected into the previous templates to generate test code. If previous templates are not reused, users can write templates as needed and inject the topology information, data structure, and communication interface information into the newly written templates to generate test code.

[0102] After generating the test code, the test code is tested. If the test results of the test code meet the expectations, the test of the application is completed and the application is considered to have passed the test. If the test results of the test code do not meet the expectations, the test code itself is further checked for problems. If the test code itself has no problems, the application is considered to have failed the test, and the application is cleaned up and its communication functions are fixed.

[0103] Based on the application communication testing method provided in the above embodiments, this application also provides a specific implementation of the application communication testing apparatus. Please refer to the following embodiments.

[0104] First see Figure 4 The communication testing device 400 for the application provided in this embodiment includes the following modules:

[0105] The first acquisition module 401 is used to acquire the first topology among the multiple applications to be tested;

[0106] The second acquisition module 402 is used to acquire topology information corresponding to the first topology, wherein the topology information includes multiple test nodes, connection methods and communication modes between the multiple applications, wherein the test nodes are used to simulate the application, and the multiple test nodes include publisher nodes and subscriber nodes;

[0107] Conversion module 403 is used to convert the topology information into test code;

[0108] The execution module 404 is used to run the test code to implement communication tests between the multiple applications.

[0109] The device can acquire a first topology among multiple applications under test; obtain the corresponding topology information, which includes multiple test nodes, the connection methods and communication modes between the test nodes, with each test node simulating an application, and including publisher and subscriber nodes; convert the topology information into test code; and run the test code to implement communication tests between the multiple applications. In this way, the distribution of applications, as well as the connection methods and communication modes between them, can be written into the topology information, and then the topology information can be automatically converted into test code for execution. This method can replicate the communication between applications, complete the application communication test, and eliminate the need for users to manually write code, thereby improving the efficiency of communication system testing.

[0110] As one implementation of this application, the conversion module 403 described above can also be used for:

[0111] In response to the user's first input, obtain the data structure information corresponding to the first input, whereby the first input is used to define the data structure during the test process;

[0112] The data structure information and the topology information are converted into the test code.

[0113] As one implementation of this application, the conversion module 403 can also be used to: obtain test templates corresponding to the communication scenarios of the multiple applications;

[0114] The data structure information and the topology information are injected into the test template to obtain test cases;

[0115] The test cases are converted into the test code.

[0116] As one implementation of this application, the second acquisition module 402 described above can also be used for:

[0117] If the first topology is a historical topology, query the topology information corresponding to the first topology from the database of the test system.

[0118] If the first topology is not a historical topology, obtain the topology information corresponding to the user's second input, which is used to define the first topology.

[0119] As one implementation of this application, the second acquisition module 402 described above can also be used for:

[0120] Determine the file type of the topology file;

[0121] Invoke the file parser corresponding to the file type;

[0122] The topology file is parsed by the file parser to obtain the topology information.

[0123] As one implementation of this application, the communication testing device 400 for the above-mentioned application can also be used for:

[0124] Obtain the execution result of the test code;

[0125] A test report is generated based on at least one of the following: data integrity, transmission efficiency, and latency, as shown in the results.

[0126] The communication testing device for the application provided in this embodiment of the invention can implement the various steps in the above method embodiments, and will not be repeated here to avoid repetition.

[0127] Figure 5 A schematic diagram of the hardware structure of the communication testing device for the application provided in this embodiment is shown.

[0128] The communication testing device for the application may include a processor 1001 and a memory 1002 storing computer program instructions.

[0129] Specifically, the processor 1001 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0130] Memory 1002 may include mass storage for data or instructions. For example, and not limitingly, memory 1002 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1002 may include removable or non-removable (or fixed) media. Where appropriate, memory 1002 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 1002 is non-volatile solid-state memory.

[0131] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.

[0132] The processor 1001 reads and executes computer program instructions stored in the memory 1002 to implement the communication testing method of any of the applications described in the above embodiments.

[0133] In one example, the application's communication test device may also include a communication interface 1003 and a bus 1010. Wherein, for example... Figure 5 As shown, the processor 1001, memory 1002, and communication interface 1003 are connected through bus 1010 and complete communication with each other.

[0134] The communication interface 1003 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0135] Bus 1010 includes hardware, software, or both, that couples components of an application's communication test equipment together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 1010 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0136] The communication testing equipment for this application can be based on the above embodiments, thereby realizing the communication testing method and apparatus for the application described above.

[0137] Furthermore, in conjunction with the communication testing methods for applications in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement the communication testing methods for any of the applications in the above embodiments and achieve the same technical effect. To avoid repetition, further details are omitted here. The aforementioned computer-readable storage medium may include non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, etc., and is not limited thereto.

[0138] In addition, this application also provides a vehicle including computer program instructions, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0139] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0140] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0141] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0142] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and vehicles according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to create a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0143] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A communication testing method for an application, characterized in that, The method includes: Obtain the initial topology among the multiple applications under test; Obtain the topology information corresponding to the first topology, the topology information including multiple test nodes, the connection method and communication mode between the multiple test nodes, wherein the test nodes are used to simulate the application, and the multiple test nodes include publisher nodes and subscriber nodes; Convert the topology information into test code; Run the test code to perform communication tests between the multiple applications.

2. The communication testing method for an application according to claim 1, characterized in that, The step of converting the topology information into test code includes: In response to the user's first input, obtain the data structure information corresponding to the first input, whereby the first input is used to define the data structure during the test process; The data structure information and the topology information are converted into the test code.

3. The communication testing method for an application according to claim 2, characterized in that, The step of converting the data structure information and the topology information into the test code includes: Obtain the test templates corresponding to the communication scenarios of the multiple applications; The data structure information and the topology information are injected into the test template to obtain test cases; The test cases are converted into the test code.

4. The communication testing method for an application according to claim 1, characterized in that, The step of obtaining the topology information corresponding to the first topology includes: If the first topology is a historical topology, query the topology information corresponding to the first topology from the database of the test system. If the first topology is not a historical topology, obtain the topology information corresponding to the user's second input, which is used to define the first topology.

5. The communication testing method for an application according to claim 4, characterized in that, The second input is the input for writing the topology structure file, which includes the topology structure information; The step of obtaining the topology information corresponding to the user's second input includes: Determine the file type of the topology file; Invoke the file parser corresponding to the file type; The topology file is parsed by the file parser to obtain the topology information.

6. The communication testing method for an application according to claim 1, characterized in that, After running the test code to implement communication tests between the multiple applications, the process also includes: Obtain the execution result of the test code; A test report is generated based on at least one of the following: data integrity, transmission efficiency, and latency, as shown in the results.

7. A communication testing device for an application, characterized in that, The device includes: The first acquisition module is used to acquire the first topology among the multiple applications to be tested; The second acquisition module is used to acquire topology information corresponding to the first topology, wherein the topology information includes multiple test nodes, the connection method and communication mode between the multiple test nodes, wherein the test nodes are used to simulate the application, and the multiple test nodes include publisher nodes and subscriber nodes; A conversion module is used to convert the topology information into test code; The runtime module is used to run the test code to perform communication tests between the multiple applications.

8. A communication testing device for an application, characterized in that, The communication testing device for the application includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the communication testing method of the application as described in any one of claims 1-6.

9. A computer storage medium, characterized in that, The computer storage medium stores computer program instructions, which, when executed by a processor, implement the communication testing method of the application program as described in any one of claims 1-6.

10. A vehicle, characterized in that, The vehicle includes at least one of the following: The application communication testing apparatus as claimed in claim 7, the application communication testing device as claimed in claim 8, and the computer storage medium as claimed in claim 9.