A method and device for generating a functional test case script for a vehicle-mounted instrument

By automatically binding the display properties of the vehicle instrument and the real-time components through monitoring equipment, a use case test script is generated, which solves the problems of low efficiency and insufficient accuracy in test script creation in the existing technology and realizes efficient and accurate test script generation.

CN119829455BActive Publication Date: 2025-10-21AUTOLINK INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411954914.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-10-21
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

In existing vehicle instrument function testing, the creation of test scripts is inefficient and its accuracy is difficult to guarantee. Multiple people are required to manually write plain text test cases, resulting in low efficiency and insufficient accuracy.

Method used

The display interface of the vehicle instrument is captured by the monitoring device, the display attributes and real-time display components are automatically bound, and a use case test script is generated. The existing technical means include: binding the display attributes captured by the monitoring device with the real-time display components, and generating a use case test script based on the binding relationship and the test template.

Benefits of technology

It improves the efficiency and accuracy of test script creation, reduces manual intervention, and ensures the timeliness and accuracy of scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829455B_ABST
    Figure CN119829455B_ABST
Patent Text Reader

Abstract

The application provides a generation method and device of a vehicle-mounted instrument function test case script, comprising: capturing a target display interface of a target vehicle-mounted instrument through a monitoring device and mapping the target display interface to an instrument display area, an instrument data display sub-area displaying a plurality of display attributes corresponding to the target display interface, the target display interface comprising a plurality of real-time display components, and the display attribute describing an instrument display function; binding the display attribute and the real-time display component corresponding thereto; and for each display attribute, generating a corresponding case test script according to a binding relationship between the display attribute and the real-time display component corresponding thereto and a test template. The case test script is automatically created by fusing display data of the vehicle-mounted instrument obtained through real-time monitoring, so that the script creation efficiency is improved while the timeliness and accuracy of script creation are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automotive electronic testing technology, and in particular to a method and device for generating a vehicle instrument function test case script. Background Art

[0002] With the development of the times, the use of automobiles is increasing. Every car needs an onboard instrument to display the vehicle's status. To ensure that the instrument displays the correct indication in actual use, a series of tests must be conducted during the instrument development stage, and functional testing is the most important. When conducting functional testing, the test script is the most important test basis.

[0003] Existing instruments have many functions. In order to ensure functional stability, a team of multiple people is generally required to maintain and test the functions of the on-board instruments. The testing steps require each team member to manually write and create corresponding plain text test cases. This manual writing method not only reduces the efficiency of script creation, but also cannot guarantee the accuracy of the generated test scripts. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide at least a method and device for generating a vehicle instrument function test case script, which automatically creates a case test script by integrating the display data of the vehicle instrument obtained by real-time monitoring, thereby improving the efficiency of script creation while ensuring the timeliness and accuracy of script creation.

[0005] This application mainly includes the following aspects:

[0006] In a first aspect, an embodiment of the present application provides a method for generating a vehicle instrument functional test case script, the method comprising: providing a functional test project configuration interface for a target vehicle instrument, the functional test project configuration interface comprising a project information configuration area and an instrument display area, the project information configuration area comprising an instrument data display sub-area; capturing a target display interface of the target vehicle instrument through a monitoring device and mapping it to the instrument display area, the instrument data display sub-area displaying multiple display attributes corresponding to the target display interface, the target display interface comprising multiple real-time display components, the display attributes describing an instrument display function; binding the display attributes to their corresponding real-time display components; for each display attribute, generating a corresponding use case test script based on the binding relationship between the display attribute and its corresponding real-time display component and the test template.

[0007] In one possible implementation, the project information configuration area also includes a project basic information configuration item and an instrument data loading control, wherein the method further includes: in response to a selection operation performed on the instrument data loading control, loading a target instrument data packet corresponding to the target vehicle instrument from the target download address indicated by the project basic information through a CAN communication tool; parsing the target instrument data packet to obtain multiple interface display files corresponding to the target vehicle instrument, each interface display file corresponding to an instrument function interface provided by the target vehicle instrument, and each interface display file including multiple display attributes corresponding to the instrument function interface; determining a target instrument function interface corresponding to the target display interface; and loading the multiple display attributes corresponding to the target instrument function interface into the instrument data display sub-area.

[0008] In one possible implementation, the step of binding a display attribute to its corresponding real-time display component includes: in response to a selection operation performed on a target display attribute, enabling a graphic capture function for a target display interface; and in response to a capture operation performed on a target real-time display component corresponding to the target display attribute, binding the target real-time display component to the target display attribute.

[0009] In one possible embodiment, a use case test script corresponding to each display attribute is generated in the following manner: in response to a test template creation trigger operation performed on a target display attribute, a test template configuration interface corresponding to the target display attribute is displayed, the test template configuration interface including a first test step configuration entry, the first test step configuration entry including a first test instruction configuration item and a test component configuration item; in response to a configuration operation performed on the first test instruction configuration item, first test instruction configuration data is generated; a configuration operation performed on the test component configuration item is received, the target real-time display component bound to the target display attribute is determined as a test object, and test object configuration data is generated; first test step configuration data corresponding to the first test step configuration entry is generated from the test object configuration data and the first test instruction configuration data; a test template corresponding to the target display attribute is formed from the first test step configuration data corresponding to each first test step configuration entry; in response to a test script generation operation performed on the test template, a use case test script corresponding to the test template is generated.

[0010] In one possible embodiment, the test template configuration interface also includes a second test step configuration entry, and the second test step configuration entry includes a second test instruction configuration item and an instruction parameter configuration item, wherein the method also includes: generating second test step configuration data corresponding to the second test step configuration entry in response to the configuration operation performed on the second test instruction configuration item and the instruction parameter configuration item; and generating a test template corresponding to the target display attribute based on the first test step configuration data corresponding to each first test step configuration entry and the second test step configuration data corresponding to each second test step configuration entry, as well as the step sequence between the test step configuration entries.

[0011] In one possible embodiment, in response to a test script generation operation performed on a test template, the step of generating a use case test script corresponding to the test template includes: in response to the test script generation operation performed on the test template, generating a run statement corresponding to each test step configuration data according to the test step configuration data corresponding to each test step configuration entry; assembling multiple run statements according to the step sequence between the test step configuration entries to generate a use case test script corresponding to the test template.

[0012] In one possible implementation, the instrument display area also includes an instrument display interface adjustment option, wherein the method further includes: in response to a configuration operation performed on the instrument display interface adjustment option, adjusting the target display interface displayed in the instrument display area to a specified brightness and a specified size.

[0013] In the second aspect, an embodiment of the present application also provides a device for generating a vehicle-mounted instrument functional test case script, the device including: a providing module for providing a functional test project configuration interface for a target vehicle-mounted instrument, the functional test project configuration interface including a project information configuration area and an instrument display area, the project information configuration area including an instrument data display sub-area; a monitoring module for capturing a target display interface of a target vehicle-mounted instrument through a monitoring device and mapping it to the instrument display area, the instrument data display sub-area displays multiple display attributes corresponding to the target display interface, and the target display interface includes multiple real-time display components; a binding module for binding display attributes to their corresponding real-time display components; a script generation module for generating a corresponding use case test script for each display attribute based on the binding relationship between the display attribute and its corresponding real-time display component and a test template.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for generating a vehicle instrument function test case script in the above-mentioned first aspect or any possible implementation method of the first aspect.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating a vehicle instrument function test case script in the above-mentioned first aspect or any possible implementation method of the first aspect are executed.

[0016] The present application provides a method and apparatus for generating a vehicle instrument function test case script, including: capturing a target display interface of a target vehicle instrument through a monitoring device and mapping it to an instrument display area, wherein the instrument data display subarea displays multiple display attributes corresponding to the target display interface, wherein the target display interface includes multiple real-time display components, and the display attributes describe an instrument display function; binding the display attributes to their corresponding real-time display components; and generating a corresponding case test script for each display attribute based on the binding relationship between the display attribute and its corresponding real-time display component and a test template. By integrating the display data of the vehicle instrument obtained through real-time monitoring, the case test script is automatically created, thereby improving the efficiency of script creation while ensuring the timeliness and accuracy of script creation.

[0017] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A flowchart showing a method for generating a vehicle instrument function test case script provided by an embodiment of the present application is shown;

[0020] Figure 2 A functional module diagram of a device for generating a vehicle instrument function test case script provided by an embodiment of the present application is shown;

[0021] Figure 3A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0023] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0024] Existing instruments have many functions. In order to ensure functional stability, a team of multiple people is generally required to maintain and test the functions of the on-board instruments. The testing steps require each team member to manually write and create corresponding plain text test cases. This manual writing method not only reduces the efficiency of script creation, but also cannot guarantee the accuracy of the generated test scripts.

[0025] Based on this, the embodiments of the present application provide a method and apparatus for generating a vehicle instrument function test case script. By integrating the display data of the vehicle instrument obtained by real-time monitoring, the use case test script is automatically created, thereby improving the efficiency of script creation while ensuring the timeliness and accuracy of script creation. The specific details are as follows:

[0026] See also Figure 1 , Figure 1 The flowchart of the method for generating a vehicle instrument function test case script provided by the embodiment of the present application is shown. Figure 1 As shown, the method provided in the embodiment of the present application is integrated into a test case generation tool. The test case generation tool is created based on the Python Qt PydSigner display framework tool and includes the following steps:

[0027] S100: providing a function test item configuration interface for a target vehicle instrument.

[0028] The functional test project configuration interface includes a project information configuration area and an instrument display area. The project information configuration area includes an instrument data display sub-area.

[0029] S200: Capture a target display interface of a target vehicle-mounted instrument through a monitoring device and map it to an instrument display area.

[0030] The instrument data display sub-area displays multiple display attributes corresponding to the target display interface. The target display interface includes multiple real-time display components. The display attributes describe an instrument display function.

[0031] S300: Bind the display attribute to its corresponding real-time display component.

[0032] S400: For each display attribute, generate a corresponding use case test script according to the binding relationship between the display attribute and its corresponding real-time display component and the test template.

[0033] In step S100, the test case generation tool provides a functional test project creation interface for the vehicle instrument. The functional test project creation interface includes a functional test project creation control. In response to a selection operation performed on the functional test project creation control, a functional test project configuration interface is displayed. The functional test project configuration interface includes a project information configuration area and an instrument display area.

[0034] The project information configuration area includes project basic information configuration items, monitoring equipment configuration items and instrument data loading controls.

[0035] In a preferred embodiment, the project basic information configuration item is used to configure the project basic information corresponding to the created functional test project. The project basic information includes but is not limited to at least one of the following items: the project name, the vehicle model information corresponding to the target vehicle-mounted instrument, and the target download address corresponding to the instrument data package provided by the manufacturer of the target vehicle-mounted instrument. Specifically, the project basic information configuration item includes the project name configuration item, the vehicle model configuration item to which the target vehicle-mounted instrument belongs, and the service configuration item. The project name, the vehicle model information corresponding to the target vehicle-mounted instrument, and the target download address are generated in response to the configuration operations performed on the project name configuration item, the vehicle model configuration item to which the target vehicle-mounted instrument belongs, and the service configuration item, respectively. In this application, based on the different designs of vehicle-mounted instruments by different manufacturers, after the target vehicle-mounted instrument to be tested is clearly defined, it is necessary to obtain the corresponding instrument data package based on the manufacturer of the target vehicle-mounted instrument to generate subsequent test scripts. Specifically, the target download address can be the data interface address provided by the manufacturer of the target vehicle-mounted instrument.

[0036] In a preferred embodiment, the monitoring device configuration items include at least a monitoring device refresh control, a monitoring device disconnect control, and a monitoring device connection control. In the present application, the monitoring device may be a high-resolution industrial camera. The monitoring device is arranged on a test bench near the target vehicle instrument to capture the target display interface displayed in real time by the target vehicle instrument. The on-off control of the monitoring device may be implemented by the monitoring device configuration items. Specifically, in response to the selection operation performed on the monitoring device disconnect control, the connection between the test case generation tool carried by the host computer and the monitoring device is cut off. In response to the selection operation performed on the monitoring device connection control, the connection between the test case generation tool carried by the host computer and the monitoring device is connected. In response to the selection operation performed on the monitoring device refresh control, the connection communication between the monitoring device and the test case generation tool is refreshed.

[0037] In a preferred embodiment, step S200 includes:

[0038] In response to the selection operation performed on the monitoring device connection control, the test case generation tool carried by the host computer is connected to the monitoring device, and the target display interface of the target vehicle instrument captured by the monitoring device is displayed in the instrument display area.

[0039] In a preferred embodiment, the method provided by the present application further includes:

[0040] In response to a selection operation performed on an instrument data loading control, a target instrument data packet corresponding to a target on-board instrument is loaded from a target download address via a CAN communication tool, the target instrument data packet is parsed, and a plurality of interface display files corresponding to the target on-board instrument are obtained, each interface display file corresponding to an instrument function interface provided by the target on-board instrument, each interface display file including a plurality of display attributes corresponding to the instrument function interface, a target instrument function interface corresponding to the target display interface is determined, and the plurality of display attributes corresponding to the target instrument function interface are loaded into an instrument data display sub-area.

[0041] Specifically, in this application, based on the target display interface actually collected by the monitoring equipment, multiple display attributes corresponding to it are dynamically loaded. This can free the test script creator from the large number of display attributes corresponding to the target vehicle instrument, so that he only focuses on the creation of relevant test scripts corresponding to the target display interface currently corresponding to the target vehicle instrument, indicating that the created test script has invalidity.

[0042] Preferably, the display attribute actually corresponds to an instrument display function provided by the manufacturer of the target vehicle instrument, such as a hill descent indicator light, a power mode, a vehicle speed setting, and an engine speed setting, and each instrument display function is associated with a corresponding function operation code.

[0043] In a preferred embodiment, step S300 includes:

[0044] In response to a selection operation performed on a target display attribute, a graphic capture function for a target display interface is enabled. In response to a capture operation performed on a target real-time display component corresponding to the target display attribute, the target real-time display component is bound to the target display attribute.

[0045] In the specific implementation, taking the target display attribute as the engine speed setting as an example, the engine speed setting is selected to trigger the graphic capture function of the target display interface. At this time, the user can capture the target real-time display component corresponding to the engine speed from the target display interface, and bind the target real-time display component to the engine speed setting. The purpose of this process is that the original display component corresponding to the engine speed setting may not match the component displayed on the target vehicle instrument. In this application, by establishing the corresponding binding, the real-time display data of the target vehicle instrument is always used as the basis, which can ensure the timeliness and accuracy of the subsequent use case test script creation and test script running process.

[0046] In another preferred embodiment, the instrument display area also includes a re-intercept option, a save screenshot option, a abandon interception option and a select save directory option, wherein, in response to the selection operation performed on the re-intercept option, the interception operation can be re-triggered, in response to the selection operation performed on the abandon interception option, the current interception operation can be abandoned, and in response to the configuration operation performed on the select save directory option, the save location of the currently captured image is determined.

[0047] In a preferred embodiment, the instrument display area further includes an instrument display interface adjustment option, wherein the method further includes:

[0048] In response to the configuration operation performed on the instrument display interface adjustment option, the target display interface displayed in the instrument display area is adjusted to a specified brightness and a specified size.

[0049] Specifically, the instrument display area also includes multiple instrument display adjustment configuration items, and the multiple instrument display adjustment configuration items include at least brightness adjustment configuration items, size adjustment configuration items and adjustment configuration confirmation controls. In response to the configuration operations performed on the brightness adjustment configuration items and the size adjustment configuration items respectively, the target display interface displayed in the instrument display area is adjusted to the specified brightness and specified size. In response to the selection operation performed on the adjustment configuration confirmation control, the adjustment configuration data determined by the configuration of the multiple instrument display adjustment configuration items is saved, and the target display interface is redisplayed according to the adjustment configuration data.

[0050] In a preferred embodiment, step S400 includes:

[0051] In response to a test template creation trigger operation performed on a target display attribute, a test template configuration interface corresponding to the target display attribute is displayed. The test template configuration interface includes a first test step configuration entry. Each test step configuration entry corresponds to a test step. The first test step configuration entry includes a first test instruction configuration item and a test component configuration item. In response to a configuration operation performed on the first test instruction configuration item, first test instruction configuration data is generated. The configuration operation performed on the test component configuration item is received. The target real-time display component bound to the target display attribute is determined as a test object, and test object configuration data is generated. First test step configuration data corresponding to the first test step configuration entry is generated from the test object configuration data and the first test instruction configuration data. A test template corresponding to the target display attribute is formed from the first test step configuration data corresponding to each first test step configuration entry. In response to a test script generation operation performed on the test template, a use case test script corresponding to the test template is generated.

[0052] In another preferred embodiment, the test template configuration interface further includes a second test step configuration entry, the second test step configuration entry includes a second test instruction configuration item and an instruction parameter configuration item, wherein the method further includes:

[0053] In response to the configuration operation performed on the second test instruction configuration item and the instruction parameter configuration item, second test step configuration data corresponding to the second test step configuration entry is generated, and a test template corresponding to the target display attribute is generated based on the first test step configuration data corresponding to each first test step configuration entry, the second test step configuration data corresponding to each second test step configuration entry, and the step sequence between the test step configuration entries.

[0054] Specifically, since the display attributes of this application actually correspond to a display function of an on-board instrument, building a use case test script for the display attributes is actually a display test of the display attributes based on actual needs, mainly testing whether it can be displayed normally or whether the display status meets the requirements under the test situation indicated by the use case test script. In this application, in response to the test template creation trigger operation executed for the target display attribute, a test template configuration interface can be displayed. In this application, multiple test step configuration entries can be created and added in the test template configuration interface in advance.

[0055] Specifically, the present application provides a test step configuration component for creating a test step configuration entry. The corresponding test step configuration components are selected according to the requirements and combined to form a corresponding test step configuration entry. Generally, the test step configuration entry in the present application is divided into a first test step configuration entry that includes a test object and a second test step configuration entry that does not include a test object. The first test step configuration entry is actually used to configure related step configuration data with the target display attribute as the execution object, and the second test step configuration entry is actually a restriction condition on the first test step configuration entry.

[0056] After completing the creation of the test step configuration entry, you can configure and generate a use case test script corresponding to the target display attribute based on the created test step configuration entry. Specifically, the first test step configuration entry includes a first test instruction configuration item and a test component configuration item.

[0057] In a specific embodiment, assuming that the target display attribute is "transmission fault alarm indication", the first test instruction configuration item is used to configure the trigger signal for the "transmission fault alarm indication", and the test component configuration item is used to configure the test object, which is the "transmission fault alarm indication" in this example. Then, the corresponding first test step configuration data is formed by the "transmission fault alarm indication" and its corresponding trigger signal.

[0058] In another specific embodiment, assuming that the target display attribute is "transmission fault alarm indication", and the corresponding first test step configuration data is formed by the "transmission fault alarm indication" and its corresponding trigger signal, then the corresponding second test step configuration entry, the corresponding second test instruction configuration item can be configured as a pause time, and the instruction parameter configuration item can be configured as 3000, thereby forming the second test step configuration data corresponding to the above-mentioned first test step configuration data.

[0059] In this way, further, by combining the first test step configuration data and the second test step configuration data, a test template corresponding to the target display attribute can be generated.

[0060] In a preferred embodiment, in response to a test script generation operation executed on a test template, the step of generating a use case test script corresponding to the test template includes:

[0061] In response to the test script generation operation performed on the test template, a run statement corresponding to each test step configuration data is generated according to the test step configuration data corresponding to each test step configuration entry, and multiple run statements are assembled according to the step sequence between the test step configuration entries to generate a use case test script corresponding to the test template.

[0062] In the present application, after each test step configuration entry is created, based on the subsequent configuration of each configuration item in the test step configuration entry, its corresponding configuration data is actually pre-mapped to the corresponding underlying running code. For example, taking the first test instruction configuration item and test component configuration item corresponding to the first test step configuration entry as an example, assuming that the target display attribute is "transmission fault alarm indication", the first test instruction configuration item is configured as a trigger signal for the "transmission fault alarm indication", and the test component configuration item is configured as "transmission fault alarm indication", then, in fact, combined with this first test step configuration item and its corresponding first test step configuration data, its corresponding test logic is parsed as "generate a signal to trigger a transmission fault alarm indication", then according to this test logic, this part of the underlying running code is extracted from the underlying logic running file corresponding to the "transmission fault alarm indication" and a corresponding running statement is formed.

[0063] Furthermore, based on the step sequence and logical relationship between different test step configuration items, the run statements are assembled to automatically form the corresponding use case test script.

[0064] In another preferred embodiment, the generated use case test script corresponding to the target vehicle-mounted device is saved in a designated folder corresponding to the target vehicle-mounted device, and is further classified into the display attributes corresponding to the designated folder according to the test object (display attributes) corresponding to the use case test script, which makes it easier to view.

[0065] In a preferred embodiment, since the present application provides a method of capturing the display interface of the target vehicle-mounted instrument through a monitoring device, the present application can also monitor the instrument changes of the target vehicle-mounted instrument in real time by displaying the display interface of the target vehicle-mounted instrument in fact, and can automatically respond as soon as a problem with the target vehicle-mounted instrument is detected. Based on the captured display interface, the display status of the display interface of the target vehicle-mounted device can be automatically judged according to the normal display status of the display interface, such as normal operation, warning or failure, which significantly reduces the time for problem diagnosis and processing.

[0066] Moreover, all use case test scripts are built based on the binding relationship between display properties and real-time display components, which greatly reduces the tedious problem of manual writing of test cases due to instrument changes, and realizes the function of automatic identification and automatic creation of use case scripts.

[0067] Based on the same application concept, the embodiment of the present application also provides a device for generating a vehicle-mounted instrument function test case script corresponding to the method for generating a vehicle-mounted instrument function test case script provided in the above embodiment. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the method for generating a vehicle-mounted instrument function test case script in the above embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0068] See also Figure 2 , Figure 2 The functional module diagram of a device for generating a vehicle instrument function test case script provided by an embodiment of the present application is shown. Figure 2 As shown, the device includes:

[0069] Providing a module 500 for providing a function test project configuration interface for a target vehicle instrument, the function test project configuration interface including a project information configuration area and an instrument display area, the project information configuration area including an instrument data display sub-area;

[0070] Monitoring module 510, configured to capture a target display interface of a target vehicle instrument through a monitoring device and map it to an instrument display area, wherein the instrument data display subarea displays multiple display attributes corresponding to the target display interface, and the target display interface includes multiple real-time display components;

[0071] Binding module 520, for binding display attributes to corresponding real-time display components;

[0072] The script generation module 530 is used to generate a corresponding use case test script for each display attribute according to the binding relationship between the display attribute and its corresponding real-time display component and the test template.

[0073] Based on the same application idea, please refer to Figure 3 , Figure 3 FIG. 1 shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the electronic device 600 includes: a processor 610, a memory 620 and a bus 630. The memory 620 stores machine-readable instructions executable by the processor 610. When the electronic device 600 is running, the processor 610 and the memory 620 communicate with each other through the bus 630. The machine-readable instructions are executed by the processor 610 when running, such as the steps of the method for generating a vehicle instrument function test case script provided in any of the above embodiments.

[0074] Based on the same application concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of the method for generating a vehicle instrument function test case script provided in the above embodiment are executed.

[0075] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0076] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0077] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0078] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0079] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for generating a vehicle instrument function test case script, characterized in that: The method comprises: Providing a function test item configuration interface for a target vehicle instrument, the function test item configuration interface including a project information configuration area and an instrument display area, the project information configuration area including an instrument data display sub-area; The target display interface of the target vehicle instrument is captured by a monitoring device and mapped to the instrument display area, wherein the instrument data display subarea displays a plurality of display attributes corresponding to the target display interface, wherein the target display interface includes a plurality of real-time display components, and the display attributes describe an instrument display function; Bind display properties to their corresponding real-time display components; For each display attribute, generate a corresponding use case test script based on the binding relationship between the display attribute and its corresponding real-time display component and the test template; The test script for each display attribute is generated in the following way: In response to a test template creation trigger operation executed for a target display attribute, a test template configuration interface corresponding to the target display attribute is displayed, the test template configuration interface including a first test step configuration entry, the first test step configuration entry including a first test instruction configuration item and a test component configuration item, generating first test instruction configuration data in response to a configuration operation performed on the first test instruction configuration item; receiving a configuration operation executed on a test component configuration item, determining a target real-time display component bound to a target display attribute as a test object, and generating test object configuration data; Generate first test step configuration data corresponding to a first test step configuration entry from the test object configuration data and the first test instruction configuration data; Forming a test template corresponding to the target display attribute from the first test step configuration data corresponding to each first test step configuration entry; In response to a test script generation operation executed on a test template, a use case test script corresponding to the test template is generated.

2. The method according to claim 1, characterized in that The project information configuration area also includes project basic information configuration items and instrument data loading controls. The method further comprises: In response to a selection operation performed on the instrument data loading control, a target instrument data packet corresponding to the target on-board instrument is loaded from a target download address indicated by the project basic information via a CAN communication tool; Parsing the target instrument data packet to obtain a plurality of interface display files corresponding to the target vehicle instrument, each interface display file corresponding to an instrument function interface provided by the target vehicle instrument, and each interface display file including a plurality of display attributes corresponding to the instrument function interface; Determining a target instrument function interface corresponding to the target display interface; Loading multiple display attributes corresponding to the target instrument function interface into the instrument data display sub-area.

3. The method according to claim 1, characterized in that The steps for binding display properties to their corresponding real-time display components include: In response to a selection operation performed on a target display attribute, enabling a graphic capture function for the target display interface; In response to an interception operation performed on a target real-time display component corresponding to a target display attribute, the target real-time display component is bound to the target display attribute.

4. The method according to claim 1, wherein The test template configuration interface further includes a second test step configuration entry, the second test step configuration entry including a second test instruction configuration item and an instruction parameter configuration item, the first test step configuration entry being used to configure relevant step configuration data with the target display attribute as the execution object, and the second test step configuration entry being used to configure restriction conditions on the first test step configuration entry; The method further comprises: generating second test step configuration data corresponding to a second test step configuration entry in response to a configuration operation performed on the second test instruction configuration item and the instruction parameter configuration item; A test template corresponding to the target display attribute is generated based on the first test step configuration data corresponding to each first test step configuration entry, the second test step configuration data corresponding to each second test step configuration entry, and the step sequence between the test step configuration entries.

5. The method according to claim 1, wherein In response to the test script generation operation executed on the test template, the step of generating a use case test script corresponding to the test template includes: In response to a test script generation operation executed on the test template, generating a run statement corresponding to each test step configuration data according to the test step configuration data corresponding to each test step configuration entry; Assemble multiple run statements according to the step sequence between the test step configuration items to generate a use case test script corresponding to the test template.

6. The method according to claim 1, characterized in that The instrument display area also includes instrument display interface adjustment options, The method further comprises: In response to the configuration operation performed on the instrument display interface adjustment option, the target display interface displayed in the instrument display area is adjusted to a specified brightness and a specified size.

7. A device for generating a vehicle instrument function test case script, characterized in that: The device comprises: Providing a module for providing a function test item configuration interface for a target vehicle instrument, wherein the function test item configuration interface includes a project information configuration area and an instrument display area, wherein the project information configuration area includes an instrument data display sub-area; A monitoring module, configured to capture a target display interface of the target vehicle instrument through a monitoring device and map it to the instrument display area, wherein the instrument data display subarea displays a plurality of display attributes corresponding to the target display interface, and the target display interface includes a plurality of real-time display components; A binding module is used to bind display attributes to their corresponding real-time display components; A script generation module is used to generate a corresponding use case test script for each display attribute based on the binding relationship between the display attribute and its corresponding real-time display component and the test template; Wherein, the script generation module is also used for: In response to a test template creation trigger operation executed for a target display attribute, a test template configuration interface corresponding to the target display attribute is displayed, the test template configuration interface including a first test step configuration entry, the first test step configuration entry including a first test instruction configuration item and a test component configuration item, generating first test instruction configuration data in response to a configuration operation performed on the first test instruction configuration item; receiving a configuration operation executed on a test component configuration item, determining a target real-time display component bound to a target display attribute as a test object, and generating test object configuration data; Generate first test step configuration data corresponding to a first test step configuration entry from the test object configuration data and the first test instruction configuration data; Forming a test template corresponding to the target display attribute from the first test step configuration data corresponding to each first test step configuration entry; In response to a test script generation operation executed on a test template, a use case test script corresponding to the test template is generated.

8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus. When the processor is running, the machine-readable instructions execute the steps of the method for generating a vehicle instrument function test case script as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a vehicle instrument function test case script according to any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Method and device for generating test case script

    CN107122295A

  • Methods and systems for implementing a test automation framework for testing software applications on UNIX / linux based machines

    US20100100872A1