Vehicle testing method and electronic equipment
By using keyword information in the vehicle testing system to generate test cases, the problems of long writing time and code redundancy in the prior art are solved, and more efficient vehicle testing is achieved.
Patent Information
- Application Number
- CN202311630141.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, vehicle testers need to spend a lot of time writing code for test cases, and there are duplicate codes that perform the same function in different test cases, resulting in code redundancy and low vehicle testing efficiency.
By determining the keyword information in the test case, the keyword generation tool is used to generate keyword information based on the test functions and business process hierarchical strategies of the vehicle testing system, thereby simplifying the writing and analysis of test cases, reducing code redundancy, and improving vehicle testing efficiency.
It realizes simple writing of test cases, reduces the amount of code, avoids code redundancy, and improves the efficiency of vehicle testing.
Smart Images

Figure CN120063744A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of vehicle testing, and particularly to a vehicle testing method and an electronic device. Background Art
[0002] With the prosperous development of the vehicle industry, such as the development of vehicle intelligent cockpit systems, the functional testing of vehicles has become increasingly important. Therefore, it is necessary to provide a testing system for the functions that have been developed for vehicles to conduct vehicle testing. Moreover, with the increase in vehicle function items, vehicle testing needs to be carried out for different platforms, different manufacturers, and different vehicle models.
[0003] In the prior art, when testers conduct tests on vehicles, since they need to test all functions of the vehicle, and may need to conduct combined testing of functions, or there may be multiple different testers testing the same vehicle, when conducting vehicle testing, each tester needs to write test cases for different vehicles and different functions in the vehicle according to the test requirements. If there are many functions to be tested, the written code will be very long, and there are duplicate codes that perform the same functions between different test cases. Further, when testing vehicles of different models, it is necessary to write corresponding test cases for the vehicle functions of different models. However, because there are the same functions among different models, it is necessary to repeatedly write test cases for testing the same functions. Moreover, when testing a vehicle with the test cases obtained in the above manner, if the testers writing the test cases are different, the writing methods of the test cases will also be different. Therefore, when running the test cases for vehicle testing, for different test cases, it is necessary to parse out the complete information related to the test from each test case for testing. Since the writing methods of the testers are different, a large amount of time needs to be spent on parsing the test cases, and there is also a problem of affecting the vehicle testing efficiency.
[0004] Therefore, in the prior art, it takes a tester a lot of time to write the code of test cases, and there are the same codes that perform the same functions among different test cases, resulting in the problem of code redundancy. In addition, during the process of vehicle testing, there is also a problem of low vehicle testing efficiency when using these test cases for vehicle testing. Summary of the Invention
[0005] This application provides a vehicle testing method and an electronic device to solve the problems in the prior art that it takes a tester a lot of time to write the code of test cases, and there are the same codes that perform the same functions among different test cases, resulting in the problem of code redundancy. In addition, during the process of vehicle testing, there is also a problem of low vehicle testing efficiency when using these test cases for vehicle testing.
[0006] In a first aspect, the present application provides a vehicle testing method, which is applied to an electronic device deployed with a vehicle testing system. The method includes: determining a test case, where the test case includes keyword information, and the test case is obtained based on an operation by a user to write the test case by referring to the keyword information according to vehicle testing requirements. The keyword information is generated by a keyword generation tool to encapsulate the test steps included in the test business process corresponding to the test function according to the test function corresponding to the vehicle testing system and the hierarchical strategy of the test business process; parsing the keyword information from the test case, and determining target library information and target control information according to the keyword information; calling the target library corresponding to the target library information and the target control corresponding to the target control information to perform vehicle testing, and obtaining a vehicle testing result.
[0007] In the vehicle testing method provided by the implementation manner of the present application, the test case is generated based on an operation by a user to write the keyword information according to vehicle testing requirements, and the keyword information is generated by encapsulating the test steps in the test business process according to the test function and the hierarchical strategy of the test business process.
[0008] In this way, on the one hand, during the process of writing the test case, only by referring to the keyword information can the generation of the test case be realized, making the writing of the test case simpler and with less code. And because the keyword information is generated by encapsulating the test steps in the test business process according to the test function and the hierarchical strategy of the test business process, the user can generate a test case including test step-related information by referring to the keyword information, without manually writing the test steps for realizing vehicle function testing during the process of writing the test case, reducing the time for testers to write test cases.
[0009] On the other hand, during the process of vehicle testing, the keyword information can be obtained by parsing the test case, and then the target library information and target control information corresponding to the test steps can be determined according to the keyword information. And only by calling the library corresponding to the target library information and the control corresponding to the target control information can the vehicle testing be conveniently and quickly completed to obtain the vehicle testing result, that is, the same library can be called for different vehicle models, and the controls corresponding to each vehicle model can be called according to the target control information to perform vehicle testing. It is not necessary to write a complete test case including library information and control information for each vehicle model to complete vehicle testing, that is, it is not necessary to include complete test-related information in each test case and it is not necessary to parse out complete test-related information from each test case for testing, reducing code redundancy and improving vehicle testing efficiency.
[0010] In one implementation of the vehicle testing method provided by the implementation manner of the present application, the target control information includes the target control name. The target control is determined based on the corresponding relationship between the target control name and the target control stored in the first control configuration file, and the target control name is obtained based on the operation of the user naming the control according to the control naming rule.
[0011] In the implementation manner of the present application, by determining the target control name, the corresponding relationship between the target control name and the target control can be obtained from the first control configuration file, so as to call the corresponding target control to perform vehicle testing. In this way, the vehicle can be tested only based on the calling relationship, making the testing more convenient.
[0012] In one implementation of the vehicle testing method provided by the implementation manner of the present application, the first control configuration file is generated in the following manner: determine the target control, the control naming rule, the control category corresponding to the target control, the control sub-category under the control category, and the control attribute of the target control; name the target control according to the control naming rule, the control category, the control sub-category, and the control attribute to obtain the target control name; determine the primary key information of the target control name and the value of the target control, and store the corresponding relationship between the primary key information of the target control name and the corresponding value of the target control in the initial control configuration file corresponding to the control category; determine the second control configuration file corresponding to the target vehicle type and the third control configuration file corresponding to the target sub-type under the target vehicle type; generate the first control configuration file according to the initial control configuration file, the second control configuration file, and the third control configuration file.
[0013] In the implementation manner of the present application, the control is named according to the control naming rule, the control category, the control sub-category, and the control attribute to obtain the control name, and the primary key information of the control name and the corresponding value of the control are stored in the initial control configuration file. In this way, the control operation of the vehicle can be tested based on the control configuration file, which is convenient for vehicle testing. And, the first control configuration file can be generated based on the second control configuration file corresponding to the target vehicle type and the third control configuration file corresponding to the target sub-type. In this way, vehicle testing can be performed for the target vehicle type and the target sub-type, and the same vehicle testing system can be used for testing different vehicle models.
[0014] In one implementation of the vehicle testing method provided by the implementation manner of the present application, generating the first control configuration file according to the initial control configuration file, the second control configuration file, and the third control configuration file includes: modifying the second control configuration file according to the third control configuration file to obtain the fourth control configuration file; modifying the initial control configuration file according to the fourth control configuration file to obtain the first control configuration file.
[0015] In the implementation manner of this application, the initial control configuration file is modified according to the third control configuration file and the second control configuration file. In this way, the control configuration file corresponding to the target vehicle type and the target subtype can be obtained, which is convenient for testing the vehicles of the target vehicle type according to this control configuration file.
[0016] In an implementation manner of the vehicle testing method provided by the implementation manner of this application, modifying the second control configuration file according to the third control configuration file includes: when the third control configuration file includes the first primary key information, replacing the value corresponding to the second primary key information in the second control configuration file with the value corresponding to the first primary key information, where the second primary key information is the same as the first primary key information; when the third control configuration file includes the third primary key information, adding the third primary key information and the value corresponding to the third primary key information to the second control configuration file, where the third primary key information is different from the second primary key information in the second control configuration file.
[0017] In the implementation manner of this application, by replacing the values corresponding to the same primary key information and adding new primary key information and corresponding values, the newly generated fourth control configuration file contains the control information for the subtypes under the new vehicle type, which is convenient for testing the controls of the vehicles of the target subtype.
[0018] In an implementation manner of the vehicle testing method provided by the implementation manner of this application, modifying the initial control configuration file according to the fourth control configuration file includes: when the fourth control configuration file includes the fourth primary key information, replacing the value corresponding to the fifth primary key information in the initial control configuration file with the value corresponding to the fourth primary key information, where the fourth primary key information is the same as the fifth primary key information; when the fourth control configuration file includes the sixth primary key information, adding the sixth primary key information and the value corresponding to the sixth primary key information to the initial control configuration file, where the sixth primary key information is different from the fifth primary key information in the initial control configuration file.
[0019] In the implementation manner of this application, by replacing the values corresponding to the same primary key information and adding new primary key information and corresponding values, the newly generated first control configuration file contains the control information for the new target vehicle type and the target subtype under the target vehicle type, which is convenient for testing the controls of the vehicles of the target vehicle type and the target subtype.
[0020] In an implementation manner of the vehicle testing method provided by the implementation manner of this application, the tool library is generated according to the compilation code corresponding to the test function.
[0021] In the implementation manner of the present application, the compilation code corresponding to the test function is encapsulated into a tool library. In this way, when writing test cases, only by referring to the corresponding keyword information, the corresponding tool library can be called according to the keyword information, and the code of the tool library can be executed, enabling testers to write test cases without a large amount of code, reducing the writing time of test cases, accelerating the vehicle test efficiency, and making the code reusable and reducing code redundancy.
[0022] In an implementation manner of the vehicle test method provided by the implementation manner of the present application, the keyword information is stored in a keyword library.
[0023] In the implementation manner of the present application, by referring to the keyword information in the keyword library in the test case, the testing of different functions of the vehicle can be realized. This enables testers to write test cases without a large amount of code, reduces the writing time of test cases, accelerates the vehicle test efficiency, and makes the code reusable and reduces code redundancy.
[0024] In an implementation manner of the vehicle test method provided by the implementation manner of the present application, the vehicle test system is a test system based on the Uiautomator test tool, and / or the keyword generation tool is the Robotframework tool.
[0025] In the implementation manner of the present application, based on the Robotframework tool, users can divide the test business process and automatically generate keyword information. Based on the Uiautomator test tool, the vehicle controls can be configured, and it is convenient to perform tests based on the configuration of the vehicle controls.
[0026] In a second aspect, the present application provides a vehicle test device, including: a first processing module, configured to determine a test case, the test case includes keyword information, and the test case is obtained based on an operation of a user writing a test case by referring to keyword information according to vehicle test requirements, and the keyword information is generated by a keyword generation tool encapsulating test steps included in a test business process corresponding to a test function according to a test function and a test business process layering strategy corresponding to a vehicle test system; a second processing module, configured to parse the keyword information from the test case, and determine target tool library information and target control information according to the keyword information; a third processing module, configured to call a target tool library corresponding to the target tool library information and a target control corresponding to the target control information to perform vehicle testing, and obtain a vehicle test result.
[0027] The vehicle test device provided by the present application includes a module for executing the vehicle test method provided in the first aspect above, and thus can also achieve the beneficial effects (or advantages) of the vehicle test method provided in the first aspect.
[0028] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the vehicle testing method provided by the implementation manner of the first aspect as described above.
[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the vehicle testing method provided by the implementation manner of the first aspect as described above.
[0030] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the vehicle testing method provided by the implementation manner of the first aspect as described above.
[0031] It can be understood that for the beneficial effects of the above third aspect to fifth aspect, reference can also be made to the relevant descriptions in the first aspect above, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with the present application, and are used together with the description to explain the principles of the present application.
[0033] Figure 1 It is a schematic flowchart of a vehicle testing method provided by an embodiment of the present application;
[0034] Figure 2 It is a schematic diagram of a keyword library provided by an embodiment of the present application;
[0035] Figure 3 It is a schematic diagram of a tool library provided by an embodiment of the present application;
[0036] Figure 4 It is a schematic flowchart of a process for generating a first control configuration file provided by an embodiment of the present application;
[0037] Figure 5 It is a schematic diagram of configuring control names provided by an embodiment of the present application;
[0038] Figure 6 It is another schematic flowchart of a process for generating a first control configuration file provided by an embodiment of the present application;
[0039] Figure 7 It is a schematic diagram of a control configuration file provided by an embodiment of the present application;
[0040] Figure 8 It is a schematic structural diagram of a vehicle testing device provided by an embodiment of the present application;
[0041] Figure 9 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application.
[0042] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Embodiments
[0043] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0044] As mentioned above, in the existing vehicle intelligent cockpit system development process, it is necessary to use automated testing means to solidify the functions that have been developed and stabilized in functional testing and provide an automated testing system. However, with the increase in vehicle function items, there are automated testing requirements for multiple platforms, multiple manufacturers, multiple variants, and multiple vehicle models. And it is possible that multiple testers test different functions of the same vehicle. However, in the prior art, when conducting vehicle testing, testers need to write test cases for different vehicles and different functions in the vehicle according to the test requirements. If there are more functions to be tested, the code written will be very long. Moreover, there are duplicate codes that perform the same functions among different test cases. Further, when testing vehicles of different models, it is necessary to write complete test cases for the vehicle functions of different models. However, because there are the same functions among different models, it is necessary to repeat writing test cases for testing the same functions. And if the testers writing the test cases are different, the writing logics of the test cases will also be different. Therefore, when running the test cases for vehicle testing, for different test cases, it takes a lot of time to parse the complete test-related information from each test case for testing, which affects the vehicle testing efficiency. In addition, since it is necessary to control the controls in the vehicle to perform corresponding operations when testing the vehicle, when writing the test cases, testers need to write the target controls of the target vehicle model to be tested into the code so that when the test case runs, the test case can be parsed to obtain the information named for the target control during vehicle design. However, if the target control information written in the test case is incorrect, the vehicle test result of executing the test case for vehicle testing will also be incorrect due to the error of the test case, which will also affect the vehicle testing efficiency.
[0045] Based on this, the implementation mode of the present application provides a vehicle testing method. Based on a pre-built multi-vehicle-type configurable testing architecture and testing based on test cases, when writing test cases, only by referring to keyword information can the test steps corresponding to the keyword information be executed, making the writing of test cases more convenient, minimizing code writing and code redundancy in test cases to the greatest extent, and improving vehicle testing efficiency.
[0046] See Figure 1 , the vehicle testing method provided by the implementation mode of the present application is applied to a vehicle testing system. The vehicle testing system is deployed on an electronic device, that is, applied to the electronic device. The vehicle testing method specifically includes the following steps.
[0047] S100, determine a test case. Among them, the test case includes keyword information. The test case is obtained based on the operation of the user writing the test case by referring to keyword information according to vehicle testing requirements. The keyword information is generated by a keyword generation tool encapsulating the test steps included in the test business process corresponding to the test function according to the test function corresponding to the vehicle testing system and the test business process layering strategy.
[0048] S200, parse the keyword information from the test case, and determine the target tool library information and target control information according to the keyword information.
[0049] S300, call the target tool library corresponding to the target tool library information and the target control corresponding to the target control information to perform vehicle testing, and obtain a vehicle testing result.
[0050] In the vehicle testing method provided by the implementation mode of the present application, the test case is generated based on the operation of the user writing the keyword information according to vehicle testing requirements, and the keyword information is generated by encapsulating the test steps in the test business process according to the test function and the test business process layering strategy. In this way, during the vehicle testing process, the keyword information can be obtained by parsing the test case, and then the target tool library information and target control information corresponding to the test steps can be determined according to the keyword information. And only by calling the tool library corresponding to the target tool library information and the control corresponding to the target control information can the vehicle testing be conveniently and quickly completed to obtain a vehicle testing result, improving vehicle testing efficiency.
[0051] Furthermore, in the implementation manner of the present application, when writing test cases, only by referring to the keyword information can the generation of test cases be realized, making the writing of test cases more convenient and with less code. Moreover, since the keyword information is generated by encapsulating the test steps in the test business process according to the test function and the hierarchical strategy of the test business process, the user can generate test cases including test step-related information by referring to the keyword information, without manually writing the test steps for realizing vehicle function testing during the process of writing test cases, thus reducing the time for testers to write test cases.
[0052] Furthermore, by parsing the test cases to obtain keyword information, determining the target tool library information and the target control information according to the keyword information, and calling the tool library corresponding to the target tool library information and the control corresponding to the target control information for vehicle testing. In this way, the same tool library can be called for different vehicle models, and the controls corresponding to each vehicle model can be called according to the target control information for vehicle testing, so that vehicle testing can be completed without writing complete test cases for each vehicle model, improving the vehicle testing efficiency.
[0053] In the implementation manner of the present application, the vehicle testing system can be, for example, a testing system based on the Uiautomator testing tool. That is, a test system architecture design for multi-vehicle model configurable testing is carried out based on Uiautomator. Of course, vehicle testing can also be carried out based on other interface testing tools.
[0054] First, the technical content of determining test cases in step S100 will be described in detail.
[0055] In the implementation manner of the present application, the test cases are obtained based on the user's operation of writing test cases by referring to keyword information according to vehicle testing requirements.
[0056] In the implementation manner of the present application, the keyword information is stored in the keyword library.
[0057] Among them, the keyword information is generated by the keyword generation tool by encapsulating the test steps included in the test business process corresponding to the test function according to the test function corresponding to the vehicle testing system and the hierarchical strategy of the test business process.
[0058] The keyword generation tool is, for example, the Robotframework tool. Of course, it can also be other keyword generation tools.
[0059] Exemplarily, using the Robotframework tool, based on the user's analysis of the test case business logic, for different test functions of the test system, the test business processes corresponding to the frequently shared test functions are analyzed, and the test steps included in these test business processes are encapsulated according to the hierarchical strategy of the test business process to generate keyword information.
[0060] For example, set the granularity to 2 to 3 test steps (as an example of the test service layering logic) to encapsulate and generate a keyword information. The keyword information corresponds to a keyword name, and the keyword name corresponding to each keyword information needs to clearly indicate the test purpose corresponding to the keyword information. When test developers and test executors perform code analysis, they can clearly and quickly locate the problem points.
[0061] In the implementation manner of this application, taking voice automation testing as an example, the wake-up operation is an operation step that is frequently used. The test steps for testing it (such as testing whether the voice assistant can be woken up) are encapsulated as a general keyword and used as the keyword information for testing the application corresponding to the voice. Another example is system settings. Taking the safe mode as an example, entering the safe mode, exiting the safe mode, etc. are all common operations. According to a similar hierarchical structure, the common operations corresponding to specific system services are designed into keyword information based on the Robotframework tool according to the layering strategy.
[0062] In the implementation manner of this application, the test steps in the test business process can also be encapsulated based on the test project (as another example of the test service layering logic).
[0063] For example, implement a test project to encapsulate and process test steps such as waking up the voice assistant - playing music - stopping music - exiting the voice assistant.
[0064] As Figure 2 shown, in the implementation manner of this application, during the design process of keywords in the keyword library, they can be divided into general keywords, voice control keywords, instrument control keywords, etc.
[0065] Taking the voice control keyword as an example, generate voice, and perform encapsulation processing on the map, vehicle control and vehicle settings, system settings, multi-mode, intelligent partner, ecology, and other test business processes based on the voice, generating map control keywords corresponding to the map, vehicle control and vehicle settings keywords corresponding to vehicle control and vehicle settings, system settings keywords corresponding to system settings, multi-mode interaction keywords corresponding to multi-mode, intelligent partner keywords corresponding to intelligent partners, ecology control keywords corresponding to ecology, and other control keywords corresponding to others. It can also include instrument control keywords corresponding to the instrument, etc.
[0066] Next, the technical content of parsing the keyword information from the test case and determining the target tool library information and target control information in step S200 will be described in detail.
[0067] Among them, the tool library is generated according to the compiled code corresponding to the test function.
[0068] Exemplarily, according to the test functions, such as testing the cockpit center console, testing the cockpit air conditioner, etc., sort out the most commonly used compiled codes, classify and analyze the test functions, and decompose the lib libraries for single business test functions (as an example of the tool library), the lib libraries for hardware module control, the lib libraries for instrument and equipment control, and the lib libraries for system analysis, etc. Package the commonly used lib libraries in a standardized manner to provide a basic tool library for automated testing, reduce the call entry, and facilitate traceability.
[0069] For example, as Figure 3 shown, before keyword encapsulation, when conducting code design (such as codes related to test steps, etc.), encapsulate the general codes to generate a lib library, and the lib library can be divided into 4 module libraries, namely, the function module lib library, the control module lib library, the instrument control lib library, and the system analysis basic lib library, etc.
[0070] Among them, the function module lib library includes the vision module lib, the audio module lib, the bus module lib, the video module lib, the voice module lib, the map module lib, the SOA (Service-Oriented Architecture) module lib, the diagnostic module lib, etc. The control module lib library includes the Adb (i.e., adb control commands) lib, the Uiautomator lib, the Serial lib, the Canoe lib, the PCan lib, etc. The instrument control lib library includes the audio instrument lib, the signal generator lib, the programmable power supply lib, the relay control lib, the artificial mouth control lib, the NI card lib, the camera control lib, the camera lib, etc. The basic lib library includes Robotframework, pytest, speech synthesis, Log analysis, memory, performance, network, Log, screenshot, mind map control, Jira control, Jenkins, etc.
[0071] In the implementation manner of this application, when encapsulating the general codes, it should be noted that the function points included in the test functions are encapsulated based on the principle of minimization, and each lib only contains all the relevant methods for one function special item.
[0072] For example, in the function module lib library, the vision module lib includes the processing of graphics and images, comparison, optical character recognition (OCR) recognition, etc., all of which are auxiliary functions related to vision functions; the audio module lib is an abstraction of functions for special functions such as the presence or absence of sound, sound quality, and audio analysis; the bus module lib includes the parsing of signal configuration files such as ARXML and dbc, and decomposes the interaction logic; among them, the control code of the bus tool can be further divided into multiple sub-lib files, such as the control of Canoe vector series hardware and the sending and receiving of bus signals, for example, the control of VBA (VehicleBus Analyser, bus simulation and analysis software) series hardware and the sending and receiving of bus signals, the control of PCan series hardware and the sending and receiving of bus signals, etc.; the control module lib library includes the code required for system control, such as adb, UIautomator, serial ports, etc.; the instrument control lib library contains various auxiliary hardware devices, such as audio analysis devices (i.e., audio instrument lib), signal generators lib, programmable power supplies lib, relay controls lib, artificial mouth controls lib, various camera controls lib, various camera lib libraries, etc.; the basic lib library contains practical tools for improving test efficiency, such as robotframework framework design code, speech synthesis, log analysis, system resource analysis, screenshot, mind map use case design (i.e., mind map control), Jira automatic ticket creation, etc.
[0073] That is to say, in the implementation mode of the present application, the general code of a single function item of the test function is encapsulated to generate a tool library. Further, the test steps of the general test business process are encapsulated to generate keyword information, where the test steps include calling the target tool library in each tool library to implement the test of the test item corresponding to the test step.
[0074] Further, by encapsulating the test steps, the vehicle control is tested through the code corresponding to the keyword information. Therefore, the test steps corresponding to the keyword information include the reference to the tool library information and the reference to the control.
[0075] Of course, in the implementation mode of the present application, the tool library corresponding compilation code can also include the reference to the control. The reference to the control is to refer to the control name of the control, and then control the corresponding control based on the control name to perform the test. Therefore, as Figure 3 shown, the tool library includes a UI control configuration file.
[0076] Of course, the tool library may also include an interface configuration file for configuring the interface and a signal configuration file for configuring information, so that when making an interface call or testing based on different communication signals, interface testing and signal testing can be directly performed based on the interface configuration file or the signal configuration file.
[0077] Further, in the implementation manner of the present application, the target control information includes the target control name. The target control is determined based on the correspondence between the target control name and the target control stored in the first control configuration file, and the target control name is obtained based on the user's operation of naming the control according to the control naming rule.
[0078] Exemplarily, the user names all the operation controls on the in-vehicle interface according to the control naming rule to obtain the control names, and thus the correspondence between the controls and the control names can be established.
[0079] In the implementation manner of the present application, the correspondence between the control name and the control is mapped to a key-value pair (that is, the correspondence between the primary key information and the corresponding value), and stored in the first control configuration file.
[0080] Further, in the implementation manner of the present application, as Figure 4 shown, the first control configuration file is generated through the following steps.
[0081] S210, determine the target control, the control naming rule, the control category corresponding to the target control, the control subcategory under the control category, and the control attribute of the target control.
[0082] Exemplarily, map the interface corresponding to the vehicle on the Uiautomator interface. As Figure 5 shown, the interface displays the interface of the display screen on the vehicle, and each function on the vehicle can be defined as a control. For example, the control related to the car model on the main interface of the vehicle, the control related to the map, and the control can specifically be dropdown, play, click, confirm, etc.
[0083] Exemplarily, formulate the Uiautomator control naming rule, and classify the controls displayed on the Uiautomator to obtain the control type (that is, the control category) and the control subcategory.
[0084] Exemplarily, determine which major business category the control belongs to and which page in this major business category. For example, the control belongs to multimedia (as an example of the control category), and further belongs to the Kuwo Music page in multimedia (as an example of the control subcategory). Further, determine the control attribute of the control, such as whether it is an icon, a button, or a text box, etc. (as an example of the control attribute), and finally summarize the detailed name of this function in the description.
[0085] S220. Name the target control according to the control naming rule, control category, control sub-category, and control attributes to obtain the target control name.
[0086] Exemplarily, the control naming rule is to name based on control category_control sub-category_control attribute_control detailed name. For example, generate "Multimedia_Kuwo Music_ICON_Recommended Playlist_First Song". That is, define a name for each control, and the naming rule (i.e., the control naming rule) is: Page_control attribute_Name.
[0087] Therefore, in the implementation manner of this application, by calling the audio module lib, the code of the audio module lib contains the control names that need to be controlled. Then, according to the control name (i.e., the corresponding value) corresponding to the control name in the control configuration file, the control of the target control in the audio module lib can be realized. In this way, by running the code, the vehicle can automatically open Kuwo Music and click to play the first song in the recommended playlist to test whether the vehicle's audio playback function is appropriate. In this way, the automated test of the vehicle can be realized.
[0088] In the implementation manner of this application, only the test of the vehicle's audio function is taken as an example. Of course, the functions of the vehicle map, appearance, headlights, etc. can also be tested.
[0089] S230. Determine the primary key information and the value of the target control name, and store the correspondence between the primary key information of the target control name and the corresponding target control value in the initial control configuration file corresponding to the control category.
[0090] Continue to refer to Figure 5, for example, configure the controls for controlling the in-vehicle air conditioner and the like. For example, perform XpathLite: / / *[@resource-id=“com.android.systemui:id / status_bar_air_conditioner_container”], coordinates %: (0.368, 0.075), className: Android.widget.LinearLayout, index: 1, resourceId: com.android.systemui:id / status_bar_air_***, package: com.android.systemui, *checkable: flase, *clickable: flase, *enable: flase, *focusable: flase, *focused: flase, *scrollable: flase, *longClickable: flase, *password: flase, *selected: flase, #rect: {"x":679, "y":0, "width":580,"height":76}, and select to automatically copy the code. The control code for the air conditioner can be generated, d(resourceId=“com.android.systemui:id / status_bar_air_conditioner_container”).
[0091] Therefore, in the code generated based on the user's configuration, under the vehicle control and vehicle equipment category, the corresponding relationship between the primary key information of the control name related to the air conditioner and the value corresponding to the control is "Status bar_BAR_Air conditioner" (i.e., the primary key information): d(resourceId=“com.android.systemui:id / status_bar_air_conditioner_container”) (i.e., the corresponding value).
[0092] Furthermore, as Figure 5As shown, in the Public category, configure the controls of the car model on the main interface to obtain "Main Interface_ICON_Car Model": d(resourceId = "com.saic.hmi.launcher:id / sp_blank"); configure the controls of the map on the main interface to obtain "Main Interface_Map_DIV_Map": d(resourceId = "com.saic.hmi.launcher:id / r1_top"); "Main Interface_Map_ICON_Map": d(resourceId = "com.saic.hmi.launcher:id / sp_blank"); "Main Interface_Map_ICON_Go to Company": d.xpath(' / / *[@resourceId = "com.saic.hmi.launcher:id / 11_go_company"] / android.widget.ImageView[1]'). In this way, the corresponding relationships between the primary keys and values of the car model, map, etc. on the main interface can be obtained.
[0093] In the implementation manner of this application, it is also possible to configure the corresponding controls such as making a video call, making a phone call, playing music, etc. for the control category of the application center, configure the control for opening the radio for the control category of multimedia, configure the control for the map search button of map navigation, and configure the corresponding controls for controlling the main interface and the negative first screen of the mobile phone.
[0094] In the implementation manner of this application, the controls are named using a preset control naming rule, which can not only enable the user to understand and find the corresponding position of the control in the shortest time, but also facilitate the review and debugging of the code during testing.
[0095] In this way, by configuring the control names of the vehicle's controls, the corresponding relationships between the primary key information of the control names and the values of the controls are generated, and the initial control configuration file is stored (that is, Figure 5 the code interface of the.yaml file shown).
[0096] S240. Determine the second control configuration file corresponding to the target vehicle type and the third control configuration file corresponding to the target subtype under the target vehicle type.
[0097] In the implementation manner of this application, after formulating the naming rules for Uiautomator controls, these control attributes are classified. For example, for a certain cockpit platform targeting mid-range models, a global configuration file corresponding to the cockpit platform is generated (as an example of the initial control configuration file). Further, according to a series of models of Party A (as an example of the target vehicle type), for the major categories with little change in the cockpit system layout, a configuration file of Party A is formulated (as an example of the second control configuration file). Then, it is refined to each model (as an example of the target subtype under the target vehicle type), its unique control attributes, or the control attributes with changes, and a configuration file of Party A's model is formulated (as an example of the third control configuration file). In this way, for the control configuration files described for the controls, classification and analysis are carried out. First, the control configuration files of a certain platform major category are decomposed, secondly, the control configuration files of a series of models of Party A are decomposed, and finally, the control configuration files of specific model projects are decomposed. In this way, when vehicle testing needs to be carried out for a specific model, only by replacing the control configuration files of the platform major category with the control configuration files of the specific model project, the testing of the vehicle's controls can be achieved.
[0098] Next, continue to refer to Figure 4 , and execute step S250.
[0099] S250, generate a first control configuration file according to the initial control configuration file, the second control configuration file, and the third control configuration file.
[0100] Exemplarily, during the use of the control configuration file, first reference the global configuration file, then reference the configuration file of Party A, and finally reference the configuration file of Party A's model to obtain the final first control configuration file. As Figure 6 shown, in the implementation manner of this application, generating the first control configuration file according to the initial control configuration file, the second control configuration file, and the third control configuration file specifically includes the following steps.
[0101] S251, modify the second control configuration file according to the third control configuration file to obtain a fourth control configuration file.
[0102] Exemplarily, when the third control configuration file includes first primary key information, replace the value corresponding to the second primary key information in the second control configuration file with the value corresponding to the first primary key information, where the second primary key information is the same as the first primary key information.
[0103] Further, when the third control configuration file includes third primary key information, add the third primary key information and the value corresponding to the third primary key information to the second control configuration file, where the third primary key information is different from the second primary key information in the second control configuration file.
[0104] In the implementation mode of this application, if key1 (as an example of the first primary key information) in the vehicle model configuration file of Party A is the same as key2 (as an example of the second primary key information) in the configuration file of Party A, then the value value2 (as an example of the value corresponding to the second primary key information) of key2 in the configuration file of Party A is replaced with the value value1 (as an example of the value corresponding to the first primary key information) of key1 in the vehicle model configuration file of Party A.
[0105] If key3 (as an example of the third primary key information) in the vehicle model configuration file of Party A is different from key2 (as another example of the second primary key information) in the configuration file of Party A, then key3 and the corresponding value value3 (as an example of the value corresponding to the third primary key information) in the vehicle model configuration file of Party A are added to the configuration file of Party A.
[0106] That is, if the keys in the two configuration files are the same, then the value corresponding to the key in the configuration file of Party A is replaced with the value corresponding to the same key in the vehicle model configuration file of Party A according to the value corresponding to the key in the vehicle model configuration file of Party A. The configuration file of Party A modified in this way is used as the fourth control configuration file.
[0107] S252. Modify the initial control configuration file according to the fourth control configuration file to obtain the first control configuration file. Exemplarily, when the fourth control configuration file includes the fourth primary key information, the value corresponding to the fifth primary key information in the initial control configuration file is replaced with the value corresponding to the fourth primary key information, where the fourth primary key information is the same as the fifth primary key information.
[0108] Further, when the fourth control configuration file includes the sixth primary key information, the sixth primary key information and the value corresponding to the sixth primary key information are added to the initial control configuration file, where the sixth primary key information is different from the fifth primary key information in the initial control configuration file.
[0109] In the implementation mode of this application, if key4 (as an example of the fourth primary key information) in the configuration file of Party A is the same as key5 (as an example of the fifth primary key information) in the global configuration file, then the value value5 (as an example of the value corresponding to the fifth primary key information) of key5 in the global configuration file is replaced with the value value4 (as an example of the value corresponding to the fourth primary key information) of key4 in the configuration file of Party A.
[0110] If key6 (as an example of the sixth primary key information) in the configuration file of Party A is different from key5 (as another example of the fifth primary key information) in the global configuration file, then key6 and the corresponding value value6 (as an example of the value corresponding to the sixth primary key information) in the configuration file of Party A are added to the global configuration file.
[0111] That is, if the keys in two configuration files are the same, the value corresponding to the key in Party A's configuration file is used to replace the value corresponding to the same key in the global configuration file. The modified global configuration file is used as the first control configuration file.
[0112] As Figure 7 shown, the Party A's vehicle configuration file (vehicle.yaml) containing control configurations is used to overwrite Party A's configuration file (customer.yaml), and then Party A's configuration file is used to overwrite the global configuration file (common.yaml). When performing control on controls, when testing models such as EP33 based on the Uiautomator engine (i.e., the Uiautomator engine), the Zhiji configuration file (zhiji.yaml) is overwritten according to vehicle configuration files such as EP33 (EP33.yaml, EP37.yaml, ···.yaml), and the Zhiji configuration file then overwrites the global configuration file. For example, when testing the ES33 model, the R logo configuration file (Rbiao.yaml) is overwritten according to vehicle configuration files such as ES33 (ES33.yaml, ···.yaml, ···.yaml), and the R logo configuration file then overwrites the global configuration file. Of course, it can also be that other vehicle configuration files (····.yaml) are used to overwrite the vehicle series configuration file (····.yaml), and then the global configuration file is overwritten according to the vehicle series configuration file.
[0113] In the implementation method of this application, the control names in different vehicles are named based on the control naming rules, and the corresponding relationship between the control names and the controls is formed. In this way, for controls with the same function in different vehicle models, the control names are the same, but the target controls to be controlled are different. In this way, when testing different vehicle models, only the corresponding control (i.e., value) needs to be replaced according to the control name (i.e., key), and the corresponding control can be controlled for vehicle testing based on the target control name referenced in the test steps or test cases. This enables the entire vehicle test system to implement the testing of different vehicles based on the keyword library, tool library, and control configuration files, improving the vehicle test efficiency.
[0114] In another implementation method of this application, it can also be to first modify the key-value of the global configuration file according to the key-value in Party A's configuration file, and then modify the key-value in Party A's configuration file (i.e., the obtained Party A's configuration file is the fourth control configuration file) and the key-value in the global configuration file (i.e., the obtained global configuration file is the first control configuration file) according to the key-value in Party A's vehicle configuration file.
[0115] Exemplarily, if there are configurations with the same key in the Party A configuration file as in the global configuration file, the Party A configuration file will overwrite the settings in the global configuration file (i.e., modify the value corresponding to the same key in the global configuration file). If there are new keys, the definition of the control will be added to the global configuration file (i.e., add the new key and the corresponding value to the global configuration file).
[0116] Further, referring to the Party A vehicle model configuration file, if there are configurations with the same key in the Party A configuration file and the global configuration file due to the Party A vehicle model configuration file, then the value corresponding to the same key in the Party A vehicle model configuration file will overwrite the values corresponding to the same key in the Party A configuration file and the global configuration file. If there are new keys in the Party A vehicle model configuration file, the definition of the control will be added, and the new key and the corresponding value will be added to the Party A configuration file to obtain the fourth control configuration file, and added to the global configuration file to obtain the first control configuration file.
[0117] In this way, by analyzing which category the project belongs to, namely a new project, a major modification project, a medium modification project, or a minor modification project, and then according to the project type, for minor modification projects and medium modification projects, the corresponding configuration files can be overwritten. For major modification projects, the Party A configuration file can be overwritten based on the global configuration file and the Party A vehicle model configuration file, and then the Party A configuration file can be used as the new global configuration file. For new projects, the global configuration file can be directly replaced, or the new configuration file can be directly imported into the system and directly used. In this way, for the control configuration files, different types of differential processing are performed to minimize the different control attributes of the same control as much as possible, avoid unclear structure, resulting in excessive duplicate definitions and code chaos, and keep the control configuration simple, regular, and easy to use.
[0118] Next, the technical content of performing vehicle testing on the tool library corresponding to the target tool library information and the control corresponding to the target control information in step S300 to obtain the vehicle test result will be described in detail.
[0119] In the implementation manner of this application, the test case includes keyword information, and the test steps corresponding to the keyword information include references to the target tool library and the target control. By executing the test case, the corresponding tool library and the target control can be called to perform the corresponding vehicle test to obtain the test result.
[0120] It should be noted that the call to the target control in a test case may be more than one or more than once, which is specifically determined according to the test requirements.
[0121] In the implementation manner of this application, by pre-generating a keyword library, a tool library, and a control configuration file, when testing a vehicle, a complete set of vehicle tests can be provided for in-vehicle systems, which can adapt to multiple platforms, multiple manufacturers, and multiple vehicle models, and maintain the maintainability of the code. By using more classification methods and layering methods, the basic code is separated, the test logic is separated, and the configuration is separated. In this way, when writing test cases, only relevant keyword information needs to be referenced to test the target function of the target vehicle.
[0122] It should be noted that in the implementation manner of this application, after covering the initial control configuration file with a new control configuration file, new test steps can be written based on the newly added control names to encapsulate and generate new keyword information, enabling the testing of controls different from those of other vehicle models in different vehicle models.
[0123] In addition, by naming the controls of different vehicle models based on the control naming rules, the control names of the same control for different vehicle models can be the same, but the actually controlled controls are different (i.e., the corresponding values are different). In this way, only by covering the control configuration file, the value of the corresponding control in the new vehicle model can be determined based on the control name in the control configuration file, and then the control in the new vehicle model can be called to enable the testing of vehicles of different vehicle models.
[0124] Furthermore, after completely separating the common attributes applicable to each vehicle model (such as common code, common tests, etc.), when it is necessary to adapt to a new vehicle model, according to the specific changes, the reusable parts can be placed on the new test project, and corresponding adaptation work can be carried out for the change points, greatly reducing the resource management problems caused by redundant code and redundant configuration. And the code is more clearly organized, the hierarchical structure is clear, reducing the code inconsistency between projects. Even for a newly recruited test engineer, after understanding the test content of one project, it can be quickly applied in all projects, improving the learning efficiency of test developers.
[0125] Moreover, based on the unified control naming rules and naming specifications, the communication cost between project members is reduced, which is conducive to increasing the inertia and stickiness of user use. By focusing on the smallest change granularity, the development volume will significantly decrease, and it has strong promotion prospects in the field of automated testing.
[0126] The vehicle testing method provided by the implementation mode of this application develops the test business process of test cases based on the Robotframework framework. Due to the continuous changes in functions such as Android applications in the system, by uniformly configuring the control attributes required by UIautomator and using the key-value pair method, multi-dimensional configurable processing is performed on the operation control objects to greatly reduce the generation of redundant code. Moreover, since vehicle testing needs to be carried out on different vehicle models, configurable reuse processing is performed on the function difference points to minimize code redundancy to the greatest extent, and the execution process of automated test cases is separated from the control attributes, so as to meet the situation of rapid changes in multiple vehicle models and enable automated testing to be quickly adapted to these application scenarios, improving the testing efficiency.
[0127] Further, refer to Figure 8 , Figure 8 which is a schematic structural diagram of the vehicle testing device provided by the embodiment of this application. As Figure 8 shown, the vehicle testing device includes: a first processing module 601, a second processing module 602, and a third processing module 603.
[0128] The first processing module 601 is used to determine test cases. The test cases include keyword information, and the test cases are obtained based on the operation of the user writing test cases by referring to keyword information according to vehicle testing requirements. The keyword information is generated by a keyword generation tool by encapsulating the test steps included in the test business process corresponding to the test function according to the test function and test business process stratification strategy corresponding to the vehicle testing system.
[0129] The second processing module 602 is used to parse the keyword information from the test cases and determine the target tool library information and target control information according to the keyword information.
[0130] The third processing module 603 is used to call the target tool library corresponding to the target tool library information and the target control corresponding to the target control information to perform vehicle testing and obtain the vehicle testing result.
[0131] The vehicle testing device provided by the embodiment of this application can be used to execute the vehicle testing method described in the above embodiment, and its implementation principle and technical effect are similar, so they will not be elaborated here.
[0132] It should be noted that the division of each module of the above device is only a division of logical functions. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by a processing element; they can also all be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the processing module can be a separately established processing element, or can be integrated in a certain chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and the function of the above processing module is called and executed by a certain processing element of the above device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together or can be independently implemented. Here, the processing element can be an integrated circuit with the ability to process data. In the implementation process, each step of the above method or each of the above modules can be completed by the integrated logic circuit in the processor element or the instruction in the form of software.
[0133] In the implementation manner of the present application, the vehicle test method is applied to a vehicle test system, and the vehicle test system is deployed on an electronic device such as a host computer.
[0134] Figure 9 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application. As Figure 9 shown, the electronic device may include: a transceiver 121, a processor 122, and a memory 123.
[0135] The processor 122 executes the computer execution instructions stored in the memory, so that the processor 122 executes the solutions in the above embodiments. The processor 122 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital data processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0136] The memory 123 is connected to the processor 122 through the system bus and completes the communication therebetween. The memory 123 is used to store computer program instructions.
[0137] By way of example and not limitation, the memory 123 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 123 may include removable or non-removable (or fixed) media. Where appropriate, the memory 123 may be internal or external to the integrated gateway device. In a particular embodiment, the memory 123 is a non-volatile solid-state memory. In a particular embodiment, the memory 123 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0138] The transceiver 121 can be used to obtain the task to be run and the configuration information of the task to be run.
[0139] The system bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to implement communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may contain a random access memory (RAM), and may also include a non-volatile memory.
[0140] An embodiment of the present application also provides a chip for running instructions, and the chip is used to execute the technical solution of the vehicle testing method in the above embodiment.
[0141] An embodiment of the present application also provides a computer-readable storage medium, and computer instructions are stored in the computer-readable storage medium. When the computer instructions run on the processor of the electronic device, the processor of the electronic device is caused to execute the technical solution of the vehicle testing method in the above embodiment.
[0142] In some possible embodiments, aspects of the methods provided in this application can also be implemented in the form of a program product, which includes program code. When the program product runs on the processor of an electronic device, the program code is used to cause the processor of the electronic device to execute the steps in the methods according to various exemplary embodiments of this application described above in this specification. For example, the electronic device can execute the vehicle testing method described in the embodiments of this application.
[0143] The program product can adopt any combination of one or more readable media. The readable media can be readable data media or readable storage media. The readable storage media can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0144] The implementation of this application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when at least one processor executes the computer program, the technical solutions of the vehicle testing method in the above embodiments can be implemented.
[0145] This application is described with reference to the flowcharts and / or block diagrams of the methods, devices, and computer program products according to this application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable information processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable information processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0146] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable information processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1The functions specified in one or more boxes.
[0147] These computer program instructions can also be loaded onto a computer or other programmable information processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 one process or more processes and / or boxes Figure 1 step of the functions specified in one or more boxes.
[0148] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common general knowledge or conventional technical means in the technical field not disclosed in the present application.
[0149] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A vehicle testing method, characterized in that, applied to an electronic device deployed with a vehicle testing system, the method includes: determining a test case, the test case including keyword information, the test case being obtained based on an operation by a user of writing the test case by referring to the keyword information according to vehicle testing requirements, the keyword information being generated by a keyword generation tool by encapsulating test steps included in a test business process corresponding to the test function according to a test function and a test business process layering strategy corresponding to the vehicle testing system; parsing the keyword information from the test case, and determining target tool library information and target control information according to the keyword information; invoking a target tool library corresponding to the target tool library information and a target control corresponding to the target control information to perform vehicle testing, and obtaining a vehicle testing result.
2. The vehicle testing method according to claim 1, characterized in that, the target control information includes a target control name, the target control being determined based on a correspondence relationship between the target control name and the target control stored in a first control configuration file, the target control name being obtained based on an operation by a user of naming the control according to a control naming rule.
3. The vehicle testing method according to claim 2, characterized in that, the first control configuration file is generated in the following manner: determining the target control, the control naming rule, a control category corresponding to the target control, a control subcategory under the control category, and a control attribute of the target control; naming the target control according to the control naming rule, the control category, the control subcategory, and the control attribute to obtain the target control name; determining primary key information of the target control name and a value of the target control, and storing a correspondence relationship between the primary key information of the control name and the corresponding value of the target control in an initial control configuration file corresponding to the control category; determining a second control configuration file corresponding to a target vehicle type and a third control configuration file corresponding to a target subtype under the target vehicle type; generating the first control configuration file according to the initial control configuration file, the second control configuration file, and the third control configuration file.
4. The vehicle testing method according to claim 3, characterized in that, generating the first control configuration file according to the initial control configuration file, the second control configuration file, and the third control configuration file includes: modifying the second control configuration file according to the third control configuration file to obtain a fourth control configuration file; modifying the initial control configuration file according to the fourth control configuration file to obtain the first control configuration file.
5. The vehicle testing method according to claim 4, characterized in that, modifying the second control configuration file according to the third control configuration file includes: When the third control profile includes the first primary key information, replace the value corresponding to the second primary key information in the second control profile with the value corresponding to the first primary key information, where the second primary key information is the same as the first primary key information; When the third control profile includes the third primary key information, add the third primary key information and the value corresponding to the third primary key information to the second control profile, where the third primary key information is different from the second primary key information in the second control profile.
6. The vehicle testing method according to claim 4 or 5, characterized in that, modifying the initial control profile according to the fourth control profile, including: When the fourth control profile includes the fourth primary key information, replace the value corresponding to the fifth primary key information in the initial control profile with the value corresponding to the fourth primary key information, where the fourth primary key information is the same as the fifth primary key information; When the fourth control profile includes the sixth primary key information, add the sixth primary key information and the value corresponding to the sixth primary key information to the initial control profile, where the sixth primary key information is different from the fifth primary key information in the initial control profile.
7. The vehicle testing method according to any one of claims 1-6, characterized in that, The tool library is generated according to the compiled code corresponding to the test function.
8. The vehicle testing method according to any one of claims 1-7, characterized in that, The keyword information is stored in a keyword library.
9. The vehicle testing method according to any one of claims 1-8, characterized in that, The vehicle testing system is a testing system based on the Uiautomator testing tool, and / or the keyword generation tool is the Robotframework tool.
10. An electronic device, characterized in that, comprising: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory so that the electronic device implements the vehicle testing method according to any one of claims 1-9.
Citation Information
Cited By
Vehicle diagnosis test method and system and electronic equipment
CN117289682A