Service simulation method, device and equipment, medium and vehicle
By automatically parsing the service source code of the service-oriented architecture, generating detailed data files, and generating executable files based on compilation methods and preset scripts, efficient simulation and testing of SOA services are achieved, solving the problems of insufficient testing complexity and cross-platform support in the existing technology, and improving testing efficiency and development convenience.
Patent Information
- Application Number
- CN202510036321.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-04-11
AI Technical Summary
The existing technology is difficult to efficiently simulate and test service-oriented architecture (SOA) services, lacks flexible multi-service orchestration and data collection capabilities, and is complex in operations, making it difficult to support cross-platform integrated development testing.
When the compilation start is detected, the compilation method is determined, and the executable file is generated based on the compilation method and the preset script, the service to be tested and its target executable file are determined, the service method is executed according to the business scenario, and finally the service to be debugged based on the target executable file and the execution method.
It realizes automated SOA service test interface generation, reduces the workload of manually writing test code, ensures the accuracy and comprehensiveness of the test interface, improves testing efficiency, reduces development threshold, and supports cross-platform integrated development testing.
Smart Images

Figure CN119807015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle control technology, and in particular to a service simulation method, device, equipment, medium and vehicle. Background Art
[0002] The evolution of intelligence has promoted the formation of the concept of "software-defined cars", in which service-oriented architecture (SOA) has become the key. SOA, with its loose coupling, reusability and standardization, provides important service abstraction for the automotive industry. Under the SOA architecture, the capabilities provided by vehicle software and hardware are encapsulated into services, such as sensor data and actuator functions. These services are requested by advanced functional software in smart vehicles to implement advanced functions such as path planning and high beam control. This service-oriented approach achieves loose coupling between services, so that functional modules do not interfere with each other, and facilitates the migration and independent development of functions.
[0003] In addition, DDS is a middleware technology specification for distributed real-time communication. Its publish / subscribe model ensures real-time, reliable, and flexible distribution of data. DDS participants can deploy publishers and subscribers, which are paired with the same topic name and compatible QoS to enable message sending and receiving. DDS provides great flexibility for message communication.
[0004] In order to meet the development and testing needs of automotive software system services, we urgently need an innovative SOA service simulation method or system. The system should be able to efficiently simulate and test SOA services without the need for specific scripts to reduce costs; flexibly support multiple service orchestration and data collection; provide reliable test results to ensure service correctness; have an easy-to-use interface and process to reduce operational difficulty; and support cross-platform integrated development and testing. Summary of the invention
[0005] The object of the present invention is to provide a service simulation method. In order to achieve the above object, the present invention discloses a service simulation method, the method comprising: When the compilation is detected to be started, the compilation mode is determined; Generate an executable file based on the compilation method and the preset script; Identify the services to be tested; Determining a target executable file corresponding to the service to be tested in the executable file; Determine the execution mode corresponding to the service method to be tested based on the business scenario; The service to be tested is debugged based on the target executable file and the execution mode.
[0006] Optionally, generating an executable file based on the compilation method and a preset script includes: When the compilation is detected, the compilation progress and log information are updated in real time through the compilation tool interface; When it is detected that the compilation progress reaches a preset value, an executable file is generated based on the compilation method and a preset script.
[0007] Optionally, generating an executable file based on the compilation method and a preset script includes: If the compilation mode is preset compilation, generating client and server compilation source codes based on the preset script, and generating first executable files corresponding to the client and server; If the compilation mode is VIU simulation compilation, a VIU simulation end compilation source code is generated based on the preset script, and a second executable file corresponding to the VIU simulation end is generated.
[0008] Optionally, before the step of determining the compilation mode when the compilation is detected to be started, the method includes: Upon detecting that the service-oriented architecture service source code configuration is complete, determining the storage path corresponding to the service-oriented architecture service source code, as well as the names of the client and server executable files, extracting all service methods and parameter information in the service-oriented architecture service source code; Generate a service test interface file based on all the service methods and the parameter information; Generate a target configuration file based on the executable file name and the parameter information, wherein the target configuration file is used to define compilation rules and dependency relationships of a target project; Compilation is started based on the target configuration file.
[0009] Optionally, determining the execution mode corresponding to the service method to be tested based on the business scenario includes: When it is detected that the business scenario is the first business scenario, the execution mode corresponding to the service method to be tested is sequential execution; When it is detected that the business scenario is the first business scenario, the execution mode corresponding to the service method to be tested is concurrent execution.
[0010] Optionally, after the step of determining the service to be tested, the method includes: Configure the service to be tested and the service method corresponding to the service to be tested based on the pre-acquired service type; Configure service signal parameters for the client and server respectively; At least one service method to be tested is determined in the preset service window.
[0011] Optionally, the debugging of the service to be tested based on the target executable file and the execution mode includes: The service to be tested is debugged based on the service method to be tested, the target executable file and the execution mode.
[0012] Optionally, after the step of debugging the service to be tested based on the service method to be tested, the target executable file and the execution mode, the method includes: Sending a service signal to the other end according to the pre-acquired network parameters configured in the local communication; The debug log window prints the result log returned by the service in real time and saves the result log to the local computer.
[0013] The embodiment of the present invention further discloses a service simulation device, which includes: A first determination module is used to determine the compilation mode when the compilation start is detected; A generation module, used to generate an executable file based on the compilation method and a preset script; A second determination module is used to determine the service to be tested; A third determination module, used to determine a target executable file corresponding to the service to be tested in the executable file; A fourth determination module, used to determine the execution mode corresponding to the service method to be tested based on the business scenario; A debugging module is used to debug the service to be tested based on the target executable file and the execution mode.
[0014] An embodiment of the present invention further discloses an electronic device, comprising at least one processor and a memory communicatively connected to the at least one processor; The memory is used to store computer programs; The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.
[0015] The embodiment of the present invention further discloses a computer-readable storage medium on which a computer program is stored. When executed by one or more processors, the processors are enabled to execute the method described in the embodiment of the present invention.
[0016] The embodiment of the present invention further discloses a vehicle, which includes a service simulation device, so that the vehicle executes the method described in the embodiment of the present invention.
[0017] Beneficial effects of the present invention: The present application provides a service simulation method, device, equipment and storage medium. When the compilation is detected to be started, the compilation mode is determined; an executable file is generated based on the compilation mode and a preset script; a service to be tested is determined; a target executable file corresponding to the service to be tested is determined in the executable file; the execution mode corresponding to the service method to be tested is determined based on the business scenario; and the service to be tested is debugged based on the target executable file and the execution mode. The present invention automatically parses the service source code of the service-oriented architecture, accurately identifies and extracts all service methods and their parameter information, and then generates a detailed data file. These data files not only serve as an important supplement to the service document, but also provide a key reference for subsequent development and testing work. Based on the source code parsing results, the compilation system can intelligently template the test interface of the service. This process not only reduces the workload of manually writing test code, but also ensures the accuracy and comprehensiveness of the test interface, and effectively improves the interface quality. The user only needs to operate with one key to quickly obtain an executable test interface file, which greatly improves the test efficiency. By integrating the above functions, the present invention realizes a one-click automated process from source code parsing, compilation construction to service test interface generation. This process greatly shortens the software development cycle and lowers the development threshold, allowing non-professional developers to easily get started and quickly complete the development and testing of SOA services. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flow chart of the steps of a service simulation method provided in an embodiment of the present invention; Figure 2 A flowchart of an exemplary service simulation method provided in an embodiment of the present invention; Figure 3 A flowchart of another exemplary service simulation method provided in an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a service simulation device provided in an embodiment of the present invention; Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0020] In order to more clearly describe the content of the present invention, the present invention will be further explained below in conjunction with the drawings in the present application.
[0021] Reference Figure 1 , Figure 1 This is a flow chart of the steps of a service simulation method provided in an embodiment of the present invention. The method may include: Step 101, when the compilation is detected to be started, determining the compilation mode; Furthermore, before step 101, before the step of determining the compilation mode when the compilation start is detected, the method includes: Upon detecting that the service-oriented architecture service source code configuration is complete, determining the storage path corresponding to the service-oriented architecture service source code, as well as the names of the client and server executable files, extracting all service methods and parameter information in the service-oriented architecture service source code; Generate a service test interface file based on all the service methods and the parameter information; Generate a target configuration file based on the executable file name and the parameter information, wherein the target configuration file is used to define compilation rules and dependency relationships of a target project; Compilation is started based on the target configuration file.
[0022] It should be noted that in the embodiments of the present application, SOA (Service-Oriented Architecture) is a software design style that allows different functional units of an application (called services) to communicate through well-defined interfaces and protocols. The present invention can use compilation tools such as CMake, MinGW, Python, etc. to compile the local SOA service source code into executable files for the client and server in a one-click manner. During this process, the system will automatically generate the service interface source code based on the service source code, and will also automatically generate a matching XML file containing all services, methods and corresponding parameters. These XML files are crucial for the interaction and calling between services. They describe the interface and parameter information of the service in detail, making the integration and calling of the service easier.
[0023] Specifically, the SOA service source code compilation in this application specifically includes: First, complete the complete configuration of the service-oriented architecture service source code in the local development environment to ensure that all necessary dependencies and library files are installed correctly.
[0024] Second, through the dedicated tool interface, specify the storage folder path of the local service-oriented architecture service source code. At the same time, users set the names of the client and server executable files according to actual needs. In addition, considering system performance optimization, users can flexibly select the number of threads used in the compilation process to maximize compilation efficiency.
[0025] Third, the compilation system automatically parses the service-oriented architecture service source code and extracts all service methods and their corresponding parameter information. After that, this information will be formatted into a standard XML file and saved in a pre-set directory.
[0026] Fourth, the compilation system further performs template processing on the service-oriented architecture service source code and automatically generates a service test interface file.
[0027] Fifth, according to the executable file name and other compilation parameters set by the user in the previous steps, the system automatically generates a target configuration file, where the target configuration file is a CMakeList file. The CMakeList file is the configuration file of the CMake build system. As the core configuration file of the build system, the CMakeList file defines the compilation rules and dependencies of the project in detail, providing clear guidance for the subsequent compilation process.
[0028] Sixth, the compilation process is officially started, and the compilation tool interface updates the compilation progress and detailed log information in real time. This process not only allows users to intuitively understand the compilation progress, but also allows users to quickly locate the cause of the error when a problem occurs. Through detailed log records, users can easily troubleshoot compilation errors and ensure that the source code can be successfully compiled into an executable file.
[0029] Seventh, when the compilation progress reaches 100%, it means that the source code compilation is complete. At this time, the client and server exe files will be generated in the directory specified by the tool. These files can be directly used for service debugging and use.
[0030] In addition, in the embodiment of the present application, during the compilation process, the system also allows the user to independently select the number of threads to be used. By adjusting the number of threads, the user can make a trade-off between compilation performance and resource consumption. For projects that require fast compilation, the user can choose to use more threads to increase the compilation speed; for environments with limited resources, the user can choose to use fewer threads to reduce resource consumption.
[0031] Step 102, generating an executable file based on the compilation method and a preset script; Furthermore, before the step of generating an executable file based on the compilation method and the preset script, the method includes: When the compilation is detected, the compilation progress and log information are updated in real time through the compilation tool interface; The generating of the executable file based on the compilation method and the preset script includes: When it is detected that the compilation progress reaches a preset value, an executable file is generated based on the compilation method and a preset script.
[0032] It should be noted that in the embodiment of the present application, after the compilation of the service-oriented architecture service source code is completed, all compiled SOA services and their corresponding methods can be intuitively viewed through this tool. Users can arbitrarily select the service method to be tested according to the test business needs, simulate the client or server, initiate service calls in a network environment that can communicate with the device under test, and can collect communication result logs in real time, completing service testing work efficiently and flexibly.
[0033] Furthermore, generating an executable file based on the compilation method and a preset script includes: If the compilation mode is preset compilation, generating client and server compilation source codes based on the preset script, and generating first executable files corresponding to the client and server; If the compilation mode is VIU simulation compilation, a VIU simulation end compilation source code is generated based on the preset script, and a second executable file corresponding to the VIU simulation end is generated.
[0034] It should be noted that, refer to Figure 2 It can be seen that in the embodiment of the present application, two different compilation modes are involved: VIU simulation compilation and conventional compilation. According to different compilation modes, the system will execute different compilation processes and generate different executable files.
[0035] Specifically, for VIU simulation compilation: Generate client and server compiled source code based on preset scripts: Use preset scripts (which may be configuration files or compilation scripts) to generate client and server compiled source code.
[0036] Generate the first executable file corresponding to the client and the server: Compile the generated source code to generate the executable files corresponding to the client and the server respectively. These executable files are usually used to run in the VIU simulation environment.
[0037] For regular compilation: Generate VIU simulation end compiled source code based on preset script: Use the preset script to generate VIU simulation end compiled source code.
[0038] Generate the second executable file corresponding to the VIU simulation end: Compile the generated source code to generate the executable file corresponding to the VIU simulation end. This executable file is usually used to run in a regular environment, not in the VIU simulation environment.
[0039] Step 103, determining the service to be tested; Further, after the step of determining the service to be tested, the method includes: Configure the service to be tested and the service method corresponding to the service to be tested based on the pre-acquired service type; Configure service signal parameters for the client and server respectively; At least one service method to be tested is determined in the preset service window.
[0040] It should be noted that in the embodiments of the present application, after the compilation is completed, the problems encountered in the service-oriented architecture development process will be further solved. Since in the actual deployment environment, the client and the server are often located on different domain controllers, and the development progress on both sides may not be completely consistent, this greatly increases the complexity of the combined joint debugging of the two. In order to simplify this process and facilitate the testing and verification of the service on a single controller, the present application can simulate the client or server based on the service to be tested, thereby realizing the simulation test of the service.
[0041] Step 104, determining a target executable file corresponding to the service to be tested in the executable file; Step 105, determining the execution mode corresponding to the service method to be tested based on the business scenario; Furthermore, the determining of the execution mode corresponding to the service method to be tested based on the business scenario includes: When it is detected that the business scenario is the first business scenario, the execution mode corresponding to the service method to be tested is sequential execution; When it is detected that the business scenario is the first business scenario, the execution mode corresponding to the service method to be tested is concurrent execution.
[0042] It should be noted that in the embodiments of the present application, two service call modes, serial and parallel, are supported to meet the different business scenario requirements of users. The serial mode will be executed sequentially according to the service task list edited by the user. In addition to the conventional use of this mode, it can also cope with service orchestration and business scenarios with strict requirements on the order of service execution. The parallel mode can execute multiple tasks at the same time according to user needs, providing users with certain large-scale concurrent testing needs. By collecting and analyzing the returned log results, users can easily complete the testing of the service. This solution not only improves the testing efficiency, but also reduces the testing cost, which greatly facilitates the development and testing of the SOA architecture.
[0043] Step 106: Debug the service to be tested based on the target executable file and the execution mode.
[0044] Further, the debugging of the service to be tested based on the target executable file and the execution mode includes: The service to be tested is debugged based on the service method to be tested, the target executable file and the execution mode.
[0045] Further, after the step of debugging the service to be tested based on the service method to be tested, the target executable file and the execution mode, the method includes: Sending a service signal to the other end according to the pre-acquired network parameters configured in the local communication; The debug log window prints the result log returned by the service in real time and saves the result log to the local computer.
[0046] It should be noted that in the embodiment of the present application, after the compilation is completed, the service test can be performed.
[0047] Specifically, refer to Figure 3 , select the executable file to be used from the list of compiled executable files provided according to the service to be tested, determine the service method type, configure the service to be tested and the corresponding method; select the server or client to be tested, and configure the parameters of the service signal; check the service method to be tested in the service window, and select sequential execution or concurrent execution according to the business scenario; start execution, the system will send a service signal to the other end according to the network parameters configured in the local communication XML, the debug log window will print the result log returned by the service in real time, and the log will be saved locally for subsequent analysis.
[0048] In addition, in another embodiment, the present application can be ported across platforms.
[0049] Specifically, the source code is split into multiple functionally independent modules, and they interact with other modules through standardized interfaces; Encapsulate the functional codes related to platform differences at the interface level, define unified interface specifications, and hide the specific implementation details related to the platform; Use macro definitions and conditional compilation features to conditionally include or exclude specific code segments based on different compilation platforms and compilation options; Add the corresponding DDS-related library files for the target operating system, and configure the corresponding compiler and compilation options to ensure that the source code can be successfully compiled and linked to the DDS library.
[0050] It should be noted that in the embodiments of the present application, the source code can be split into multiple functionally independent modules through a modular architecture design method. Each module is responsible for a single, clear task and interacts with other modules through a standardized interface. This design not only improves the readability and maintainability of the code, but also lays a solid foundation for subsequent cross-platform adaptation work.
[0051] After identifying the functional codes in the source code that require special processing due to platform differences, we did not modify them directly in the source code, but cleverly encapsulated them at the interface level. By defining a unified interface specification, the specific implementation details related to the platform are hidden, so that the upper-level application logic does not need to care about the differences in the underlying platform, thus achieving cross-platform code reuse.
[0052] In order to further enhance the cross-platform capability of the source code, the features of macro definition and conditional compilation are fully utilized. A series of macros are defined to identify different compilation platforms and compilation options, and then specific code segments are conditionally included or excluded in the source code according to the values of these macros. In this way, during compilation, the compiler will automatically select the correct code path according to the target platform, thereby generating an application suitable for the current system.
[0053] For the target operating system (Windows and Linux as examples), the corresponding DDS (Data Distribution Service) related library files are added. These library files are the core of the DDS communication mechanism, and they are responsible for the real-time and reliable transmission of data between different systems. According to the characteristics of the current system, a suitable compiler (such as MinGW or GCC) is selected, and the corresponding compilation options are configured to ensure that the source code can be successfully compiled and linked to the DDS library, and finally generate an application that can run on the target system.
[0054] In addition, the present invention particularly focuses on multiple key areas of smart cars, including but not limited to the EDC smart cockpit domain, the VIU body control domain, and the C2 autonomous driving domain. In these areas, the unit test scenario is the cornerstone to ensure the normal operation of the functions of each module of the vehicle. Specifically, the present invention conducts in-depth testing on the basic communication of the SOA (service-oriented architecture) service code, especially in the unit end test, to determine whether the service communication is successful, and thereby troubleshoot whether the problem with the service communication comes from one end, so as to ensure that the information exchange between different domains within the vehicle is unimpeded.
[0055] In the integrated test environment, the service testing function of the present invention plays an important role. Based on the simulated client / server side, the system can execute the service and return a detailed result log. Testers can make accurate assertions based on these logs, quickly diagnose the cause of the problem, and track the source of the problem. This not only improves the accuracy and efficiency of the test, but also provides strong support for subsequent problem solving.
[0056] In the current EDC single-unit development scenario, the VIU simulation technology of the present invention demonstrates its excellent value and broad application prospects. The simulation system can simulate the real peer VIU, and through virtualization, it has opened up many development and test links that originally required the actual VIU bench to complete, greatly solving the pain points in business development and significantly improving development efficiency.
[0057] It is particularly worth emphasizing that the present invention demonstrates its unique advantages in the actual vehicle testing scenario. On the actual vehicle, due to various complex environmental factors and vehicle conditions, problems that cannot be simulated on the test bench often occur. Traditional testing methods often require functional testing on the actual vehicle, and then returning to analyze after the problem is found. This method is not only time-consuming and labor-intensive, but also inefficient. Using the service testing method of the present invention, testers can directly perform relevant service tests on the actual vehicle by accessing the on-board Ethernet. Once a problem is found, the problem can be quickly reproduced according to the simulation environment and targeted solutions can be carried out. This feature greatly expands the business scenarios of actual vehicle testing.
[0058] In the development and testing process of EDC monomers, verification of service functions is a crucial link. However, without a real VIU environment, testing work is often greatly restricted. In order to overcome this problem, the present invention provides an innovative VIU simulation test solution and has achieved remarkable results in the EDC monomer development business scenario.
[0059] During the implementation process, the parameters and configuration of the VIU simulation system were first customized according to the design documents and functional requirements of the EDC monomer. Then, the simulation system was connected to the EDC monomer, and data and instructions were sent to the VIU simulation system through the EDC monomer. After receiving these data and instructions, the VIU simulation system executed the corresponding service functions and returned the results to the simulation system.
[0060] During the test phase, the simulation system is used to print the result logs of the simulated VIU feedback in real time. These logs record in detail the various data during the test process, including the data sent, the instructions received, and the response time. By carefully analyzing these logs, it is possible to accurately determine whether the service functions of the EDC unit are working properly and whether there are potential problems.
[0061] In actual applications, the VIU simulation test solution greatly improves test efficiency. Developers can directly test EDC units without waiting for the preparation and debugging of the real VIU environment. At the same time, the real-time result log provided by the simulation system also provides developers with a basis for quickly locating and solving problems.
[0062] In addition to improving test efficiency, the VIU simulation test solution also reduces test costs. Since there is no need to borrow a bench or real vehicle for testing, a lot of equipment and personnel deployment costs are saved. In addition, the high customizability and scalability of the simulation system can also be flexibly adjusted according to the needs of different EDC units, further improving the flexibility and accuracy of the test.
[0063] The embodiment of the present invention also provides a service simulation device, such as Figure 4 As shown, including: A first determination module 201 is used to determine a compilation mode when a compilation start is detected; A generating module 202, used to generate an executable file based on the compiling method and a preset script; The second determination module 203 is used to determine the service to be tested; A third determination module 204 is used to determine a target executable file corresponding to the service to be tested in the executable file; A fourth determination module 205 is used to determine the execution mode corresponding to the service method to be tested based on the business scenario; The debugging module 206 is used to debug the service to be tested based on the target executable file and the execution mode.
[0064] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a device interface 502, a memory 503 and a bus 504; Memory 503, used for storing computer programs; The processor 501 is used to execute the program stored in the memory 503, and implements the following steps: When the compilation is detected to be started, the compilation mode is determined; Generate an executable file based on the compilation method and the preset script; Identify the services to be tested; Determining a target executable file corresponding to the service to be tested in the executable file; Determine the execution mode corresponding to the service method to be tested based on the business scenario; The service to be tested is debugged based on the target executable file and the execution mode.
[0065] The bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0066] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0067] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0068] The present invention also provides a storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the service simulation method of the aforementioned embodiment.
[0069] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0070] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. According to the above description, it is obvious that the structure required for constructing this type of device is. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific language is to disclose the best mode of the present invention.
[0071] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0072] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all of the features of the individual embodiments disclosed above. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.
[0073] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device so disclosed may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0074] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0075] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0076] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, apparatuses and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0077] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0078] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0079] It should be noted that the various data-related processes in the embodiments of the present application are all carried out in compliance with the corresponding data protection laws and policies of the country where the device is located, and with the authorization given by the owner of the corresponding device.
Claims
1. A service simulation method, characterized in that: The method comprises: When the compilation is detected to be started, the compilation mode is determined; Generate an executable file based on the compilation method and the preset script; Identify the services to be tested; Determining a target executable file corresponding to the service to be tested in the executable file; Determine the execution mode corresponding to the service method to be tested based on the business scenario; The service to be tested is debugged based on the target executable file and the execution mode.
2. The method according to claim 1, characterized in that Before the step of generating an executable file based on the compilation method and the preset script, the method includes: When the compilation is detected, the compilation progress and log information are updated in real time through the compilation tool interface; The generating of the executable file based on the compilation method and the preset script includes: When it is detected that the compilation progress reaches a preset value, an executable file is generated based on the compilation method and a preset script.
3. The method according to claim 1 or 2, characterized in that: The generating of the executable file based on the compilation method and the preset script includes: If the compilation mode is preset compilation, generating client and server compilation source codes based on the preset script, and generating first executable files corresponding to the client and server; If the compilation mode is VIU simulation compilation, a VIU simulation end compilation source code is generated based on the preset script, and a second executable file corresponding to the VIU simulation end is generated.
4. The method according to claim 1, characterized in that: Before the step of determining the compilation mode when the compilation is detected to be started, the method includes: Upon detecting that the service-oriented architecture service source code configuration is complete, determining the storage path corresponding to the service-oriented architecture service source code, as well as the names of the client and server executable files, extracting all service methods and parameter information in the service-oriented architecture service source code; Generate a service test interface file based on all the service methods and the parameter information; Generate a target configuration file based on the executable file name and the parameter information, wherein the target configuration file is used to define compilation rules and dependency relationships of a target project; Compilation is started based on the target configuration file.
5. The method according to claim 1, characterized in that: Determining the execution mode corresponding to the service method to be tested based on the business scenario includes: When it is detected that the business scenario is the first business scenario, the execution mode corresponding to the service method to be tested is sequential execution; When it is detected that the business scenario is the first business scenario, the execution mode corresponding to the service method to be tested is concurrent execution.
6. The method according to claim 1, characterized in that After the step of determining the service to be tested, the method comprises: Configure the service to be tested and the service method corresponding to the service to be tested based on the pre-acquired service type; Configure service signal parameters for the client and server respectively; At least one service method to be tested is determined in the preset service window.
7. The method according to claim 6, characterized in that The debugging of the service to be tested based on the target executable file and the execution mode includes: The service to be tested is debugged based on the service method to be tested, the target executable file and the execution mode.
8. The method according to claim 7, characterized in that After the step of debugging the service to be tested based on the service method to be tested, the target executable file and the execution mode, the method includes: Sending a service signal to the other end according to the pre-acquired network parameters configured in the local communication; The debug log window prints the result log returned by the service in real time and saves the result log to the local computer.
9. A service simulation device, characterized in that: The device comprises: A first determination module is used to determine a compilation mode when a compilation start is detected; A generation module, used to generate an executable file based on the compilation method and a preset script; A second determination module is used to determine the service to be tested; A third determination module, used to determine a target executable file corresponding to the service to be tested in the executable file; A fourth determination module, used to determine the execution mode corresponding to the service method to be tested based on the business scenario; A debugging module is used to debug the service to be tested based on the target executable file and the execution mode.
10. An electronic device, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory has a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the service simulation method according to any one of claims 1 to 9.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the service simulation method according to any one of claims 1 to 9 is implemented.
12. A vehicle, characterized in that: The vehicle comprises the service simulation device according to claim 9.
Citation Information
Patent Citations
Test method and device, electronic equipment and storage medium
CN115114164A
Testing method and device based on DDS communication, testing equipment and storage medium
CN115543840A
Vehicle data testing method, device, equipment and medium
CN115858381A
Data simulation test method, system, equipment and medium
CN115964212A
Vehicle-end multi-platform cross compiling method, system and device, and storage medium
CN118377490A