Cross-domain test system and method, electronic equipment and readable storage medium
Through the cross-domain test system, the connection between the host computer and the domain controller test bench is used to realize the correlation test of cross-domain services, which solves the problems of insufficient correlation and insufficient coverage of unit tests, improves testing efficiency and reduces manual work. burden.
Patent Information
- Application Number
- CN202410770239.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-08-23
AI Technical Summary
When faced with complex automotive functional scenarios, existing unit tests have insufficient correlation, insufficient coverage, and low testing efficiency. They cannot meet the needs of service interaction between multiple modules and require a lot of manual operations and time.
A cross-domain test system is designed. Through the connection between the host computer and multiple domain controller test benches, a cross-domain system-level bench is realized. The host computer is used to send test information, receive and compare the actual response information, and generate a test report. , communicate between domain controllers to implement cross-domain service correlation testing.
It improves the relevance and coverage of testing, reduces manual operations, improves testing efficiency, makes testing more automated, and reduces the workload of testers.
Smart Images

Figure CN118540258A
Abstract
Description
Technical Field
[0001] The present application relates to the field of system testing technology, and in particular to a cross-domain testing system, method, electronic device and readable storage medium. Background Art
[0002] As cars develop towards electrification, intelligence, networking and sharing, traditional distributed electrical architectures can no longer meet the increasing number of vehicle functions. Therefore, new electronic and electrical architectures oriented to centralized and central integration have become the research focus of various automobile manufacturers. The vehicle software architecture based on this electronic and electrical architecture needs to be developed using the SOA (Service Oriented Architecture) layered concept. It has the characteristics of "interface standard accessibility" and "flexible scalability", and is connected through good standard interfaces and services to meet users' different vehicle functional scenarios. In response to increasingly complex scenarios, unit tests related to functional services will be performed during the R&D stage, but the main problems with unit testing are as follows:
[0003] The test correlation is insufficient. Unit testing can only ensure the accuracy of the service interface and parameters within the module. However, if the current scenario function involves service interaction between multiple modules, it cannot meet the service interaction requirements.
[0004] The test coverage is not enough. Usually, the service interaction between multiple modules can realize multiple service contents. Currently, the test environment of a single domain controller cannot cover the service contents corresponding to the interaction of multiple modules.
[0005] The testing efficiency is low. Unit testing cannot meet the testing requirements involving multiple modules. Only functional testing can be performed on real vehicles. Adjusting the real vehicle to the test state requires a lot of cost and time and does not have real-time controllability. Safety cannot be ensured and reproduction is difficult. The execution results of each test case need to be manually analyzed, and the entire testing process is labor-intensive.
[0006] Therefore, how to provide a solution to the above technical problems is a problem that technicians in this field need to solve. Summary of the invention
[0007] In view of this, the embodiments of the present application provide a cross-domain testing system, method, electronic device and readable storage medium to solve the problem of unsatisfactory testing effect of unit testing in the prior art.
[0008] According to a first aspect of an embodiment of the present application, a cross-domain test system is provided, including a host computer and a plurality of domain controller test benches, wherein:
[0009] Each domain controller test bench is connected to all communication objects, and is used to receive first information from any communication object and perform corresponding operations based on the first information;
[0010] The host computer is used to send test information to a first target test bench among the multiple domain controller test benches, receive actual response information returned by a second target test bench among the multiple domain controller test benches, compare the actual response information with expected response information corresponding to the test information, and generate a test report according to the comparison result;
[0011] The communication objects include a host computer and other domain controller test benches; the operations include controlling the corresponding test equipment actions in the current domain controller test bench based on the first information, and sending at least one of the second information to other communication objects based on the first information; the first information includes test information and the second information.
[0012] A second aspect of an embodiment of the present application provides a cross-domain testing method, which is applied to a host computer of a cross-domain testing system, and the method includes:
[0013] Sending test information to a first target test bench among the multiple domain controller test benches, so that the first target test bench performs corresponding operations based on the test information;
[0014] receiving actual response information returned by a second target test bench among the multiple domain controller test benches;
[0015] Compare the actual response information with the expected response information corresponding to the test information, and generate a test report based on the comparison results.
[0016] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0017] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0018] Compared with the prior art, the embodiments of the present application have at least the following beneficial effects: the embodiments of the present application form a cross-domain system-level test bench by establishing a connection between the host computer and all domain controller test benches and a connection between all domain controller test benches, and use the host computer to send test information to the first target test bench, receive actual response information of the second target test bench, compare the test information and the actual response information, and generate a test report according to the comparison result. During the process, the domain controller test benches communicate with each other and perform communication actions, thereby realizing the association test of cross-domain services, effectively solving the problem of insufficient unit test association, and being able to more comprehensively verify the coupling association of service components; and the present application is no longer limited to the test environment of a single domain controller, and can cover complex and changeable functional services of multiple domains, thereby improving the coverage of the test; and because the present application realizes the communication and interconnection between domain controller test benches, it is no longer necessary to manually input test data for the unit module, which greatly reduces the workload of manual operation and improves the test efficiency. Compared with the test method in the prior art that requires manual result analysis, the test of the present application is more automated, which greatly reduces the workload of testers. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 It is a structural diagram of a cross-domain testing system according to an embodiment of the present application;
[0021] Figure 2 It is a structural diagram of a specific cross-domain testing system provided in an embodiment of the present application;
[0022] Figure 3 It is a flowchart of a cross-domain testing method provided in an embodiment of the present application;
[0023] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0025] A cross-domain testing system, method, electronic device, and readable storage medium according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0026] Figure 1 1 is a schematic diagram of a cross-domain test system according to an embodiment of the present application. The cross-domain test system includes a host computer 100 and a plurality of domain controller test benches 101, wherein:
[0027] Each domain controller test bench 101 is connected to all communication objects, and is used to receive first information from any communication object and perform corresponding operations based on the first information;
[0028] The host computer 100 is used to send test information to a first target test bench among the multiple domain controller test benches 101, and receive actual response information returned by a second target test bench among the multiple domain controller test benches 101, compare the actual response information with the expected response information corresponding to the test information, and generate a test report according to the comparison result;
[0029] The communication objects include a host computer and other domain controller test benches; the operations include controlling the corresponding test equipment actions in the current domain controller test bench based on the first information, and sending at least one of the second information to other communication objects based on the first information; the first information includes test information and the second information.
[0030] It can be understood that in this embodiment, the host computer 100 is connected to each domain controller test bench 101, and each domain controller test bench 101 is connected to each other. A gateway can be set in the entire system to realize the communication between the host computer 100 and the domain controller test bench 101. The specific cross-domain test system also includes a gateway 102, the uplink interface of the gateway 102 is connected to the host computer 100, and the multiple downlink interfaces of the gateway 102 are connected one by one with multiple domain controller test benches 101. The gateway 102 can specifically operate according to the Ethernet protocol or other communication protocols.
[0031] It can be understood that each domain controller test bench includes at least one domain controller and a test device around the domain controller that can execute related operations. The domain controller and all execution devices are connected via a wiring harness, and the domain controller test bench is connected to the gateway 102.
[0032] The setting of multiple domain controller test benches in this embodiment is to form a cross-domain system-level test bench of the SOA service-oriented architecture. Since the vehicle system includes multiple control domains, such as the autonomous driving domain, the body domain, the chassis domain, the powertrain domain, and the infotainment domain, when setting up a cross-domain system-level test bench that can be used for multiple control domain linkage testing in this embodiment, a corresponding domain controller test bench is set for each control domain, such as Figure 2As shown, the multiple domain controller test benches in the current embodiment are respectively an autonomous driving domain controller test bench, a body domain controller test bench, a chassis domain controller test bench, a powertrain domain controller test bench, and an infotainment domain controller test bench.
[0033] It can be understood that a test in a cross-domain test system is usually initiated by the host computer, that is, the host computer sends test information to the domain controller test bench; when the domain controller test bench receives the test information, it will perform corresponding operations as the first target bench, including controlling the corresponding test equipment actions in the bench and communicating and linking with other domain controller test benches; the host computer will receive the relevant information triggered by the first target bench after performing the corresponding operation, that is, the actual response information, which includes the information returned after the test equipment in the first target bench acts, and the information returned after other domain controller test benches communicate and link with the first target bench. The domain controller test bench that should return the actual response information to the host computer shall be regarded as the second target bench.
[0034] Among all domain controller test benches, for the host computer, when there is a test requirement, the domain controller test bench that sends the test information is recorded as the first target bench; the domain controller test bench that uploads the actual response information to the host computer is recorded as the second target bench. The actual response information corresponds to the expected response information, and the second target bench is the sender of the expected response information.
[0035] For the domain controller test bench, no matter whether it receives test information from the host computer or second information from other domain controller test benches, it performs corresponding operations as the first information. The operation includes at least one of controlling the corresponding test equipment action and sending second information to other domain controller test benches. The communication and action triggering between domain controller test benches are consistent with those in the actual vehicle. The specific operation information of the relevant domain controller test bench can be returned to the host computer as actual response information so that the host computer can analyze and compare and generate a test report.
[0036] Furthermore, during the operation of the cross-domain test system, there is a delay in the transmission of information. Considering the delay, a standard clock must be used to determine the actual delay in the current cross-domain test system, and the operation details of the system must be adjusted according to the actual delay to eliminate the negative impact of the actual delay on each test. To this end, a clock chip that provides a standard clock can be set in this embodiment, and a timestamp can be added to the information based on the standard clock, thereby determining the actual delay and adding the actual delay to the specific analysis basis of the test report.
[0037] Specifically, the cross-domain test system of the embodiment of the present application further includes a clock chip for providing a standard clock for the host computer and all domain controller test benches;
[0038] The host computer is also used to send a time synchronization test message to each domain controller test bench, determine the sending time and receiving time of the time synchronization test message based on the standard clock, and determine the communication delay of each domain controller test bench based on the sending time and receiving time;
[0039] The host computer is specifically used to send test information to the first target rack based on the communication delay, receive actual response information returned by the second target rack, compare the actual response information with the expected response information based on the communication delay, and generate a test report.
[0040] It can be understood that the actual testing process of the domain controller test bench by the upper computer includes sending test information to the first target bench, receiving actual response information from the second target bench, and generating a test report by comparison; the time synchronization test message is sent before the actual test. The upper computer first uses the time synchronization test message to determine the communication delay, and then performs actual testing based on the communication delay, thereby ensuring that the test report generated by the actual test takes into account the influencing factors of the communication delay.
[0041] The embodiment of the present application forms a cross-domain system-level test bench by establishing a connection between the host computer and all domain controller test benches, and a connection between all domain controller test benches, and uses the host computer to send test information to the first target test bench, receive actual response information from the second target test bench, compare the test information and the actual response information, and generate a test report according to the comparison result. During the process, the domain controller test benches communicate with each other and perform communication actions, thereby realizing the correlation test of cross-domain services, effectively solving the problem of insufficient unit test correlation, and being able to more comprehensively verify the coupling correlation of service components; and the present application is no longer limited to the test environment of a single domain controller, and can cover complex and changeable functional services of multiple domains, thereby improving the coverage of the test; and because the present application realizes the communication and interconnection between domain controller test benches, it is no longer necessary to manually input test data for the unit module, which greatly reduces the workload of manual operation and improves the test efficiency. Compared with the test method in the prior art that requires manual result analysis, the test of the present application is more automated, which greatly reduces the workload of testers.
[0042] Figure 3 It is a flowchart of a cross-domain testing method provided in an embodiment of the present application. Figure 3 The cross-domain testing method can be done by Figure 1 The cross-domain test system is executed by the host computer. Figure 3 As shown, the cross-domain testing method includes:
[0043] S301: Sending test information to a first target test bench among multiple domain controller test benches, so that the first target test bench performs corresponding operations based on the test information;
[0044] S302: receiving actual response information returned by a second target test bench among the multiple domain controller test benches;
[0045] S303: Compare the actual response information with the expected response information corresponding to the test information, and generate a test report according to the comparison result.
[0046] It can be understood that the method of the embodiment of the present application is applied to a cross-domain test system. The cross-domain test system can refer to the description in the above embodiment. The cross-domain test system includes a cross-domain system-level test bench of a host computer and an SOA service-oriented architecture. The cross-domain system-level test bench includes multiple domain controller test benches. Based on the connection relationship between the multiple domain controller test benches, when the host computer sends test information to the first target bench, the first target bench will perform corresponding operations based on the test information, including controlling its own test equipment actions and sending information to other domain controller test benches. According to the specific content of the test information, the corresponding domain controller test bench will perform corresponding actions and information processing, and finally the second target bench will return the actual response information to the host computer; the host computer compares the received actual response information with the expected response information corresponding to the original test information, generates a comparison result of whether the actual response information is consistent with the expected response information, and generates a test report based on the comparison result. The test report is a user-readable report after sorting and typeset, and may also include overall test effect evaluation, fault location or analysis based on the comparison result.
[0047] It is understandable that a complete test design includes the test information used for stimulation and the response information that should be returned when the test object has no faults and the test is successful in theory, and the response information that should be returned when the test is successful, that is, the expected response information in this embodiment. By comparing the actual response information returned in real time with the expected response information, it is possible to understand whether the test has met expectations and whether the test is successful. If there is content in the actual response information that is inconsistent with the expected response information, the cause can be further located.
[0048] Furthermore, considering the wiring harness transmission delay between the domain controller test bench and the host computer, and between each domain controller test bench, in order to ensure that the delay of the host computer sending and receiving signals will not affect the actual test results of the domain controller test bench, a standard clock can be set to provide a clock reference for the host computer and the domain controller test bench at the same time, and the communication delay can be tested based on the standard clock to take the communication delay into account in subsequent tests. Specifically, the method of this embodiment also includes:
[0049] Sending a time synchronization test message to each domain controller test bench, determining the sending time and receiving time of the time synchronization test message based on the standard clock, and determining the communication delay of each domain controller test bench based on the sending time and the receiving time;
[0050] The process of sending test information to a first target test bench among a plurality of domain controller test benches includes:
[0051] Based on the communication delay, sending test information to a first target bench among the plurality of domain controller test benches;
[0052] The process of comparing the actual response information with the expected response information corresponding to the test information and generating a test report based on the comparison results includes:
[0053] Based on the communication delay, the actual response information is compared with the expected response information corresponding to the test information, and a test report is generated according to the comparison result.
[0054] It is understandable that, in the specific implementation process, the main project of the software in the host computer is used to execute the method of this embodiment, and the domain controllers in each domain controller test bench communicate with the main project through the slave project of the software, and the slave project and the main project are configured in the same network segment to ensure normal communication. When testing according to the communication delay, the information sent and received can be time-shifted based on the communication delay to ensure the signal time synchronization between the host computer and all domain controller test benches in the cross-domain test system.
[0055] It can be understood that steps S301-S303 of this embodiment are executed under the premise of known test information, expected response information, a first target test bench and a second target test bench. The generation of this premise is usually input into the host computer by the user. The specific user inputs the service information to be tested into the host computer. The host computer can analyze the scenario logic of the service information to be tested through the automated script, and then determine the relevant content and generate test cases that can be directly used for the host computer to run steps S301-S303.
[0056] Specifically, before sending the test information to the first target test bench among the multiple domain controller test benches, the method further includes:
[0057] Receive service information to be tested;
[0058] Determine the target test cases based on the service information to be tested;
[0059] The target test case includes an execution object, an execution operation corresponding to the execution object, a response object, an expected response operation of the response object, a first target bench determined based on the execution object, a second target bench determined based on the response object, test information corresponding to the execution operation, and expected response information corresponding to the expected response operation;
[0060] The first target bench is a domain controller test bench where an execution object exists in the test device, and the second target bench is a domain controller test bench where a response object exists in the test device.
[0061] It can be understood that each domain controller test bench includes a variety of different test equipment. The test equipment actually includes a domain control device that is consistent with the actual vehicle equipment. The test equipment may also include an environmental simulation device for operating the domain control device and an operation monitoring device for monitoring the status of the domain control device.
[0062] The domain control device is the same as the actual vehicle device, including the domain controller and peripheral devices around the domain controller that can perform related operations. The peripheral devices are used to receive instructions from the domain controller and respond. Whether the domain control device can work normally according to the instructions is also one of the functions tested by the method of this embodiment. For example, the lights, windows, window lifting equipment, central control display screen, radio equipment, audio, etc. that are installed on the actual vehicle can all be used as the domain control devices corresponding to the control domain.
[0063] The environmental simulation device is a device used to simulate the operation of the external environment on the domain control device. For example, a touch robot is used to perform physical click operations on the central control display screen to simulate the user's click action on the central control display screen. Another example is an audio playback device, which can be used to play audio on a radio device to simulate the sounds inside the car, such as user voice commands.
[0064] The operation monitoring device is a device used to monitor the real-time status of the domain control device, such as a temperature sensor and an airflow sensor, which can be used to monitor the real-time temperature and real-time wind speed in the car when the domain control device is an air conditioner. Another example is an image acquisition and analysis module, which can be used to collect images of the domain control device and analyze the real-time status and real-time position of the domain control device. It can be understood that some operation monitoring devices themselves are real vehicle devices that will be installed on the vehicle, so the cross-domain test system in this embodiment can also be regarded as a domain control device.
[0065] Based on the above analysis, in a target test case, the execution object can be the domain control device itself. Test information is sent to the domain control device, and the domain control device that receives the test information will automatically perform the corresponding operation. The execution object can also be an environmental simulation device. Test information is sent to the environmental simulation device, and the environmental simulation device that receives the test information will perform the corresponding operation. This operation will trigger other devices in the corresponding domain controller test bench, especially the domain control device action.
[0066] Therefore, the test device includes at least one of an environment simulation device and a domain control device, and the process of sending test information to a first target bench among multiple domain controller test benches includes:
[0067] When the execution object is an environmental simulation device, test information is sent to an environmental simulation device corresponding to the test information in a first target test bench among multiple domain controller test benches, so that the environmental simulation device performs a corresponding execution operation on a domain control device corresponding to the test information in the first bench according to the test information;
[0068] When the execution object is a domain control device, test information is sent to the domain control device corresponding to the test information of the first target stand, so that the domain control device performs the corresponding execution operation according to the test information.
[0069] Similarly, in a target test case, the response object can be the domain control device itself or the operation monitoring device. The response information returned by the domain control device is the work log information of the domain control device itself, and its expected response information is the work log information that should be returned when the test is normal, also known as expected log information; the response information returned by the operation monitoring device is the analysis result generated when the operation monitoring device is working, and its expected response information is the analysis result that should be returned when the test is normal, also known as expected sampling monitoring information. Therefore, the test device includes at least one of the domain control device and the operation monitoring device that monitors the domain control device, and the expected response information includes at least one of the expected log information returned by the domain control device and the expected sampling monitoring information returned by the operation monitoring device.
[0070] It can be understood that a target test case includes an excitation part and a response part. The excitation part includes a first target bench, an execution object, and an execution operation, and the response part includes a second target bench, a response object, a response object, and an expected response operation. For service information with a high frequency of use, the corresponding sample test cases can be set in advance and stored in the test scenario library. When the same service information to be tested is received, the sample test case is directly used, or when the service information to be tested with a high degree of match with the sample test case is received, the sample test case is adjusted to obtain the target test case.
[0071] Therefore, when receiving the service information to be tested, you can first search the test scenario library to see if there are similar or identical sample test cases to obtain the target test case. If not, then receive the secondary control instructions sent by the user to the host computer, and generate a new target test case based on the secondary control instructions. The newly generated target test case can be stored in the test scenario library for use in subsequent tests.
[0072] Specifically, the process of determining the target test case based on the service information to be tested includes:
[0073] Based on the service information to be tested, analyze whether there are sample test cases matching the service information to be tested in the test scenario library;
[0074] If yes, determine the target test case based on the sample test case;
[0075] If not, a secondary control instruction is received, a target test case is determined based on the service information to be tested and the secondary control instruction, and the target test case is stored as a sample test case in a test scenario library.
[0076] It can be understood that the target test case is determined based on the service information to be tested and the test scenario library. The service information to be tested, as a test requirement, needs to be parsed into a structured test case that can be directly used by the method of this embodiment.
[0077] The sample test cases in the test scenario library are generated by generalizing the free combination parameters of the scenario service elements and screening them according to constraints such as vehicle driving safety, vehicle battery health status, road environment, etc., so as to automatically generate test cases that meet the functional specifications in batches; the structure and form of the test cases are generated based on the use case template of the cross-domain test bench, ensuring the feasibility of the use cases in the bench test environment.
[0078] Match the service information to be tested with the sample test cases. If there is a sample test case whose corresponding service information is consistent with the service information to be tested, the sample test case can be directly used as the target test case. If there is a sample test case whose service information is partially the same or similar to the service information to be tested, some object parameters can be adjusted on the basis of the sample test case to generate the target test case. If the above situation does not exist, a new target test case needs to be constructed. The scenario logic can be analyzed according to the automated script. The host computer provides reference information for the tester to choose based on the scenario logic of the service information to be tested. The tester sends secondary control instructions to the host computer based on the reference information. Multiple human-computer interactions can be performed in the process of determining the target test case, and finally a complete and usable target test case is obtained.
[0079] It is understandable that the determination of the target test case corresponding to the service information to be tested can be implemented based on the scenario logic. In this embodiment, the host computer can analyze the scenario logic of the service information to be tested through the automated script, and then determine the relevant content and generate test cases, where the scenario logic can be abstracted into four parts: scenario perception, scenario conditions, scenario interaction and scenario execution, where scenario perception requires intelligent scene recognition through cameras, voice modules, in-vehicle operations, etc., and scenario conditions require vehicle status such as gear position, speed, battery status and other service information to determine the conditions for the vehicle's execution scenario, and scenario interaction is the command request for scene operation, scene operation sequence, scene information display, etc. through the central control screen and voice, and scenario execution is the execution of the vehicle's action response, such as driving, parking, lighting system, seats, etc.
[0080] By freely combining these different scenario elements through an algorithm and adding constraints, such as vehicle driving safety, vehicle battery health status, road environment and other conditions, and screening out reasonably designed service combinations, we can obtain different sample test cases. These sample test cases are stored in a test scenario library. Different types of sample test cases can cover more functional services and improve the test coverage.
[0081] It is understandable that the sample test cases are a combination of basic service elements combined with scenario logic, and are implemented based on the principles of vehicle driving safety, power economy, and driving comfort as service combinations. Among them, the embodiment of driving safety, such as the vehicle lane change assistance function, is specifically manifested in calling the environmental perception service to provide surrounding traffic information and the vehicle status service to provide vehicle posture information during the vehicle's lane change process. When a dangerous vehicle approaches the target lane, the body domain controller will display the warning information on the side rearview mirror of the target lane, and the cockpit domain controller will sound an alarm to ensure the safety of the vehicle.
[0082] For example, a sample test case is a lunch break mode scenario, and its service elements include: voice control or central control operation command service, vehicle driving information and gear status service, seat and air conditioning action service. The above three service elements are combined to form a lunch break mode, which is decomposed through scene logic. Its decomposition form is automatically recognized. According to the description of the test scene, perception services such as weather conditions, road conditions, traffic conditions and other key environmental information are identified; scene conditions such as vehicle posture information, gear status, accelerator pedal or brake pedal position, lights, seats, air conditioning and other equipment status; scene interaction trigger actions such as voice trigger and manual trigger; based on the above logic, the service categories involved in the entire scene can be decomposed.
[0083] Specifically, in the lunch break mode scenario, the scenario conditions are that the vehicle is stationary and the gear is in P gear. The scenario interaction is that the tester sends the lunch break mode command through voice or manually clicking on the central control screen. The scenario execution is that the vehicle adjusts the tester's seat to a suitable position and turns on the air conditioning external circulation, thereby completing the entire lunch break mode action response.
[0084] The entire test implementation can be classified into the following contents: the traffic status in the perception service is simulated by the intelligent driving domain test bench, the weather status is simulated by the body domain test bench, and the vehicle status service is simulated by the power domain test bench simulator. For example, the final expected result of testing the lunch break mode is that the air conditioner is turned on and the seat is adjusted. By comparing the air conditioning status and seat status sent by the final body domain test bench, it is confirmed whether the test has passed.
[0085] Therefore, when the service information to be tested received by the method of this embodiment is a lunch break mode scenario, based on the scenario interaction, it can be determined that the first target bench is an infotainment domain controller test bench, and the execution object can be a domain control device that receives the lunch break mode instruction, or it can be an environmental simulation device that issues the lunch break mode execution. At this time, the environmental simulation device includes a touch manipulator or an audio playback device, and the execution operation corresponding to the touch manipulator is: click on the central control screen to send a lunch break mode instruction, and the execution operation corresponding to the audio playback device is to play a lunch break mode instruction in the form of voice to the radio device. If the execution object is a domain control device, the host computer will simulate the lunch break mode instruction in the form of an electronic information message, and send the test information of the simulated lunch break mode instruction directly to the domain control device, where the domain control device includes a central control screen, a radio device or a domain controller. After receiving the test information, the domain control device believes that the lunch break mode instruction has been received, and then runs the subsequent actions triggered by the lunch break mode instruction according to the internal setting logic. In addition, the scene condition of the lunch break mode scene also corresponds to a related execution object and execution operation, and the execution object should implement the scene condition based on the execution operation.
[0086] Similarly, the second target test bench is the body domain controller test bench, and the response objects may include the controller, seat position sensor, temperature sensor, wind speed sensor, and in-car image acquisition device in the body domain controller, where the controller is a domain control device, and its expected response information is the expected log information of the domain control device, and the expected log information can reflect the details of information transmission; the seat position sensor, temperature sensor, wind speed sensor, and in-car image acquisition device are operation monitoring devices, and their expected response information is the expected sampling monitoring information.
[0087] Specifically, the entire lunch break mode functional testing process includes:
[0088] The host computer sends test information to the infotainment domain controller test bench to simulate voice commands or central control screen operation commands;
[0089] The infotainment domain controller test bench transmits the corresponding command information to the chassis domain controller test bench, which provides the current vehicle status information. The body domain controller test bench receives the vehicle status information and determines whether the current status information meets the conditions for starting the lunch break mode. If the conditions are met, the vehicle seat and air conditioning system are adjusted to complete the action execution of the entire lunch break mode.
[0090] The host computer receives the current work log information of the body domain controller test bench as real-time response information, and compares the real-time response information with the expected response information, thereby realizing the test of the cross-domain service of the whole vehicle system.
[0091] Similarly, taking the automatic parking scene function as an example, the user clicks the automatic parking button on the vehicle's central control screen, and the infotainment domain controller sends a parking service instruction to the autonomous driving domain controller through the vehicle Ethernet. The execution units of the parking function are the body domain controller, chassis domain controller, and powertrain domain controller. The entire parking function is defined as 1 service and 3 sub-services. The autonomous driving domain controller requests a single service. After receiving the service request, each execution unit retracts the rearview mirror, follows the trajectory planned by the autonomous driving decision module to reverse and turn, and completes the entire parking action. When testing the automatic parking scene function, the entire test process involves 4 domains, involving information interaction between the test benches of these four domain controllers, thereby realizing cross-domain system-level testing of functions across domains.
[0092] It can be understood that, compared with the existing unit test, the cross-domain test method of this embodiment has the following effects:
[0093] Improve test correlation: This embodiment cascades multiple domain controller test benches to form a cross-domain system-level test bench, thereby realizing the correlation test of cross-domain services of the whole vehicle software, effectively solving the problem of insufficient unit test correlation, and being able to more comprehensively verify the coupling correlation of service components.
[0094] Enhanced test coverage: The method of this embodiment can cover complex and changeable functional services, thus improving the test coverage. This is because this embodiment can implement efficient testing of system-level services based on a cross-domain system-level test bench, and is no longer limited to the test environment of a single domain controller, and can better adapt to the complexity and diversity of modern automotive functions.
[0095] Improve test efficiency: This embodiment uses automated scripts to achieve efficient testing of system-level services, greatly reducing the workload of manual operations and improving test efficiency. Compared with the test method in the prior art that requires manual result analysis, the test process of this embodiment is more automated, greatly reducing the workload of testers.
[0096] It can be understood that, compared with the existing real vehicle test, the cross-domain test method of this embodiment has the following effects:
[0097] The test environment is controllable. The trigger conditions of the entire test environment can be parameterized. However, during real vehicle testing, setting the initial state of the entire test environment takes a lot of time and does not have the ability to be controlled in real time.
[0098] Safety of test implementation: This embodiment can simulate extreme test conditions through a simulation environment, such as testing the information interaction between domain controllers and the response status of corresponding actuators under the emergency braking state of a vehicle. The interaction between the test benches of each domain controller can be triggered by the test information, thereby avoiding potential safety risks for testers.
[0099] Test case execution repeatability: This embodiment verifies the test results repeatedly under the condition that the test condition parameters are configured consistently, thereby accurately locating the cause of the problem.
[0100] The efficiency of test operation is improved. The entire test steps can be controlled by code, thereby automating the entire test process and improving test efficiency.
[0101] The embodiment of the present application forms a cross-domain system-level test bench by establishing a connection between the host computer and all domain controller test benches, and a connection between all domain controller test benches, and uses the host computer to send test information to the first target test bench, receive actual response information from the second target test bench, compare the test information and the actual response information, and generate a test report according to the comparison result. During the process, the domain controller test benches communicate with each other and perform communication actions, thereby realizing the correlation test of cross-domain services, effectively solving the problem of insufficient unit test correlation, and being able to more comprehensively verify the coupling correlation of service components; and the present application is no longer limited to the test environment of a single domain controller, and can cover complex and changeable functional services of multiple domains, thereby improving the coverage of the test; and because the present application realizes the communication and interconnection between domain controller test benches, it is no longer necessary to manually input test data for the unit module, which greatly reduces the workload of manual operation and improves the test efficiency. Compared with the test method in the prior art that requires manual result analysis, the test of the present application is more automated, which greatly reduces the workload of testers.
[0102] All the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here. It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0103] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0104] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.
[0105] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0106] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.
[0107] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0108] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0109] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A cross-domain testing system, characterized in that: It includes a host computer and multiple domain controller test benches, including: Each of the domain controller test benches is connected to all communication objects, and is used to receive first information from any of the communication objects, and perform corresponding operations based on the first information; The host computer is used to send test information to a first target test bench among the multiple domain controller test benches, receive actual response information returned by a second target test bench among the multiple domain controller test benches, compare the actual response information with expected response information corresponding to the test information, and generate a test report according to the comparison result; The communication objects include the host computer and the other domain controller test benches; the operation includes controlling the corresponding test equipment action in the current domain controller test bench based on the first information, and sending at least one of the second information to the other communication objects based on the first information; the first information includes the test information and the second information.
2. The cross-domain testing system according to claim 1, characterized in that: It also includes a clock chip for providing a standard clock for the host computer and all the domain controller test benches; The host computer is also used to send a time synchronization test message to each of the domain controller test benches, determine the sending time and receiving time of the time synchronization test message based on the standard clock, and determine the communication delay of each of the domain controller test benches based on the sending time and the receiving time; The host computer is specifically used to send the test information to the first target rack based on the communication delay, receive the actual response information returned by the second target rack, compare the actual response information with the expected response information based on the communication delay, and output the test report.
3. A cross-domain testing method, characterized in that: Applied to a host computer of a cross-domain test system, the method comprises: Sending test information to a first target test bench among the multiple domain controller test benches, so that the first target test bench performs a corresponding operation based on the test information; Receiving actual response information returned by a second target test bench among the plurality of domain controller test benches; The actual response information is compared with the expected response information corresponding to the test information, and a test report is generated according to the comparison result.
4. The method according to claim 3, characterized in that Also includes: Sending a time synchronization test message to each of the domain controller test benches, determining a sending time and a receiving time of the time synchronization test message based on a standard clock, and determining a communication delay of each of the domain controller test benches based on the sending time and the receiving time; The process of sending test information to a first target test bench among a plurality of domain controller test benches includes: Based on the communication delay, sending test information to a first target test bench among the plurality of domain controller test benches; The process of comparing the actual response information with the expected response information corresponding to the test information and generating a test report according to the comparison result includes: Based on the communication delay, the actual response information is compared with the expected response information corresponding to the test information, and a test report is generated according to the comparison result.
5. The method according to claim 3, characterized in that: Before sending the test information to the first target test bench among the multiple domain controller test benches, the method further includes: Receive service information to be tested; Based on the service information to be tested, determine a target test case; The target test case includes an execution object, an execution operation corresponding to the execution object, a response object, an expected response operation of the response object, the first target rack determined based on the execution object, the second target rack determined based on the response object, the test information corresponding to the execution operation, and the expected response information corresponding to the expected response operation; The first target bench is the domain controller test bench where the execution object exists in the test device, and the second target bench is the domain controller test bench where the response object exists in the test device.
6. The method according to claim 5, characterized in that The test device includes at least one of an environment simulation device and a domain control device, and the process of sending test information to a first target bench among the multiple domain controller test benches includes: When the execution object is the environment simulation device, sending test information to the environment simulation device corresponding to the test information in a first target test bench among multiple domain controller test benches, so that the environment simulation device performs the execution operation on the domain control device corresponding to the test information in the first test bench according to the test information; When the execution object is the domain control device, the test information is sent to the domain control device corresponding to the test information of the first target stand, so that the domain control device performs the execution operation according to the test information.
7. The method according to claim 5, characterized in that The test device includes at least one of a domain control device and an operation monitoring device for monitoring the domain control device. The expected response information includes at least one of expected log information returned by the domain control device and expected sampling monitoring information returned by the operation monitoring device.
8. The method according to any one of claims 5 to 7, characterized in that: The process of determining a target test case based on the service information to be tested includes: Based on the service information to be tested, analyzing whether there is a sample test case matching the service information to be tested in the test scenario library; If so, determining the target test case based on the sample test case; If not, a secondary control instruction is received, the target test case is determined based on the service information to be tested and the secondary control instruction, and the target test case is stored in the test scenario library as the sample test case.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 3 to 8 are implemented.
10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 3 to 8 are implemented.
