Automated testing method, system, apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202311326243.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-10-12
AI Technical Summary
现有的自动化测试系统仅支持程序用例或脚本用例,无法做到同时支持多种类型的测试用例,造成测试系统的便利性较低,测试效率有待提高
[0018]本申请实施例提供的自动化测试方法、自动化测试系统、自动化测试装置、电子设备及存储介质,通过预先配置测试任务配置文件,从测试任务配置文件中提取至少一种测试任务配置信息,然后从测试用例库中,获取每种测试任务配置信息分别对应的测试用例,基于每种测试用例分别对应的测试任务配置信息,对所各测试用例的执行过程分别进行配置,得到执行配置信息,最后基于执行配置信息,运行至少一种测试用例,生成测试结果,从而实现了在同一自动化测试系统中同时对多种类型的测试用例进行配置,并同时运行多种类型的测试用例,大大提高了自动化测试的使用便利性,扩展了自动化测试的应用范围,提高了自动化测试的效率。
Smart Images

Figure CN119847911B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an automated testing method, an automated testing system, an automated testing device, an electronic device, and a storage medium. Background Technology
[0002] With the development of electronic technology, automated testing of various devices is needed in many fields. For example, in the field of intelligent vehicles, the controllers of intelligent vehicles undertake more and more functions, therefore, automated testing of intelligent vehicle controllers is required in many aspects.
[0003] Current automated testing systems typically require pre-written test cases. These test cases can be written as programmatic test cases (e.g., test cases written in programming languages such as C and C++) or as script-based test cases (e.g., test cases written in scripting languages such as Python and JavaScript). Existing automated testing systems only support programmatic or script-based test cases, and cannot support multiple types of test cases simultaneously, resulting in low system convenience and a need to improve testing efficiency. Summary of the Invention
[0004] In view of this, in order to solve some or all of the above-mentioned technical problems, embodiments of this application provide an automated testing method, an automated testing system, an automated testing device, an electronic device, and a storage medium.
[0005] In a first aspect, embodiments of this application provide an automated testing method, the method comprising: obtaining a test task configuration file configured for automated testing of a target device; extracting at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case; based on the at least one test task configuration information, obtaining test cases corresponding to the at least one test task configuration information from a test case library; configuring the execution process of the at least one test case based on the test task configuration information corresponding to the at least one test case, thereby obtaining at least one execution configuration information; and running the at least one test case based on the at least one execution configuration information to generate test results.
[0006] In one possible implementation, extracting at least one test task configuration information from a test task configuration file includes: extracting program test task configuration information and / or script test task configuration information from the test task configuration file; and, based on the at least one test task configuration information, obtaining test cases corresponding to each of the at least one test task configuration information from a test case library, including: in response to extracting program test task configuration information from the test task configuration file, obtaining test case code from the test case library based on the program test task configuration information; and in response to extracting script test task configuration information from the test task configuration file, obtaining test case scripts from the test case library based on the script test task configuration information.
[0007] In one possible implementation, the execution process of at least one test case is configured based on the test task configuration information corresponding to each of the at least one test case, to obtain at least one execution configuration information, including: in response to obtaining test case code from the test case library, compiling the test case code to generate a test case program; generating first execution configuration information for scheduling the test tasks included in the test case program based on the program test task configuration information; and running at least one test case based on the at least one execution configuration information to generate test results, including: running the test tasks included in the test case program according to the first execution configuration information to generate a first test result.
[0008] In one possible implementation, based on the test task configuration information corresponding to at least one test case, the execution process of at least one test case is configured to obtain at least one execution configuration information, including: in response to obtaining a test case script from a test case library, arranging the execution order of the test tasks included in the test case script based on the script test task configuration information to obtain second execution configuration information for characterizing the execution order of the test tasks included in the test case script; and running at least one test case based on at least one execution configuration information to generate test results, including: running the test tasks included in the test case script according to the second execution configuration information to generate a second test result.
[0009] In one possible implementation, running the test tasks included in the test case script according to the second execution configuration information and generating a second test result includes: determining the execution order of the test tasks included in the test case script based on the second execution configuration information; running the test tasks included in the test case script sequentially according to the execution order to obtain test sub-results after each run, wherein the number of test tasks run each time is at least one; and generating a second test result based on the obtained test sub-results.
[0010] In one possible implementation, the execution process of at least one test case is configured based on the test task configuration information corresponding to each of the at least one test case to obtain at least one execution configuration information, including: for each test case in the at least one test case, determining the priority of the test tasks included in the test case based on the test task configuration information corresponding to that test case, and generating priority configuration information; grouping the test tasks included in the test case based on the test task configuration information corresponding to that test case to obtain at least one test task group, and obtaining group configuration information, wherein the at least one test task group is executed in parallel; determining the execution order of the test tasks included in each test task group in the at least one test task group based on the test task configuration information corresponding to that test case, and obtaining execution order configuration information; and generating execution configuration information based on at least one of the priority configuration information, group configuration information, and execution order configuration information.
[0011] Secondly, embodiments of this application provide an automated testing system, comprising: a test case library, a test management node, a test proxy node, and at least one test execution node; the test management node is used to obtain a test task configuration file configured for automated testing of a target device, and send the test task configuration file to the test proxy node; the test proxy node is used to extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case; based on the at least one test task configuration information, the test cases corresponding to the at least one test task configuration information are obtained from the test case library; based on the test task configuration information corresponding to the at least one test case, the execution process of the at least one test case is configured respectively to obtain at least one execution configuration information; the at least one execution configuration information and the at least one test case are sent to the at least one test execution node; the at least one test execution node is used to run the at least one test case based on the at least one execution configuration information and generate test results.
[0012] In one possible implementation, the system further includes a test compilation node; a test proxy node is used to extract program test task configuration information from a test task configuration file; based on the program test task configuration information, it sends compilation instructions to the test compilation node; the test compilation node is used to obtain test case code from a test case library according to the compilation instructions, and compile the test case code to generate a test case program; the test case program is sent to the test proxy node; the test proxy node is used to generate first execution configuration information for scheduling the test tasks included in the test case program based on the program test task configuration information; the test case program and the first execution configuration information are sent to a first target execution node in at least one test execution node; the first target execution node is used to run the test tasks included in the test case program according to the first execution configuration information and generate a first test result.
[0013] In one possible implementation, the test proxy node is further configured to extract script test task configuration information from the test task configuration file; obtain test case scripts from the test case library based on the script test task configuration information; arrange the execution order of the test tasks included in the test case scripts based on the script test task configuration information to obtain second execution configuration information characterizing the execution order of the test tasks included in the test case scripts; send the test case scripts and the second execution configuration information to a second target execution node in at least one test execution node; the second target execution node is configured to run the test tasks included in the test case scripts according to the second execution configuration information and generate a second test result.
[0014] Thirdly, embodiments of this application provide an automated testing apparatus, comprising: a first acquisition module, configured to acquire a test task configuration file for automated testing of a target device; an extraction module, configured to extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case; a second acquisition module, configured to acquire test cases corresponding to the at least one test task configuration information from a test case library based on the at least one test task configuration information; a configuration module, configured to configure the execution process of the at least one test case based on the test task configuration information corresponding to the at least one test case, thereby obtaining at least one execution configuration information; and a running module, configured to run the at least one test case based on the at least one execution configuration information and generate test results.
[0015] Fourthly, embodiments of this application provide an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, wherein when the computer program is executed, it implements the method of any embodiment of the automated testing method of the first aspect of this application.
[0016] Fifthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the method of any embodiment of the automated testing method of the first aspect described above.
[0017] In a sixth aspect, embodiments of this application provide a computer program that includes computer-readable code. When the computer-readable code is run on a device, it causes a processor in the device to implement the method of any embodiment of the automated testing method of the first aspect described above.
[0018] The automated testing method, automated testing system, automated testing device, electronic device, and storage medium provided in this application embodiment pre-configure test task configuration files, extract at least one test task configuration information from the test task configuration files, then obtain test cases corresponding to each type of test task configuration information from the test case library, configure the execution process of each test case based on the test task configuration information corresponding to each test case to obtain execution configuration information, and finally run at least one test case based on the execution configuration information to generate test results. This achieves the simultaneous configuration and execution of multiple types of test cases within the same automated testing system, greatly improving the ease of use of automated testing, expanding the application scope of automated testing, and increasing the efficiency of automated testing. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0022] Figure 1 A flowchart illustrating an automated testing method provided in an embodiment of this application;
[0023] Figure 2 A flowchart illustrating another automated testing method provided in an embodiment of this application;
[0024] Figure 3 A flowchart illustrating another automated testing method provided in an embodiment of this application;
[0025] Figure 4 A flowchart illustrating yet another automated testing method provided in an embodiment of this application;
[0026] Figure 5 A timing diagram of an automated testing system provided in an embodiment of this application;
[0027] Figure 6 A timing diagram of another automated testing system provided in an embodiment of this application;
[0028] Figure 7 A timing diagram of yet another automated testing system provided in this application embodiment;
[0029] Figure 8 This is a schematic diagram of the structure of an automated testing device provided in an embodiment of this application;
[0030] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] Various exemplary embodiments of this application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this application.
[0032] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of this application are only used to distinguish different steps, devices or modules, and do not represent any specific technical meaning, nor do they indicate the logical order between them.
[0033] It should also be understood that in this embodiment, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.
[0034] It should also be understood that any component, data or structure mentioned in the embodiments of this application can generally be understood as one or more unless explicitly defined or given contrary guidance in the context.
[0035] Furthermore, the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects have an "or" relationship.
[0036] It should also be understood that the description of the various embodiments in this application emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0037] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the scope of this application and its application or use.
[0038] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0039] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. To facilitate understanding of the embodiments of this application, the application will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0041] To address the technical issues of low convenience and efficiency in the application of automated testing in existing technologies, this application provides an automated testing method that can simultaneously support the configuration and execution of multiple types of test cases, thereby improving the convenience and efficiency of automated testing.
[0042] Figure 1This is a flowchart illustrating an automated testing method provided in an embodiment of this application. This method can be applied to one or more electronic devices such as vehicles (e.g., autonomous vehicles), smartphones, laptops, desktop computers, portable computers, and servers. Furthermore, the execution entity of this method can be hardware or software. When the execution entity is hardware, it can be one or more of the aforementioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the execution entity is software, this method can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are imposed here.
[0043] like Figure 1 As shown, the method specifically includes:
[0044] Step 101: Obtain the test task configuration file configured for automated testing of the target device.
[0045] In this embodiment, the target device can be the device used for testing, such as a car controller. The test task configuration file can be a file generated by the tester in advance by configuring the test task. The test task configuration file mainly includes information such as the version of the program being tested, test items, test type, test deployment platform, and test priority.
[0046] The test type indicates whether each test case is executed in parallel or sequentially, and the test deployment platform refers to the type of device required to execute the test process, such as a controller or a host computer connected to the controller. The test priority indicates the execution order of the test cases.
[0047] Step 102: Extract at least one test task configuration information from the test task configuration file.
[0048] In this embodiment, at least one test task configuration information is generated by configuring at least one test case. Typically, test cases can be categorized into code-based test cases and script-based test cases. Code-based test cases can be code written in compiled languages such as C and C++, while script-based test cases can be scripts written in interpreted languages such as Python and JavaScript. Correspondingly, the electronic device can parse the test task configuration file, and the resulting at least one test task configuration information can include program test task configuration information corresponding to code-based test cases and / or script test task configuration information corresponding to script-based test cases.
[0049] Step 103: Based on at least one test task configuration information, obtain the test cases corresponding to at least one test task configuration information from the test case library.
[0050] In this embodiment, the test case library is used to store various types of test cases. The electronic device can determine the identifier of each test case from at least one test task configuration information, and retrieve various test cases from the test case library based on the identifier.
[0051] Step 104: Based on the test task configuration information corresponding to at least one test case, configure the execution process of at least one test case to obtain at least one execution configuration information.
[0052] In this embodiment, since the test task configuration information corresponding to at least one test case is configured by the tester and cannot be directly used to execute the corresponding test cases, the execution process needs to be configured according to the test task configuration information and the corresponding configuration method before executing different types of test cases.
[0053] As an example, the configuration mainly includes: test cases to be executed individually, test cases to be executed in parallel, test case grouping, and test case priority order. When test cases are executed, the test process can be executed according to the corresponding execution configuration information.
[0054] Step 105: Based on at least one execution configuration information, run at least one test case and generate test results.
[0055] In this embodiment, the electronic device can execute various test cases according to the serial / parallel execution mode, execution priority order, and other rules indicated by the execution configuration information, and generate test results corresponding to each test case. The test results can be output in various ways, such as displaying them on a monitor or sending them to other devices.
[0056] The data access permission control method provided in this application pre-configures a test task configuration file, extracts at least one test task configuration information from the test task configuration file, then obtains test cases corresponding to each type of test task configuration information from the test case library, configures the execution process of each test case based on the test task configuration information corresponding to each test case, obtains execution configuration information, and finally runs at least one test case based on the execution configuration information to generate test results. This enables the simultaneous configuration and execution of multiple types of test cases in the same automated testing system, greatly improving the ease of use of automated testing, expanding the application scope of automated testing, and improving the efficiency of automated testing.
[0057] In some optional implementations of this embodiment, such as Figure 2 As shown, step 102 includes:
[0058] Step 1021: Extract program test task configuration information and / or script test task configuration information from the test task configuration file.
[0059] Specifically, the electronic device can parse the test task configuration file and extract the aforementioned program test task configuration information and / or script test task configuration information based on the type of test cases configured. The program test task configuration information is the information configured by the tester for code-based test cases, while the script test task configuration information is the information configured by the tester for script-based test cases.
[0060] Optionally, the program test task configuration information and the script test task configuration information can exist in the form of files, that is, generate program test task configuration files and script test task configuration files.
[0061] Step 103 includes:
[0062] Step 1031: In response to extracting program test task configuration information from the test task configuration file, test case code is obtained from the test case library based on the program test task configuration information.
[0063] Specifically, if the test task configuration file contains program test task configuration information, the corresponding test case code can be extracted from the test case library based on the test case code identifier and other information included in the program test task configuration information.
[0064] Step 1032: In response to extracting script test task configuration information from the test task configuration file, obtain test case scripts from the test case library based on the script test task configuration information.
[0065] Specifically, if the test task configuration file contains script test task configuration information, the corresponding test case script can be extracted from the test case library based on the test case script identifier and other information included in the script test task configuration information.
[0066] This embodiment enables the simultaneous configuration of test case code and test case script in the same testing system by pre-configuring program test task configuration information and / or script test task configuration information in the test task configuration file. That is, in a single test, both test case code and test case script can be configured, thereby expanding the functionality of automated testing, simplifying the automated testing process, and improving the efficiency of automated testing.
[0067] In some optional implementations of this embodiment, such as Figure 2 As shown, step 104 includes:
[0068] Step 1041: In response to obtaining test case code from the test case library, compile the test case code and generate the test case program.
[0069] The test case code must be at least one, and correspondingly, the number of generated test case programs must also be at least one. Typically, the compiled test case programs can exist in the form of binary files.
[0070] Step 1042: Based on the program test task configuration information, generate first execution configuration information for scheduling the test tasks included in the test case program.
[0071] The program test task configuration information is usually configured by the testers and cannot be directly used to execute the corresponding test case programs. Therefore, before the test case programs are executed, the execution process needs to be configured according to the program test task configuration information and the corresponding configuration method. Typically, after the test case code is compiled, it already supports test task scheduling; therefore, only the program test task configuration information needs to be modified to convert it into a format that supports test case program execution. The content of the first execution configuration information configuration mainly includes: the string of test case tasks, the parallel execution mode, the grouping of test cases, and the priority order of test cases.
[0072] Step 105 includes:
[0073] Step 1051: Based on the first execution configuration information, run the test tasks included in the test case program and generate the first test result.
[0074] Specifically, the electronic device can execute the test tasks included in the test case program according to the serial / parallel execution mode, execution priority order, and other rules indicated by the first execution configuration information, and generate test results corresponding to each test task. The first test results can be output in various ways, such as displaying them on a monitor or sending them to other devices.
[0075] This embodiment compiles the test case code to generate test case programs and generates first execution configuration information, and runs the test case programs according to the first execution configuration information. This enables support for running test case code in the same testing system, making the automated testing process more flexible and improving the efficiency of automated testing.
[0076] In some optional implementations of this embodiment, such as Figure 2 As shown, step 104 includes:
[0077] Step 1043: In response to obtaining the test case script from the test case library, the execution order of the test tasks included in the test case script is arranged based on the script test task configuration information to obtain second execution configuration information that characterizes the execution order of the test tasks included in the test case script.
[0078] When arranging the execution order of test tasks included in the test case script, the sequence number corresponding to each test task can be generated based on the priority order, serial-parallel rules, etc. of each test task as indicated by the script test task configuration information.
[0079] Step 105 includes:
[0080] Step 1052: Based on the second execution configuration information, run the test tasks included in the test case script and generate the second test result.
[0081] Specifically, the electronic device can sequentially extract and execute test tasks from the test case script according to the sequence number included in the second execution configuration information. Each extracted test task can be at least one, and these tasks can be executed in parallel or sequentially. After each test task is completed, a corresponding second test result can be generated. The second test result can be output in various ways, such as displaying it on a monitor or sending it to other devices.
[0082] This embodiment arranges the execution order of test tasks included in the test case script to generate second execution configuration information, and executes the test tasks sequentially according to the execution order represented by the second execution configuration information. This realizes support for running test case scripts in the same test system, thereby making the automated testing process more flexible and improving the efficiency of automated testing.
[0083] In some optional implementations of this embodiment, such as Figure 3 As shown, step 1052 includes:
[0084] Step 10521: Based on the second execution configuration information, determine the execution order of the test tasks included in the test case script.
[0085] Specifically, the second execution configuration information may include the execution sequence number of each test task, and the electronic device can determine the execution order of each test task based on the execution sequence number.
[0086] Step 10522: Run the test tasks included in the test case script in sequence according to the execution order, and obtain the test sub-results after each run.
[0087] Each run involves at least one test task. Specifically, the same execution sequence number can correspond to at least one test task. Therefore, each run can involve at least one test task, and these at least one test task can be executed in parallel or sequentially.
[0088] Step 10523: Based on the obtained test sub-results, generate the second test result.
[0089] Specifically, after each run is completed, the results of each test sub-run can be summarized to obtain the second test result. Typically, after each run, the electronic device can determine whether it is the last time to execute the test task based on the execution sequence number. When the last test task is completed, the second test result can be generated by summarizing the test sub-run results.
[0090] This embodiment utilizes the second execution configuration information obtained by arranging the test tasks included in the test case script in sequence to execute the test tasks included in the test case script sequentially. This achieves full support for the test system's execution process of the test script, thereby making the automated testing process more flexible and improving the efficiency of automated testing.
[0091] In some optional implementations of this embodiment, such as Figure 4 As shown, step 104 includes:
[0092] Step 1044: For each test case in at least one test case, based on the test task configuration information corresponding to that test case, determine the priority of the test tasks included in that test case and generate priority configuration information.
[0093] The priority can be configured by the tester in the test task configuration file. For test cases of the same type (such as code test cases or script test cases), different priorities will result in different execution orders.
[0094] Step 1045: Based on the test task configuration information corresponding to this type of test case, group the test tasks included in this type of test case to obtain at least one test task group and obtain group configuration information.
[0095] At least one test task group is executed in parallel. That is, different test task groups can be executed in parallel, and test tasks within the same test task group can be executed sequentially or in parallel. For example, different test task groups can be executed by different test devices to achieve the effect of parallel execution.
[0096] Step 1046: Based on the test task configuration information corresponding to this type of test case, determine the execution order of the test tasks included in each test task group in at least one test task group, and obtain the execution order configuration information.
[0097] The execution order can be configured by the tester or automatically determined by the electronic equipment based on the priority of the test tasks. Test tasks with the same execution sequence number are executed sequentially.
[0098] It should be noted that when a test task needs to be executed separately, the grouping, priority, and other attributes of that test task can be configured separately.
[0099] Step 1047: Generate execution configuration information based on at least one of priority configuration information, group configuration information, and execution order configuration information.
[0100] Specifically, the priority configuration information, grouping configuration information, and execution order configuration information corresponding to test cases of the same type can be determined as the execution configuration information corresponding to that type, such as the first execution configuration information corresponding to the code-type test cases and the second execution configuration information corresponding to the script-type test cases mentioned above.
[0101] It should be noted that the "test case" described in steps 1044-1046 is one of the above-mentioned test cases. That is, for each test case, steps 1044-1046 are executed once to obtain the execution configuration information corresponding to each test case.
[0102] It should also be noted that the test case code and test case scripts described in the above embodiments can all be executed in this embodiment. That is, for the test case code and test case scripts, corresponding priority configuration information, grouping configuration information and execution order configuration information can be generated.
[0103] This embodiment utilizes the test task configuration information of each test case to generate corresponding priority configuration information, grouping configuration information, and execution order configuration information, thereby enabling automatic and detailed configuration of the execution process of various types of test cases. This helps to execute different types of test cases more accurately in the same test system, further expanding the application scope of automated testing and improving the efficiency of automated testing.
[0104] Figure 5 This is a timing diagram of an automated testing system provided in an embodiment of this application. Figure 5As shown, the system specifically includes: a test case library, a test management node, a test proxy node, and at least one test execution node. The components of the system can be located on the same electronic device or on different electronic devices. For example, the test management node is located on the user terminal used by the tester, the test case library is located on a remote server, and the test proxy node and at least one test execution node are located on other devices connected to the user terminal.
[0105] The test management node is used to obtain the test task configuration file configured for automated testing of the target device and send the test task configuration file to the test agent node.
[0106] The test proxy node is used to extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case; based on the at least one test task configuration information, the test cases corresponding to the at least one test task configuration information are obtained from the test case library; based on the test task configuration information corresponding to the at least one test case, the execution process of the at least one test case is configured respectively to obtain at least one execution configuration information; and the at least one execution configuration information and the at least one test case are sent to at least one test execution node.
[0107] At least one test execution node is used to run at least one test case and generate test results based on at least one execution configuration information.
[0108] like Figure 5 As shown, in step 501, the test management node obtains the test task configuration file configured for automated testing of the target device and sends the test task configuration file to the test agent node.
[0109] The target device can be the device used for testing, such as a car controller. The test task configuration file is a file generated by testers in advance by configuring the test task. The test task configuration file mainly includes information such as the version of the program being tested, test items, test types, test deployment platform, and test priority.
[0110] The test type indicates whether each test case is executed in parallel or sequentially. The test deployment platform refers to the type of device required to execute the test process, such as a controller or a host computer connected to the controller. The test priority indicates the execution order of the test cases.
[0111] In step 502, the test agent node extracts at least one test task configuration information from the test task configuration file.
[0112] In this configuration, at least one test task configuration information is generated by configuring at least one test case. Test cases are typically categorized into code-based test cases and script-based test cases. Code-based test cases can be code written in compiled languages such as C and C++, while script-based test cases can be scripts written in interpreted languages such as Python and JavaScript. Accordingly, the electronic device can parse the test task configuration file, and the resulting at least one test task configuration information can include the program test task configuration information corresponding to the code-based test cases and / or the script test task configuration information corresponding to the script-based test cases.
[0113] In step 503, the test agent node obtains test cases corresponding to at least one test task configuration information from the test case library based on at least one test task configuration information.
[0114] The test case library stores various types of test cases. Test agent nodes can determine the identifier of each test case from at least one test task configuration information and retrieve various test cases from the test case library based on the identifier.
[0115] In step 504, the test agent node configures the execution process of at least one test case based on the test task configuration information corresponding to at least one test case, thereby obtaining at least one execution configuration information.
[0116] Specifically, since the test task configuration information corresponding to at least one test case is configured by the tester and cannot be directly used to execute the corresponding test cases, the execution process needs to be configured according to the test task configuration information and the corresponding configuration method before executing different types of test cases.
[0117] As an example, the configuration mainly includes: test cases to be executed individually, test cases to be executed in parallel, test case grouping, and test case priority order. When test cases are executed, the test process can be executed according to the corresponding execution configuration information.
[0118] In step 505, the test agent node sends at least one execution configuration information and at least one test case to at least one test execution node.
[0119] In step 506, at least one test execution node is used to run at least one test case based on at least one execution configuration information and generate test results.
[0120] Specifically, at least one test execution node can execute various test cases according to the serial / parallel execution mode, execution priority order, and other rules indicated by the execution configuration information, and generate test results corresponding to each test case. The test results can usually be sent back to the aforementioned test proxy node, which then sends the test structure back to the test management node.
[0121] The automated testing system provided in this application embodiment enables the simultaneous configuration of multiple types of test cases within the same automated testing system by setting up a test case library, a test management node, a test proxy node, and at least one test execution node. This allows for the simultaneous execution of multiple types of test cases by at least one test execution node, significantly improving the ease of use of the automated testing system, expanding its application scope, and increasing the efficiency of automated testing.
[0122] In some optional implementations of this embodiment, such as Figure 6 As shown, the system also includes a test compilation node. The test compilation node can be located in the same electronic device as other nodes, or it can be located separately in another electronic device that is connected to other nodes in communication.
[0123] In step 601, the test agent node extracts the program test task configuration information from the test task configuration file.
[0124] Specifically, the test proxy node can parse the test task configuration file and extract the program test task configuration information based on the type of test cases configured. This program test task configuration information is the information configured by the tester for the code-type test cases.
[0125] Optionally, the program test task configuration information can exist in the form of a file, i.e., generate a program test task configuration file.
[0126] In step 602, the test agent node sends compilation instructions to the test compilation node based on the program test task configuration information.
[0127] The compilation instructions may include information such as the name and version of the test case code configured based on the program test task configuration information.
[0128] In step 603, the test compilation node retrieves test case code from the test case library according to the compilation instructions.
[0129] Specifically, the test compilation node can send compilation instructions to the test case library, or extract attribute information such as the name and version of the test case code from the compilation instructions and send this attribute information to the test case library. The test case library then uses the received information to locate the corresponding test case code and sends it to the test compilation node.
[0130] In step 604, the test compilation node compiles the test case code and generates the test case program.
[0131] The test case code must be at least one, and correspondingly, the number of generated test case programs must also be at least one. Typically, the compiled test case programs can exist in the form of binary files.
[0132] In step 605, the test compilation node sends the test case program to the test agent node.
[0133] In step 606, the test agent node generates first execution configuration information for scheduling the test tasks included in the test case program based on the program test task configuration information.
[0134] The program test task configuration information is usually configured by the testers and cannot be directly used to execute the corresponding test case programs. Therefore, before the test case programs are executed, the test agent node needs to configure the execution process according to the program test task configuration information and the corresponding configuration method. Typically, after the test case code is compiled, it already supports test task scheduling; therefore, only the program test task configuration information needs to be modified to convert it into a format that supports test case program execution. The content of the first execution configuration information configuration mainly includes: the string of test case tasks, the parallel execution mode, the grouping of test cases, and the priority order of test cases.
[0135] In step 607, the test agent node sends the test case program and the first execution configuration information to the first target execution node in at least one test execution node.
[0136] In step 608, the first target execution node runs the test tasks included in the test case program according to the first execution configuration information and generates the first test result.
[0137] Specifically, the first target execution node can execute the test tasks included in the test case program according to the serial-parallel execution mode, execution priority order and other rules indicated by the first execution configuration information, and generate the test results corresponding to each test task.
[0138] This embodiment sets up a test compilation node in the automated testing system. The test compilation node compiles the test case code to generate test case programs. The test proxy node generates first execution configuration information, and the first target execution node runs the test case programs according to the first execution configuration information. This realizes support for running test case code in the same testing system, thereby making the automated testing process more flexible and improving the efficiency of automated testing.
[0139] In some optional implementations of this embodiment, such as Figure 7 As shown, this automated testing system can also perform the following steps:
[0140] In step 701, the test agent node extracts the script test task configuration information from the test task configuration file.
[0141] Specifically, the test proxy node can parse the test task configuration file and extract the script test task configuration information based on the type of test cases configured. This script test task configuration information is the information configured by the tester for script-based test cases.
[0142] In step 702, the test agent node retrieves test case scripts from the test case library based on the script test task configuration information.
[0143] Specifically, the test agent node can extract the corresponding test case script from the test case library based on information such as the test case script identifier included in the script test task configuration information.
[0144] In step 703, the test agent node arranges the execution order of the test tasks included in the test case script based on the script test task configuration information to obtain second execution configuration information that characterizes the execution order of the test tasks included in the test case script.
[0145] When arranging the execution order of test tasks included in the test case script, the sequence number corresponding to each test task can be generated based on the priority order, serial-parallel rules, etc. of each test task as indicated by the script test task configuration information.
[0146] In step 704, the test agent node sends the test case script and the second execution configuration information to the second target execution node in at least one test execution node.
[0147] In step 705, the second target execution node runs the test tasks included in the test case script according to the second execution configuration information, and generates the second test result.
[0148] Specifically, the second target execution node can sequentially extract and execute test tasks from the test case script based on the sequence number included in the second execution configuration information. Each extracted test task can be at least one, and these tasks can be executed in parallel or sequentially. After each test task is executed, a corresponding second test result can be generated.
[0149] This embodiment arranges the execution order of test tasks included in the test case script by the test agent node to generate second execution configuration information. The second target execution node executes the test tasks sequentially according to the execution order represented by the second execution configuration information. This realizes support for running test case scripts in the same test system, thereby making the automated testing process more flexible and improving the efficiency of automated testing.
[0150] In some optional implementations of this embodiment, the second target execution node may be further used for:
[0151] Based on the second execution configuration information, the execution order of the test tasks included in the test case script is determined; according to the execution order, the test tasks included in the test case script are run sequentially to obtain the test sub-results after each run, wherein the number of test tasks run each time is at least one; based on the obtained test sub-results, a second test result is generated.
[0152] In some optional implementations of this embodiment, the test proxy node can be further used for:
[0153] For each test case in at least one type of test case, based on the test task configuration information corresponding to that type of test case, the priority of the test tasks included in that type of test case is determined, and priority configuration information is generated; based on the test task configuration information corresponding to that type of test case, the test tasks included in that type of test case are grouped to obtain at least one test task group, and group configuration information is obtained, wherein the at least one test task group is executed in parallel; based on the test task configuration information corresponding to that type of test case, the execution order of the test tasks included in each test task group in the at least one test task group is determined, and execution order configuration information is obtained; based on at least one of the priority configuration information, group configuration information, and execution order configuration information, execution configuration information is generated.
[0154] Figure 8This is a schematic diagram of an automated testing device provided in an embodiment of this application. The device specifically includes: a first acquisition module 801, used to acquire a test task configuration file configured for automated testing of a target device; an extraction module 802, used to extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case; a second acquisition module 803, used to acquire test cases corresponding to the at least one test task configuration information from a test case library based on the at least one test task configuration information; a configuration module 804, used to configure the execution process of the at least one test case based on the test task configuration information corresponding to the at least one test case, obtaining at least one execution configuration information; and a running module 805, used to run the at least one test case based on the at least one execution configuration information, generating test results.
[0155] In one possible implementation, the extraction module 802 is further configured to: extract program test task configuration information and / or script test task configuration information from the test task configuration file; and the second acquisition module 803 includes: a first acquisition unit, configured to, in response to extracting program test task configuration information from the test task configuration file, acquire test case code from the test case library based on the program test task configuration information; and a second acquisition unit, configured to, in response to extracting script test task configuration information from the test task configuration file, acquire test case scripts from the test case library based on the script test task configuration information.
[0156] In one possible implementation, the configuration module 804 includes: a compilation unit, configured to compile test case code and generate a test case program in response to obtaining test case code from a test case library; a first generation unit, configured to generate first execution configuration information for scheduling test tasks included in the test case program based on program test task configuration information; and the running module 805 includes: a first running unit, configured to run the test tasks included in the test case program according to the first execution configuration information and generate a first test result.
[0157] In one possible implementation, the configuration module 804 includes: an orchestration unit, configured to, in response to obtaining a test case script from a test case library, orchestrate the execution order of the test tasks included in the test case script based on the script test task configuration information to obtain second execution configuration information characterizing the execution order of the test tasks included in the test case script; and the running module 805 includes: a second running unit, configured to, according to the second execution configuration information, run the test tasks included in the test case script and generate a second test result.
[0158] In one possible implementation, the second execution unit includes: a determining subunit, configured to determine the execution order of the test tasks included in the test case script based on the second execution configuration information; a running subunit, configured to run the test tasks included in the test case script sequentially according to the execution order, and obtain test sub-results after each run, wherein the number of test tasks run each time is at least one; and a generating subunit, configured to generate a second test result based on the obtained test sub-results.
[0159] In one possible implementation, the configuration module 804 includes: a first determining unit, configured to determine the priority of the test tasks included in each of the at least one test cases based on the test task configuration information corresponding to that test case, and generate priority configuration information; a grouping unit, configured to group the test tasks included in the at least one test case based on the test task configuration information corresponding to that test case, to obtain at least one test task group, and obtain group configuration information, wherein the at least one test task group is executed in parallel; a second determining unit, configured to determine the execution order of the test tasks included in each of the at least one test task group based on the test task configuration information corresponding to that test case, and obtain execution order configuration information; and a second generating unit, configured to generate execution configuration information based on at least one of the priority configuration information, group configuration information, and execution order configuration information.
[0160] The automated testing device provided in this embodiment can be as follows: Figure 8 The automated testing device shown can execute all the steps of the above automated testing methods, thereby achieving the technical effects of the above automated testing methods. For details, please refer to the relevant descriptions above. For the sake of brevity, it will not be elaborated here.
[0161] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 The illustrated electronic device 900 includes at least one processor 901, a memory 902, at least one network interface 904, and other user interfaces 903. The various components in the electronic device 900 are coupled together via a bus system 905. It is understood that the bus system 905 is used to implement communication between these components. In addition to a data bus, the bus system 905 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 9 The general labeled all buses as Bus System 905.
[0162] The user interface 903 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).
[0163] It is understood that the memory 902 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 902 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0164] In some implementations, memory 902 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 9021 and application program 9022.
[0165] The operating system 9021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 9022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this application embodiment can be included in the application program 9022.
[0166] In this embodiment, by calling the program or instructions stored in memory 902, specifically the program or instructions stored in application program 9022, processor 901 executes the method steps provided in each method embodiment, including, for example:
[0167] Obtain the test task configuration file configured for automated testing of the target device;
[0168] Extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case;
[0169] Based on at least one test task configuration information, obtain the test cases corresponding to each of the at least one test task configuration information from the test case library;
[0170] Based on the test task configuration information corresponding to at least one test case, the execution process of at least one test case is configured to obtain at least one execution configuration information;
[0171] Based on at least one execution configuration information, run at least one test case and generate test results.
[0172] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 901. Processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in processor 901. The processor 901 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 902. Processor 901 reads the information in memory 902 and, in conjunction with its hardware, completes the steps of the above method.
[0173] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described above in this application, or combinations thereof.
[0174] For software implementation, the techniques described herein can be implemented by units that perform the functions described above. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or external to the processor.
[0175] The electronic device provided in this embodiment may be as follows: Figure 9 The electronic device shown can execute all the steps of the automated testing methods described above, thereby achieving the technical effects of the automated testing methods described above. For details, please refer to the relevant descriptions above. For the sake of brevity, it will not be elaborated here.
[0176] This application also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; it may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and it may also include combinations of the above types of memory.
[0177] When one or more programs in the storage medium can be executed by one or more processors to achieve the above-mentioned automated testing method executed on the electronic device side.
[0178] The processor described above is used to execute the target detection program stored in memory to implement the following steps of an automated testing method executed on the electronic device side:
[0179] Obtain the test task configuration file configured for automated testing of the target device;
[0180] Extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case;
[0181] Based on at least one test task configuration information, obtain the test cases corresponding to each of the at least one test task configuration information from the test case library;
[0182] Based on the test task configuration information corresponding to at least one test case, the execution process of at least one test case is configured to obtain at least one execution configuration information;
[0183] Based on at least one execution configuration information, run at least one test case and generate test results.
[0184] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0185] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0186] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0187] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An automated testing method, characterized in that, The method includes: Obtain the test task configuration file configured for automated testing of the target device; wherein, the test task configuration file includes the version of the program being tested, test items, test type, test deployment platform, and test priority, wherein the test type indicates whether each test case is executed in parallel or serially, and the test deployment platform is the type of device required to execute the test process; Extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case; Based on the at least one test task configuration information, obtain the test cases corresponding to the at least one test task configuration information from the test case library; Based on the test task configuration information corresponding to each of the at least one test case, the execution process of each of the at least one test case is configured to obtain at least one execution configuration information; Based on the at least one execution configuration information, run the at least one test case and generate test results; Based on the test task configuration information corresponding to each of the at least one test case, the execution process of each of the at least one test case is configured to obtain at least one execution configuration information, including: For each test case in the at least one type of test case, based on the test task configuration information corresponding to that type of test case, the priority of the test tasks included in that type of test case is determined, and priority configuration information is generated; Based on the test task configuration information corresponding to this type of test case, the test tasks included in this type of test case are grouped to obtain at least one test task group and group configuration information is obtained, wherein the at least one test task group is executed in parallel. Based on the test task configuration information corresponding to this type of test case, the execution order of the test tasks included in each test task group in the at least one test task group is determined to obtain the execution order configuration information; wherein, the execution order is automatically determined according to the priority order of the test tasks; The execution configuration information is generated based on at least one of the priority configuration information, the grouping configuration information, and the execution order configuration information; The step of extracting at least one type of test task configuration information from the test task configuration file includes: Extract program test task configuration information and / or script test task configuration information from the test task configuration file; and The step of obtaining test cases corresponding to the at least one test task configuration information from the test case library based on the at least one test task configuration information includes: In response to extracting program test task configuration information from the test task configuration file, test case code is obtained from the test case library based on the program test task configuration information; In response to extracting script test task configuration information from the test task configuration file, test case scripts are obtained from the test case library based on the script test task configuration information.
2. The method according to claim 1, characterized in that, Based on the test task configuration information corresponding to each of the at least one test case, the execution process of each of the at least one test case is configured to obtain at least one execution configuration information, including: In response to obtaining the test case code from the test case library, the test case code is compiled to generate a test case program; Based on the program test task configuration information, first execution configuration information is generated for scheduling the test tasks included in the test case program; and The step of running at least one test case based on the at least one execution configuration information and generating test results includes: Based on the first execution configuration information, the test tasks included in the test case program are run to generate the first test result.
3. The method according to claim 1, characterized in that, Based on the test task configuration information corresponding to each of the at least one test case, the execution process of each of the at least one test case is configured to obtain at least one execution configuration information, including: In response to obtaining the test case script from the test case library, based on the script test task configuration information, the execution order of the test tasks included in the test case script is arranged to obtain second execution configuration information characterizing the execution order of the test tasks included in the test case script; and The step of running at least one test case based on the at least one execution configuration information and generating test results includes: Based on the second execution configuration information, the test tasks included in the test case script are run to generate the second test result.
4. The method according to claim 3, characterized in that, The step of running the test tasks included in the test case script according to the second execution configuration information and generating the second test result includes: Based on the second execution configuration information, the execution order of the test tasks included in the test case script is determined; According to the execution order, the test tasks included in the test case script are run sequentially to obtain the test sub-results after each run, wherein the number of test tasks run each time is at least one; Based on the obtained test sub-results, the second test result is generated.
5. An automated testing system, characterized in that, The system is used to implement the method as described in any one of claims 1-4, and the system includes: a test case library, a test management node, a test proxy node, and at least one test execution node; The test management node is used to obtain the test task configuration file configured for automated testing of the target device, and send the test task configuration file to the test agent node; The test proxy node is used to extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case; based on the at least one test task configuration information, obtain the test cases corresponding to the at least one test task configuration information from the test case library; based on the test task configuration information corresponding to the at least one test case, configure the execution process of the at least one test case respectively to obtain at least one execution configuration information; and send the at least one execution configuration information and the at least one test case to the at least one test execution node. The at least one test execution node is used to run the at least one test case based on the at least one execution configuration information and generate test results.
6. The system according to claim 5, characterized in that, The system also includes a test compilation node; The test agent node is used to extract program test task configuration information from the test task configuration file; and send compilation instructions to the test compilation node based on the program test task configuration information. The test compilation node is used to obtain test case code from the test case library according to the compilation instructions, compile the test case code to generate a test case program, and send the test case program to the test agent node; The test proxy node is used to generate first execution configuration information for scheduling the test tasks included in the test case program based on the program test task configuration information; and to send the test case program and the first execution configuration information to the first target execution node among the at least one test execution node; The first target execution node is used to run the test tasks included in the test case program according to the first execution configuration information, and generate the first test result.
7. The system according to claim 5, characterized in that, The test agent node is also used to extract script test task configuration information from the test task configuration file; and to obtain test case scripts from the test case library based on the script test task configuration information. Based on the script test task configuration information, the execution order of the test tasks included in the test case script is arranged to obtain second execution configuration information that characterizes the execution order of the test tasks included in the test case script; the test case script and the second execution configuration information are sent to the second target execution node in the at least one test execution node; The second target execution node is used to run the test tasks included in the test case script according to the second execution configuration information, and generate the second test result.
8. An automated testing device, characterized in that, The device includes: The first acquisition module is used to acquire the test task configuration file configured for automated testing of the target device; An extraction module is used to extract at least one test task configuration information from the test task configuration file, wherein the at least one test task configuration information is generated by configuring at least one test case; The second acquisition module is used to acquire test cases corresponding to the at least one test task configuration information from the test case library based on the at least one test task configuration information. The configuration module is used to configure the execution process of the at least one test case based on the test task configuration information corresponding to the at least one test case, so as to obtain at least one execution configuration information. The execution module is used to run the at least one test case based on the at least one execution configuration information and generate test results; Wherein, the step of configuring the execution process of the at least one test case based on the test task configuration information corresponding to the at least one test case respectively, to obtain at least one execution configuration information, includes: For each test case in the at least one type of test case, based on the test task configuration information corresponding to that type of test case, the priority of the test tasks included in that type of test case is determined, and priority configuration information is generated; Based on the test task configuration information corresponding to this type of test case, the test tasks included in this type of test case are grouped to obtain at least one test task group and group configuration information is obtained, wherein the at least one test task group is executed in parallel. Based on the test task configuration information corresponding to this type of test case, the execution order of the test tasks included in each test task group in the at least one test task group is determined to obtain the execution order configuration information; wherein, the execution order is automatically determined according to the priority order of the test tasks; The execution configuration information is generated based on at least one of the priority configuration information, the grouping configuration information, and the execution order configuration information; The step of extracting at least one type of test task configuration information from the test task configuration file includes: Extract program test task configuration information and / or script test task configuration information from the test task configuration file; and The step of obtaining test cases corresponding to the at least one test task configuration information from the test case library based on the at least one test task configuration information includes: In response to extracting program test task configuration information from the test task configuration file, test case code is obtained from the test case library based on the program test task configuration information; In response to extracting script test task configuration information from the test task configuration file, test case scripts are obtained from the test case library based on the script test task configuration information.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program stored in the memory, wherein when the computer program is executed, it implements the method described in any one of claims 1-4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-4.
Citation Information
Patent Citations
Automation test method and apparatus
CN108614774A
Automatic testing method and device, computer readable storage medium and electronic equipment
CN115048313A