Automatic testing method and device, computer equipment, readable storage medium and program product

Obtaining and updating test schedules through automated testing methods, generating and updating test scripts, solving the problems of time-consuming and errors in manual maintenance and improving testing efficiency and accuracy.

CN119201717APending Publication Date: 2024-12-27GLENFLY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411273968.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

During project development, as test cases increase, the time spent manually maintaining test schedules and test scripts increases, and operational errors are prone to occur, affecting testing efficiency and accuracy.

Method used

Provides an automated testing method, by obtaining target test schedules, generating and updating test scripts, cross-checking form content consistency, and automatically update test scripts to reduce manual operation time and ensure accuracy.

Benefits of technology

Save test script preparation time, improve test efficiency, reduce generation time and test process time, and ensure the accuracy of test scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201717A_ABST
    Figure CN119201717A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic testing method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a first target test schedule of a target item; generating a first test script according to the first target test schedule; under the condition that the first target test schedule is updated, updating the first target test schedule to obtain a second target test schedule, and updating the first test script according to the second target test schedule to obtain a second test script; and performing cross checking on the second target test schedule and the second test script, obtaining a target test script according to the second test script under the condition that the second target test schedule and the second test script are consistent in checking content, and performing testing according to the target test script. By adopting the method, the test efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to an automated testing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] As the project develops, the demand for various types of tests increases, and the number and categories of test cases that need to be maintained are getting larger and larger. In this case, with a large number of test case categories and numbers, it is necessary to establish a test plan based on the test cases. It will be very time-consuming to manually check and write the information of these test cases into the test plan.

[0003] In daily regression testing, if the test commands are extracted from the table before testing, in addition to being time-consuming, since table operations are highly dependent on the format, errors may occur when operating the table during the test, affecting the normal test process and greatly affecting the test efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide an automated testing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve testing efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides an automated testing method, the method comprising:

[0006] Obtain a first target test plan table for a target project;

[0007] Generate a first test script according to the first target test plan table;

[0008] When the first target test plan table is updated, the first target test plan table is updated to obtain a second target test plan table, and the first test script is updated according to the second target test plan table to obtain a second test script;

[0009] Cross-check the second target test plan and the second test script. If the check contents of the second target test plan and the second test script are consistent, obtain the target test script according to the second test script, and perform testing according to the target test script.

[0010] In one embodiment, the updating of the first test script according to the second target test plan table to obtain the second test script includes:

[0011] Comparing the second target test plan table with the first target test plan table to obtain difference information;

[0012] The first test script is updated according to the difference information to obtain a second test script.

[0013] In one embodiment, the difference information includes first difference information, and the first difference information includes at least one of a newly added subtable and a deleted subtable; and updating the first test script according to the difference information to obtain the second test script includes:

[0014] If the first difference information is a newly added sub-table, obtain the test script group name and test command corresponding to the newly added sub-table, and update the test script group name and test command corresponding to the newly added sub-table to the first test script to obtain a second test script;

[0015] If the first difference information is a deleted subtable, the test script group name corresponding to the deleted subtable in the first test script is marked as deleted, to obtain a second test script;

[0016] If the first difference information is a newly added sub-table and a deleted sub-table, obtain the test script group name and test command corresponding to the newly added sub-table, and update the test script group name and test command corresponding to the newly added sub-table to the first test script. At the same time, mark the test script group name corresponding to the deleted sub-table in the first test script as deleted to obtain the second test script.

[0017] In one embodiment, the difference information includes second difference information, and the difference information is obtained by comparing the second target test plan table with the first target test plan table, including:

[0018] Compare each row of each subtable in the second target test plan table with the same row in the first target test plan table in turn to obtain the second difference information;

[0019] The updating of the first test script according to the second target test plan table to obtain a second test script includes:

[0020] If the second difference information is that the current row of the sub-table does not exist in the first target test plan table, the test command of the current row is written into the first test script to obtain the second test script.

[0021] In one embodiment, the updating of the first test script according to the second target test plan table to obtain the second test script includes:

[0022] If the second difference information indicates that the test command corresponding to the current row of the sub-table is different from the test command corresponding to the same row of the first target test plan table, the test command of the current row is replaced with the corresponding test command in the first test script to obtain a second test script;

[0023] If the second difference information indicates that the test command corresponding to the current row of the sub-table is the same as the test command corresponding to the same row of the first target test plan table, then determine whether the test script group name corresponding to the current row is different from the test script group name corresponding to the same row of the first target test plan table;

[0024] In the case where the test script group names are different, the test script group name corresponding to the current row replaces the corresponding test script group name in the first test script to obtain a second test script.

[0025] In one embodiment, the updating of the first test script according to the second target test plan table to obtain the second test script includes:

[0026] If the second difference information is that the test case names in the first target test plan table cannot match the test case names in each sub-table, the unmatched test case names in the first test script are marked as deleted to obtain a second test script.

[0027] In one embodiment, obtaining a first target test schedule for a target project includes:

[0028] Obtaining an initial test plan table of the target project and a path of test cases to be added; the initial test plan table includes a test case basic information column, a test case characteristic parameter column, and a test script group name column;

[0029] Acquire a test case file according to the test case path to be added, wherein the test case file includes basic information of the test case and test case characteristic parameters;

[0030] Write the basic information of the test case into the basic information column corresponding to the initial test plan table;

[0031] Writing the test case characteristic parameters into the characteristic parameter column corresponding to the initial test plan table;

[0032] The test script group name is obtained, and the test script group name is written into the test script group name column corresponding to the initial test plan table to obtain the first target test plan table of the target project.

[0033] In one embodiment, generating a first test script according to the first target test plan table includes:

[0034] Acquire test cases that meet preset conditions from the first target test plan table;

[0035] A first test script is generated according to the test cases that meet the preset conditions.

[0036] In one embodiment, generating a first test script according to the first target test plan table includes:

[0037] Traversing all subtables in the first target test plan table to obtain test information of each test case corresponding to each subtable;

[0038] A first test script is generated according to the test information of each test case corresponding to each sub-table.

[0039] In one embodiment, the test information includes basic information and a test script group name, and traversing all subtables in the first target test plan table to obtain test information of each test case corresponding to each subtable includes:

[0040] Traversing each of the sub-tables to obtain basic information and a test script group name of each test case corresponding to each sub-table, wherein the basic information includes a priority and a test command;

[0041] The step of generating a first test script according to the test information of each test case corresponding to each sub-table includes:

[0042] According to the priority and the test script group name, the test command is written into the test script corresponding to the test script group name to obtain the first test script.

[0043] In one embodiment, the cross-checking the second target test plan table and the second test script, and obtaining the target test script according to the second test script when the second target test plan table and the second test script check contents are consistent, includes:

[0044] Obtaining the test command and the test script group name of each test case in each subtable in the second target test plan table;

[0045] According to the test script group name of each test case in each sub-table, searching the test command of the test case from the corresponding second test script;

[0046] In a case where the test command corresponding to each test case in each subtable is consistent with the test command of the test case in the second test script, obtain a first number of test cases and a first number of test script groups, as well as a second number of test cases and a second number of test script groups, wherein the first number of test cases represents the number of test cases in each subtable, the first number of test script groups represents the number of test script groups of the test cases in each subtable, the second number of test cases represents the number of test cases in the second test script, and the second number of test script groups represents the number of test cases in the second test script;

[0047] When the first number of the test cases and the second number of the test cases are equal, and the first number of the test script groups and the second number of the test script groups are equal, the second test script is used as a target test script of a second target test plan.

[0048] In a second aspect, the present application also provides an automated testing device, the device comprising:

[0049] An acquisition module, used for acquiring a first target test schedule of a target project;

[0050] A determination module, configured to generate a first test script according to the first target test schedule;

[0051] An updating module, configured to update the first target test plan table to obtain a second target test plan table when the first target test plan table is updated, and update the first test script according to the second target test plan table to obtain a second test script;

[0052] A cross-check and testing module is used to cross-check the second target test plan and the second test script. When the check contents of the second target test plan and the second test script are consistent, the target test script is obtained according to the second test script, and the test is performed according to the target test script.

[0053] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0054] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0055] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0056] The above-mentioned automated testing method, apparatus, computer equipment, computer-readable storage medium and computer program product obtain a first target test plan and a first test script generated according to the first target test plan as the last test plan and test script for this update; secondly, update the first target test plan, determine the second target test plan as the test plan for this update, and update the first test script according to the second target test plan to obtain the second test script, which is the test script for this update; finally, cross-check the second target test plan and the second test script. When the inspection contents of the second target test plan and the second test script are consistent, obtain the target test script according to the second test script, saving the time of manually generating test scripts, reducing the time-consuming preparation of test scripts, and ensuring the accuracy of the target test script. Testing is performed according to the target test script, reducing the target test script generation time and the time-consuming test process, thereby improving testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 An application environment diagram of an automated testing method in an embodiment;

[0059] Figure 2 A schematic diagram of a flow chart of an automated testing method in one embodiment;

[0060] Figure 3 A schematic diagram of a flow chart for generating a second test script in one embodiment;

[0061] Figure 4 Generate a flow chart for a second test script in another embodiment;

[0062] Figure 5 Generate a flow chart for a second test script in another embodiment;

[0063] Figure 6 Generate a flow chart for a second test script in another embodiment;

[0064] Figure 7 A schematic diagram of a process for obtaining a first target test plan table for a target project in one embodiment;

[0065] Figure 8A flow chart for generating a first test script in an embodiment;

[0066] Fig. 9 Generate a flow chart for a first test script in another embodiment;

[0067] Fig.10 Generate a flow chart for a first test script in another embodiment;

[0068] Fig.11 A schematic diagram of a process for generating a target test script when the cross-check results are consistent in one embodiment;

[0069] Fig.12 A schematic diagram of a flow chart of an automated testing method in another embodiment;

[0070] Fig.13 Generate a flow chart for a second test script in another embodiment;

[0071] Fig.14 is a structural block diagram of an automated testing device in one embodiment;

[0072] Fig.15 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0074] The automated testing method provided in the embodiments of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server obtains the first target test schedule of the target project; generates a first test script according to the first target test schedule; when the first target test schedule is updated, the first target test schedule is updated to obtain the second target test schedule, and the first test script is updated according to the second target test schedule to obtain the second test script; cross-check the second target test schedule and the second test script, and when the second target test schedule and the second test script check content are consistent, the target test script is obtained according to the second test script, and the test is performed according to the target test script. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0075] In an exemplary embodiment, Figure 2 As shown, an automated testing method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S206. Among them:

[0076] Step S202, obtaining a first target test plan table of a target project.

[0077] The first target test plan is a target test plan of the previous version of the current latest version, also called a historical test plan.

[0078] Optionally, when a new project is started, the server takes the new project as the target project, and simultaneously obtains the path of the file where the test cases related to the target project are located and the initial test plan table, reads the information of the test cases related to the target project according to the path, and writes the information of the test cases into the initial test plan table to complete the first target test plan table.

[0079] Optionally, after obtaining the target project-related test cases and generating an initial test plan when the target project is started, the server obtains the path of the new test cases of the target project, reads the information of the new test cases according to the path of the new test cases, and writes the information of the new test cases into the initial test plan generated previously to complete the first target test plan.

[0080] Step S204: Generate a first test script according to the first target test plan.

[0081] The first test script corresponds to the first target test schedule, and is a test script of the previous version of the current latest version of the test script.

[0082] The first target test plan table includes several sub-tables, each sub-table corresponds to a test group, and the sub-table contains all the test cases required by the group and the basic information, characteristic parameters, etc. of the test cases, wherein the basic information includes priority, test command, test case path, test file size, etc.

[0083] Optionally, at the last moment when the current update occurs, the server traverses the information of the test cases in each sub-table in the first target test plan table, and generates a first test script according to the information of the test cases.

[0084] Optionally, the server receives the instruction, and according to the instruction, filters the test case information that meets the preset conditions from the first target test plan table, and generates the first test script according to the test case information that meets the preset conditions, such as the preset conditions "resolution is 4k" and "test case with test feature "Yes" or "No".

[0085] Step S206, when the first target test plan table is updated, the first target test plan table is updated to obtain the second target test plan table, and the first test script is updated according to the second target test plan table to obtain the second test script.

[0086] Among them, the second target test plan is the latest version of the test plan. The second target test plan can be updated from the first target test plan, or it can be generated by specifying the test case in the first test script. If during the period from T0 to T1, the current time is T1, and the server captures that the first target test plan is updated or changed, and the first target test plan becomes the second target test plan (the latest version of the target test plan), then at other times, it indicates that the first target test plan has not been updated or changed, and is the previous version of the target test plan.

[0087] The second test script corresponds to the second target test schedule, and is the latest test script generated according to the second target test schedule.

[0088] Optionally, the server detects that the first target test schedule is updated at a certain moment, and the server generates a second target test schedule based on the updated content of the first target test schedule, and the updated content is not limited to addition, deletion, etc. After generating the second target test schedule, that is, after generating the current latest test schedule, the server determines the latest test script (second test script) corresponding to the latest test schedule based on the second target test schedule.

[0089] Optionally, the server detects that the first target test plan table is updated. When the first target test plan table is updated, the server obtains the second target test plan table based on the updated content and the first target test plan table. The updated content includes but is not limited to deleting a sub-table (deleting all test cases in the test group), adding a sub-table (adding all test cases in the test group), and the information of a test case in a sub-table (test group) is changed or updated. The server updates the first test script according to the second target test plan table. It only needs to add the script of the changed or updated part in the test plan table on the basis of the first test script, that is, only the script corresponding to the incremental data in the second test plan table is added to the first test script to obtain the latest second test script.

[0090] In practical applications, it is usually necessary to modify the test plan table and the test script respectively to maintain the test plan table and the test script at the same time, which is time-consuming and prone to inconsistencies. In this embodiment, by managing only one dimension of the test plan table, convenient management and search of test cases are achieved, and automatic update of the test script in the second table is achieved according to the second target test plan, which is convenient for developers and testers to manage test cases, does not require manual maintenance of test scripts, saves labor costs and time, and improves test efficiency.

[0091] Step S208, cross-check the second target test plan and the second test script. If the check contents of the second target test plan and the second test script are consistent, obtain the target test script according to the second test script, and perform testing according to the target test script.

[0092] Optionally, the server cross-checks the second target test plan and the second test script. If the check contents of the second target test plan and the second test script are consistent, the second test script is used as the target test script and tested according to the target test script. The accuracy of the script update is ensured through cross-checking.

[0093] Optionally, if the server cross-checks the second target test plan and the second test script, and the contents of the second target test plan and the second test script are inconsistent, the server will send the inconsistent contents to the terminal device used by the maintenance personnel via email, SMS, message subscription, etc.

[0094] In the above-mentioned automated testing method, a first target test plan table and a first test script generated according to the first target test plan table are obtained as the last test plan table and test script for this update; secondly, the first target test plan table is updated, and the second target test plan table is determined as the test plan table for this update, and the first test script is updated according to the second target test plan table to obtain the second test script, which is the test script for this update; finally, the second target test plan table and the second test script are cross-checked, and when the inspection contents of the second target test plan table and the second test script are consistent, the target test script is obtained according to the second test script, which saves the time of manually generating test scripts, reduces the time-consuming test script preparation, and ensures the accuracy of the target test script; testing is performed according to the target test script, which reduces the target test script generation time and the time-consuming test process, thereby improving testing efficiency.

[0095] Continuing with the above embodiment, Figure 3 As shown, the first test script is updated according to the second target test plan table to obtain the second test script, including steps S302 to S304:

[0096] Step S302, comparing the second target test schedule with the first target test schedule to obtain difference information.

[0097] Optionally, the second target test plan table and the first target test plan table can both be stored in a local designated folder, wherein the second target test plan table can be the target test plan table of the latest version, and the first target test plan table is the target test plan table of the previous version of the latest version. The server compares the target test plan table of the latest version with the target test plan table of the previous version to obtain difference information, which can be recorded as diff information.

[0098] Step S304: update the first test script according to the difference information to obtain a second test script.

[0099] The difference information may be difference information based on the sub-table (test group) dimension, where a test group includes several test cases; or difference information of test cases within a sub-table (test group).

[0100] Optionally, the server updates the first test script according to the difference information, such as deleting the A type test group in the first test script, or adding the N type test group in the first test script.

[0101] In this embodiment, the first test script corresponding to the previous version of the test plan is updated through the difference information between the latest version and the previous version of the test plan to obtain the second test script corresponding to the latest version. This will avoid the time-consuming problem of updating the test plan and the test script at the same time, and reduce the occurrence of content inconsistencies that are more likely to occur when both are updated at the same time.

[0102] Still following the above embodiment, Figure 4 As shown, the difference information includes first difference information, and the first difference information includes at least one of a newly added subtable and a deleted subtable; according to the difference information, the first test script is updated to obtain a second test script, including steps S402 to S406. Wherein:

[0103] Step S402, if the first difference information is a newly added sub-table, obtain the test script group name and test command corresponding to the newly added sub-table, and update the test script group name and test command corresponding to the newly added sub-table to the first test script to obtain the second test script.

[0104] The first difference information is difference information with the sub-table (test group) as a dimension.

[0105] Optionally, the server first determines whether it is the first difference information. If it is the first difference information, it further determines that the first difference information is a newly added subtable or a deleted subtable. If the comparison result is that there is a newly added subtable or a newly added test script group name in the subtable, the first difference information is a newly added subtable, also known as a newly added test group, AddBatch operation, as shown in Table 1. The server obtains the test script group name and test command corresponding to the newly added subtable, and updates the test script group name and test command corresponding to the newly added subtable to the first test script to obtain the second test script.

[0106] Step S404: If the first difference information is a deleted sub-table, the test script group name corresponding to the deleted sub-table in the first test script is marked as deleted, so as to obtain a second test script.

[0107] Deleting a subtable is also called deleting a test group or DeleteBatch operation.

[0108] Optionally, if the comparison result is that there is a deleted sub-table or all test cases containing a test script group name in the sub-table are deleted, then the first difference information is the deleted sub-table, as shown in Table 1. The server marks the test script group name corresponding to the deleted sub-table in the first test script as deleted, and obtains the second test script.

[0109] Table 1 First difference information type and corresponding update operation

[0110]

[0111] Step S406, if the first difference information is a newly added sub-table and a deleted sub-table, obtain the test script group name and test command corresponding to the newly added sub-table, and update the test script group name and test command corresponding to the newly added sub-table to the first test script. At the same time, mark the test script group name corresponding to the deleted sub-table in the first test script as deleted to obtain a second test script.

[0112] Optionally, if the first difference information is a newly added sub-table and a deleted sub-table, the server obtains the test script group name and test command corresponding to the newly added sub-table, and updates the test script group name and test command corresponding to the newly added sub-table to the first test script, and at the same time executes the step of marking the test script group name corresponding to the deleted sub-table in the first test script as deleted, to obtain the second test script.

[0113] In an optional embodiment, the server may first execute the step of obtaining the test script group name and test command corresponding to the newly added sub-table, and updating the test script group name and test command corresponding to the newly added sub-table to the first test script, and then execute the step of marking the test script group name corresponding to the deleted sub-table in the first test script as deleted.

[0114] The server may also first execute the step of marking the test script group name corresponding to the deleted subtable in the first test script as deleted, and then execute the step of obtaining the test script group name and test command corresponding to the newly added subtable, and updating the test script group name and test command corresponding to the newly added subtable to the first test script.

[0115] In this embodiment, by performing a corresponding update operation on the first test script according to the first difference information to obtain the second test script, the accuracy of the second test script can be improved.

[0116] In an exemplary embodiment, Figure 5 As shown, the difference information includes second difference information, and the second target test plan table and the first target test plan table are compared to obtain the difference information, including step S502: each row in each subtable in the second target test plan table is compared with the same row in the first target test plan table in turn to obtain the second difference information.

[0117] The second difference information is difference information based on the test cases in the sub-table (test group) as a dimension. Each row of the second target test plan table represents a test case.

[0118] Optionally, the server compares each row in each subtable in the second target test plan table with the same row in the first target test plan table in turn. If there is second difference information, it means that the test case has been updated; if there is no second difference information, it means that the latest version of the test plan table (second target test plan table) is completely consistent with the previous version of the test plan table (first target test plan table).

[0119] In an exemplary embodiment, the first test script is updated according to the second target test plan table to obtain the second test script, including step S504: if the second difference information is that the current row of the sub-table does not exist in the first target test plan table, the test command of the current row is written into the first test script to obtain the second test script.

[0120] Optionally, when there is second difference information, the server confirms what type of change it is. If the second difference information is that the current row of the sub-table does not exist in the first target test plan table, then there is a new test case added to the existing test script group in the sub-table of the previous version of the test plan table (the first test plan table). The server writes the test command of the current row into the first test script, recorded as the AddCmd operation, as shown in Table 2, to obtain the second test script.

[0121] Table 2 Second difference information type and corresponding update operation

[0122]

[0123] In this embodiment, the corresponding AddCmd operation is performed on the first test script through the second difference information to obtain the second test script, which can improve the accuracy of the second test script.

[0124] Continuing with the previous embodiment, Figure 6 As shown, the first test script is updated according to the second target test schedule to obtain the second test script, and the steps S602 to S606 are also included. Among them:

[0125] Step S602: If the second difference information indicates that the test command corresponding to the current row of the sub-table is different from the test command corresponding to the same row of the first target test plan table, the test command of the current row replaces the corresponding test command in the first test script to obtain a second test script.

[0126] Optionally, if the second difference information indicates that the test command corresponding to the current row of the sub-table is different from the test command corresponding to the same row of the first target test plan table, it means that the test case corresponding to the current row has updated parameters, and the test command of the current row replaces the corresponding test command in the first test script, that is, the UpdateCmd operation, as shown in Table 2, to obtain the second test script.

[0127] Step S604, if the second difference information is that the test command corresponding to the current row of the sub-table is no different from the test command corresponding to the same row of the first target test plan table, then determine whether the test script group name corresponding to the current row is different from the test script group name corresponding to the same row of the first target test plan table.

[0128] Optionally, if the second difference information indicates that the test command corresponding to the current row of the subtable is the same as the test command corresponding to the same row of the first target test plan table, the server further determines whether the test script group name corresponding to the current row is different from the test script group name corresponding to the same row of the first target test plan table. If there is a difference, it means that the test case corresponding to the current row needs to be moved to another test script group; if there is no difference, it means that the information of the test case in the second target test plan table is consistent with that in the first target test plan table.

[0129] Step S606: When there is a difference in the test script group names, the test script group name corresponding to the current row replaces the corresponding test script group name in the first test script to obtain a second test script.

[0130] Optionally, when there are differences in the test script group names, it means that the test case corresponding to the current row needs to be moved to another test script group. The server executes an update operation to replace the test script group name corresponding to the current row with the corresponding test script group name in the first test script, that is, the MoveVecBtw2Bat operation, as shown in Table 2, thereby obtaining the second test script.

[0131] Optionally, for UpdateCmd and MoveVecBtw2Bat operations, there may be a situation where the same test case contains both update operations. First, determine the situation of MoveVecBtw2Bat, but when writing the update test script, directly write according to the latest content, and perform the UpdateCmd operation at the same time to ensure the accuracy of the update result.

[0132] In this embodiment, the corresponding UpdateCmd operation or MoveVecBtw2Bat operation is performed on the first test script through the second difference information to obtain the second test script, which can improve the accuracy of the second test script.

[0133] Continuing with the previous embodiment, the first test script is updated according to the second target test plan table to obtain the second test script, including: if the second difference information is that the test case name in the first target test plan table cannot match the test case name in each sub-table, then the test case name that cannot be matched in the first test script is marked as deleted to obtain the second test script.

[0134] Optionally, if the second difference information is that the test case names in the first target test plan table (previous version target test plan table) cannot match the test case names in each sub-table in the second target test plan table (latest version target test plan table), it means that the behavior of deleting the test case has occurred, that is, the DeleteFromBat operation, as shown in Table 2. The server marks the test case names that cannot be matched in the first test script as deleted, and obtains the second test script.

[0135] Optionally, in the first difference information (2 types) and the second difference information (4 types) in the aforementioned embodiment, when the difference information includes both the first difference information and the second difference information, after updating the test script group name and test command corresponding to the newly added subtable to the first test script, or marking the test script group name corresponding to the deleted subtable in the first test script as deleted, the server determines that the second difference information exists, and determines the update operation type according to the second difference information, and performs the corresponding operation. Then, the update content is recorded, and the update content of the first difference information and the update content of the second difference information are automatically sent to the development and test personnel by email.

[0136] In this embodiment, the corresponding DeleteFromBat operation is performed on the first test script through the second difference information to obtain the second test script, which can improve the accuracy of the second test script.

[0137] In an exemplary embodiment, Figure 7 As shown, obtaining the first target test plan table of the target project includes steps S702 to S710. Among them:

[0138] Step S702, obtaining the initial test plan table of the target project and the path of the test cases to be added.

[0139] Among them, the initial test plan table includes the test case basic information column, the test case characteristic parameter column and the test script group name (BatchName) column and notes. The basic information column includes priority (Priority), test case name (VecName), test command (CMD), memory parameters, etc., as shown in Table 3.

[0140] Optionally, the server obtains an initial test plan table of the target project and a path of test cases to be added from a configuration file.

[0141] It should be noted that the contents of the initial test plan table, the first target test plan table, and the second target test plan table can all be as shown in Table 3.

[0142] Table 3 Contents of the test plan

[0143]

[0144] Step S704, obtaining the test case file according to the path of the test case to be added.

[0145] The test case file includes basic information of the test case and test case characteristic parameters.

[0146] Optionally, the server obtains basic information and test case characteristic parameters of the test case according to the path of the test case to be added.

[0147] Step S706, write the basic information of the test case into the basic information column corresponding to the initial test plan table.

[0148] Optionally, the server sets various parameters in the configuration file according to actual requirements based on the received parameter configuration instruction, including the project name, the path of the test schedule, the usage mode, and the interval period for regularly checking whether there is an update.

[0149] The server traverses each row of all subtables in the initial test plan table according to the parameter settings in the configuration file and obtains the information of each row. Each row corresponds to a test case. The server writes the basic information of the same test case into the corresponding columns in Table 3 according to the priority (Priority), test case name (VecName), test command (CMD), memory parameters and other basic information.

[0150] Step S708, write the test case characteristic parameters into the characteristic parameter column corresponding to the initial test plan table.

[0151] Optionally, the server writes the characteristic parameters of the same test case into the corresponding characteristic parameter column of the initial test plan table, such as the corresponding column in Table 3.

[0152] Step S710, obtaining a test script group name, and writing the test script group name into a test script group name column corresponding to the initial test plan table, to obtain a first target test plan table for the target project.

[0153] Optionally, the server obtains the specified test script group name, each test script group is a subtable including several test cases, and writes the obtained test script group name into the test script group name column corresponding to the initial test plan table to obtain the first target test plan table of the target project.

[0154] In this embodiment, after the corresponding parameter information is extracted through the test case path, the content that the test and development personnel are concerned about and need is automatically written into the test plan table. If the information of these test cases is manually checked and written into the test plan table, it will be very time-consuming. A method of automatically updating the test plan table by path is adopted. Only the path of the test case needs to be specified to automatically write the above into the first target test plan table, thereby reducing the number of manual operation steps.

[0155] In an exemplary embodiment, Figure 8 As shown, according to the first target test plan table, a first test script is generated, including steps S802 to S804. Among them:

[0156] Step S802: Acquire test cases that meet preset conditions from the first target test plan table.

[0157] Optionally, the server selects test cases that meet preset conditions from the first target test plan table using a table filtering function according to the instructions, such as the preset conditions include filtering out all test cases with a resolution of 4k or a test feature of a column in the test case table as "Yes" or "No".

[0158] Step S804: Generate a first test script according to the test cases that meet the preset conditions.

[0159] Optionally, the server generates a first test script that meets the target project for the test case that meets the preset conditions. The server screens the first target test schedule according to the preset conditions to obtain a second target test schedule. The server updates the first test script according to the correspondence of the second target test schedule to obtain a second test script.

[0160] Optionally, after the server generates the second test script according to the second target test schedule, the server cross-checks the second target test schedule and the second test script. If the second target test schedule and the second test script check contents are consistent, the server obtains the target test script according to the second test script and performs the test according to the target test script. If the second target test schedule and the second test script check contents are inconsistent, the inconsistent contents are sent to the terminal device used by the maintenance personnel via email, SMS, message subscription, etc.

[0161] In this embodiment, while automatically updating the first target test plan table to the second target test plan table, the second target test plan table can also be generated by specifying conditions, and a second test script can be generated according to the second target test plan table, which can improve the flexibility of generating the second target test plan table.

[0162] In an exemplary embodiment, Fig. 9 As shown, according to the first target test plan table, a first test script is generated, including steps S902 to S904. Among them:

[0163] Step S902, traverse all sub-tables in the first target test plan table to obtain test information of each test case corresponding to each sub-table.

[0164] Optionally, the server traverses each row of all sub-tables in the first target test plan table to obtain test information of each test case corresponding to each sub-table.

[0165] Step S904: Generate a first test script according to the test information of each test case corresponding to each sub-table.

[0166] Optionally, the server generates a sub-test script corresponding to each sub-table according to the test information of each test case corresponding to each sub-table. For example, based on the 10 test case information of sub-table 1, sub-test script 1 is generated; based on the 8 test case information of sub-table 2, sub-test script 2 is generated; and so on. The server combines several sub-test scripts to obtain a first test script.

[0167] In this embodiment, by traversing the test case information of the sub-table, the first test script can be automatically generated, thereby improving the efficiency of automated testing.

[0168] Continuing with the above embodiment, Fig.10 As shown, the test information includes basic information and a test script group name, traverses all sub-tables in the first target test plan table, and obtains the test information of each test case corresponding to each sub-table, including step S1002: traverses each sub-table to obtain the basic information and a test script group name of each test case corresponding to each sub-table, and the basic information includes priority and test commands.

[0169] Optionally, the server traverses each sub-table to obtain the priority (Priority) and test command (CMD) of each test case corresponding to each sub-table, as well as the test script group name (BatchName).

[0170] Generate a first test script according to the test information of each test case corresponding to each sub-table, including step S1004: write the test command into the test script corresponding to the test script group name according to the priority and the test script group name to obtain the first test script.

[0171] Optionally, the server writes the CMD of the test case to be tested into the BatchName.bat script according to the priority Priority and the test script group name BatchName; after the traversal is completed, several BatchName.bat scripts are obtained, that is, the first test script of all test scripts of the project.

[0172] In this embodiment, the first test script can be automatically generated through the basic information of the test case and the name of the test script group, thereby improving the efficiency of generating the first test script.

[0173] In an exemplary embodiment, Fig.11As shown, the second target test plan table and the second test script are cross-checked. When the second target test plan table and the second test script check contents are consistent, the target test script is obtained according to the second test script, including steps S1102 to S1108. Wherein:

[0174] Step S1102, obtaining the test command and the test script group name of each test case in each sub-table in the second target test plan table.

[0175] Optionally, the server obtains the test command and the test script group name of each test case in each sub-table in the second target test plan table (the latest version test plan table).

[0176] Step S1104, searching for a test command of the test case from the corresponding second test script according to the test script group name of each test case in each sub-table.

[0177] Optionally, the server searches for the test command of the test case from the corresponding second test script according to the test script group name of each test case in each sub-table in the second target test plan table (the latest version test plan table).

[0178] Step S1106, when the test command corresponding to each test case in each subtable is consistent with the test command of the test case in the second test script, obtain the first number of test cases and the first number of test script groups, as well as the second number of test cases and the second number of test script groups.

[0179] Among them, the first number of test cases represents the number of test cases in each subtable, the first number of test script groups represents the number of test script groups of test cases in each subtable, the second number of test cases represents the number of test cases in the second test script, and the second number of test script groups represents the number of test cases in the second test script.

[0180] Optionally, after searching for the test commands of the test case, the server compares whether the test commands corresponding to each test case in each subtable in the second target test plan table are consistent with the test commands of the test case in the second test script. The comparison content includes the path and parameter configuration of the test case. If there are inconsistent items, the inconsistent result information is recorded and a log LOG is generated.

[0181] Optionally, when the test commands corresponding to each test case in each subtable are consistent with the test commands of the test case in the second test script, the server obtains the total number of test cases and the number of each test script group in the second target test table, and compares them with the total number of test cases and the number of each test script group in the corresponding second test script.

[0182] Step S1108: When the first number of test cases and the second number of test cases are equal, and the first number of test script groups and the second number of test script groups are equal, use the second test script as the target test script of the second target test plan.

[0183] Optionally, when the first number of test cases and the second number of test cases are equal, and the first number of test script groups and the second number of test script groups are equal, it indicates that the cross check is completely consistent, and the server outputs "Cross Check Success" and uses the second test script as the target test script of the second target test plan.

[0184] Optionally, if at least one of the first number of test cases and the second number of test cases are not equal and the first number of test script groups and the second number of test script groups are not equal, the server outputs "Cross CheckFail" and automatically sends the log LOG to the terminal device of the maintenance personnel by email.

[0185] In this embodiment, by cross-checking the second target test plan and the second test script and determining the target test script according to the result of the cross-check, the accuracy of the script update can be improved, test case update problems caused by misoperation can be avoided, and the accuracy of the test cases can be ensured.

[0186] In an exemplary embodiment, Fig.12 As shown, obtaining the first target test plan of the target project includes: obtaining the initial test plan and the path of the test case to be added of the target project; the initial test plan includes a test case basic information column, a test case characteristic parameter column and a test script group name column; obtaining the test case file according to the path of the test case to be added, the test case file includes the basic information of the test case and the test case characteristic parameters; writing the basic information of the test case into the basic information column corresponding to the initial test plan; writing the test case characteristic parameters into the characteristic parameter column corresponding to the initial test plan; obtaining the test script group name, and writing the test command into the test script group name column corresponding to the initial test plan according to the basic information of the test case and the test script group name, so as to obtain the first target test plan of the target project.

[0187] The server traverses each sub-table to obtain the basic information and test script group name of each test case corresponding to each sub-table. The basic information includes priority and test command; according to the priority and test script group name, the test command is written into the test script corresponding to the test script group name to obtain the first test script. Or the server uses the table screening function to select test cases that meet the preset conditions from the first target test plan table according to the received instructions, such as the preset conditions including screening out all test cases with a resolution of 4k or a test feature of a column in the test case table as "Yes" or "No". The server generates the first test script that meets the target project for the test cases that meet the preset conditions.

[0188] When the first target test plan table is updated, the first target test plan table is updated to obtain a second target test plan table, and the second target test plan table is compared with the first target test plan table to obtain difference information.

[0189] According to the difference information, the first test script is updated to obtain the second test script, including two cases:

[0190] First, when the difference information only includes the first difference information, the update operation type is determined according to the first difference information, and the updated content of the first difference information is automatically sent to the development and test personnel by email. Wherein, the difference information includes the first difference information, and the first difference information includes at least one of adding a sub-table and deleting a sub-table; if the first difference information is adding a sub-table, the test script group name and test command corresponding to the added sub-table are obtained, and the test script group name and test command corresponding to the added sub-table are updated to the first test script to obtain the second test script; if the first difference information is deleting a sub-table, the test script group name corresponding to the deleted sub-table in the first test script is marked as deleted to obtain the second test script; if the first difference information is adding a sub-table and deleting a sub-table, the test script group name and test command corresponding to the added sub-table are obtained, and the test script group name and test command corresponding to the added sub-table are updated to the first test script, and at the same time, the test script group name corresponding to the deleted sub-table in the first test script is marked as deleted to obtain the second test script. The above update content is automatically sent to the development and test personnel by email.

[0191] Second, when the difference information only includes the second difference information, the update operation type is determined according to the second difference information, and the update content of the second difference information is automatically sent to the development test personnel by email. The difference information includes the second difference information, and each row of each subtable in the second target test plan table is compared with the same row in the first target test plan table in turn to obtain the second difference information; if the second difference information is that the current row of the subtable does not exist in the first target test plan table, the test command of the current row is written into the first test script to obtain the second test script. If the second difference information is that the test command corresponding to the current row of the subtable is different from the test command corresponding to the same row of the first target test plan table, then the test command of the current row is replaced with the corresponding test command in the first test script to obtain a second test script; if the second difference information is that the test command corresponding to the current row of the subtable is the same as the test command corresponding to the same row of the first target test plan table, then determine whether the test script group name corresponding to the current row is different from the test script group name corresponding to the same row of the first target test plan table; if the test script group name is different, then the test script group name corresponding to the current row is replaced with the corresponding test script group name in the first test script to obtain a second test script; if the second difference information is that the test case name in the first target test plan table cannot match the test case name of each subtable, then the test case name that cannot be matched in the first test script is marked as deleted to obtain a second test script. The above update content is automatically sent to the development tester by email.

[0192] like Fig.13 As shown, when the difference information includes both the first difference information and the second difference information, after updating the test script group name and the test command corresponding to the newly added sub-table to the first test script, or marking the test script group name corresponding to the deleted sub-table in the first test script as deleted, the server determines that there is second difference information, then determines the update operation type according to the second difference information, and performs corresponding operations to automatically send emails to the development and testing personnel with the updated content of the first difference information and the updated content of the second difference information.

[0193] Cross-check the second target test plan table and the second test script to determine whether the second target test plan table and the second test script check contents are consistent, including: obtaining the test command and the test script group name of each test case in each subtable in the second target test plan table; searching for the test command of the test case from the corresponding second test script according to the test script group name of each test case in each subtable; obtaining the first number of test cases and the first number of test script groups, as well as the second number of test cases and the second number of test script groups, when the test command corresponding to each test case in each subtable is consistent with the test command of the test case in the second test script, and when the first number of test cases and the second number of test cases are equal, and the first number of test script groups and the second number of test script groups are equal, taking the second test script as the target test script of the second target test plan table. Among them, the first number of test cases represents the number of test cases in each subtable, the first number of test script groups represents the number of test script groups of test cases in each subtable, the second number of test cases represents the number of test cases in the second test script, and the second number of test script groups represents the number of test cases in the second test script.

[0194] Perform regression testing as per target test scripts.

[0195] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0196] Based on the same inventive concept, the embodiment of the present application also provides an automated testing device for implementing the automated testing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more automated testing device embodiments provided below can refer to the limitations on the automated testing method above, and will not be repeated here.

[0197] In an exemplary embodiment, Fig.14As shown, an automated testing device is provided, including: an acquisition module 1401, a determination module 1402, an update module 1403 and a cross-check and test module 1404, wherein:

[0198] The acquisition module 1401 is used to acquire a first target test plan table of a target project.

[0199] The determination module 1402 is used to generate a first test script according to the first target test plan table.

[0200] The updating module 1403 is used to update the first target test plan table to obtain a second target test plan table when the first target test plan table is updated, and to update the first test script according to the second target test plan table to obtain a second test script.

[0201] The cross-check and test module 1404 is used to cross-check the second target test plan and the second test script. When the check contents of the second target test plan and the second test script are consistent, the target test script is obtained according to the second test script, and the test is performed according to the target test script.

[0202] In an exemplary embodiment, the update module 1403 includes:

[0203] The comparison unit is used to compare the second target test plan table with the first target test plan table to obtain difference information.

[0204] The second test script first generating unit is used to update the first test script according to the difference information to obtain the second test script.

[0205] In an exemplary embodiment, the difference information includes first difference information, and the first difference information includes at least one of a newly added sub-table and a deleted sub-table; the second test script first generating unit further includes:

[0206] The first generation subunit of the second test script is used to obtain the test script group name and test command corresponding to the newly added subtable if the first difference information is a newly added subtable, and update the test script group name and test command corresponding to the newly added subtable to the first test script to obtain the second test script.

[0207] The second generating subunit of the second test script is used for marking the test script group name corresponding to the deleted subtable in the first test script as deleted if the first difference information is a deleted subtable, so as to obtain a second test script.

[0208] The third generation sub-unit of the second test script is used to obtain the test script group name and test command corresponding to the newly added sub-table if the first difference information is a newly added sub-table and a deleted sub-table, and update the test script group name and test command corresponding to the newly added sub-table to the first test script; at the same time, mark the test script group name corresponding to the deleted sub-table in the first test script as deleted to obtain the second test script.

[0209] In an exemplary embodiment, the difference information includes second difference information, and the comparison unit is further used to compare each row in each subtable in the second target test plan table with the same row in the first target test plan table in turn to obtain the second difference information.

[0210] The first generating unit of the second test script is further used to write the test command of the current row into the first test script to obtain the second test script if the second difference information is that the current row of the subtable does not exist in the first target test plan table.

[0211] In an exemplary embodiment, the second test script first generating unit further includes:

[0212] The fourth generation sub-unit of the second test script is used to replace the corresponding test command in the first test script with the test command of the current row if the second difference information indicates that the test command corresponding to the current row of the sub-table is different from the test command corresponding to the same row of the first target test plan table to obtain the second test script.

[0213] The judging sub-unit is used to judge whether the test script group name corresponding to the current row is different from the test script group name corresponding to the same row of the first target test plan table if the second difference information shows that there is no difference between the test command corresponding to the current row of the sub-table and the test command corresponding to the same row of the first target test plan table.

[0214] The fifth generating subunit of the second test script is used to replace the corresponding test script group name in the first test script with the test script group name corresponding to the current line when there is a difference in the test script group name, so as to obtain the second test script.

[0215] In an exemplary embodiment, the second test script first generating unit further includes:

[0216] The sixth generation subunit of the second test script is used to mark the unmatched test case names in the first test script for deletion if the second difference information is that the test case names in the first target test plan table cannot match the test case names in each subtable, thereby obtaining the second test script.

[0217] In an exemplary embodiment, the acquisition module 1401 includes:

[0218] The first acquisition unit is used to acquire an initial test plan table of a target project and a path of test cases to be added; the initial test plan table includes a test case basic information column, a test case characteristic parameter column and a test script group name column.

[0219] The second acquisition unit is used to acquire a test case file according to the path of the test case to be added, where the test case file includes basic information of the test case and characteristic parameters of the test case.

[0220] The first writing unit is used to write the basic information of the test case into the basic information column corresponding to the initial test plan table.

[0221] The second writing unit is used to write the test case characteristic parameters into the characteristic parameter column corresponding to the initial test plan table.

[0222] The third writing unit is used to obtain the test script group name, and write the test script group name into the test script group name column corresponding to the initial test plan table to obtain a first target test plan table for the target project.

[0223] In an exemplary embodiment, the determination module 1402 includes:

[0224] The test case acquisition unit is used to acquire test cases that meet preset conditions from the first target test plan table.

[0225] The first test script first generating unit is used to generate a first test script according to a test case that meets a preset condition.

[0226] In an exemplary embodiment, the determining module 1402 further includes:

[0227] The traversal acquisition unit is used to traverse all sub-tables in the first target test plan table to obtain the test information of each test case corresponding to each sub-table.

[0228] The first test script second generating unit is used to generate a first test script according to the test information of each test case corresponding to each sub-table.

[0229] In an exemplary embodiment, the test information includes basic information and a test script group name. The traversal acquisition unit is also used to traverse each sub-table to obtain the basic information and test script group name of each test case corresponding to each sub-table. The basic information includes priority and test command.

[0230] The first test script second generating unit is further used to write the test command into the test script corresponding to the test script group name according to the priority and the test script group name to obtain the first test script.

[0231] In an exemplary embodiment, the cross-check and test module 1404 includes:

[0232] The third acquisition unit is used to acquire the test command and the test script group name of each test case in each sub-table in the second target test plan table.

[0233] The test command search unit is used to search for the test command of the test case from the corresponding second test script according to the test script group name of each test case in each sub-table.

[0234] A fourth acquisition unit is used to acquire a first number of test cases and a first number of test script groups, as well as a second number of test cases and a second number of test script groups, when the test commands corresponding to each test case in each subtable are consistent with the test commands of the test cases in the second test script, wherein the first number of test cases represents the number of test cases in each subtable, the first number of test script groups represents the number of test script groups of the test cases in each subtable, the second number of test cases represents the number of test cases in the second test script, and the second number of test script groups represents the number of test cases in the second test script.

[0235] The target test script generating unit is used to use the second test script as the target test script of the second target test plan table when the first number of test cases and the second number of test cases are equal and the first number of test script groups and the second number of test script groups are equal.

[0236] Each module in the above-mentioned automated testing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0237] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.15As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store automated test data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an automated testing method is implemented.

[0238] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0239] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0240] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0241] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0242] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0243] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0244] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An automated testing method, characterized in that: The method comprises: Obtain a first target test plan table for a target project; Generate a first test script according to the first target test plan table; When the first target test plan table is updated, the first target test plan table is updated to obtain a second target test plan table, and the first test script is updated according to the second target test plan table to obtain a second test script; Cross-check the second target test plan and the second test script. If the check contents of the second target test plan and the second test script are consistent, obtain the target test script according to the second test script, and perform testing according to the target test script.

2. The method according to claim 1, characterized in that The updating of the first test script according to the second target test plan table to obtain a second test script includes: Comparing the second target test plan table with the first target test plan table to obtain difference information; The first test script is updated according to the difference information to obtain a second test script.

3. The method according to claim 2, characterized in that The difference information includes first difference information, and the first difference information includes at least one of a newly added sub-table and a deleted sub-table; and updating the first test script according to the difference information to obtain a second test script includes: If the first difference information is a newly added sub-table, obtain the test script group name and test command corresponding to the newly added sub-table, and update the test script group name and test command corresponding to the newly added sub-table to the first test script to obtain a second test script; If the first difference information is a deleted subtable, the test script group name corresponding to the deleted subtable in the first test script is marked as deleted, to obtain a second test script; If the first difference information is a newly added sub-table and a deleted sub-table, obtain the test script group name and test command corresponding to the newly added sub-table, and update the test script group name and test command corresponding to the newly added sub-table to the first test script. At the same time, mark the test script group name corresponding to the deleted sub-table in the first test script as deleted to obtain the second test script.

4. The method according to claim 2, characterized in that: The difference information includes second difference information, and the difference information is obtained by comparing the second target test plan table with the first target test plan table, including: Compare each row of each subtable in the second target test plan table with the same row in the first target test plan table in turn to obtain the second difference information; The updating of the first test script according to the second target test plan table to obtain a second test script includes: If the second difference information is that the current row of the sub-table does not exist in the first target test plan table, the test command of the current row is written into the first test script to obtain the second test script.

5. The method according to claim 4, characterized in that The updating of the first test script according to the second target test plan table to obtain a second test script includes: If the second difference information indicates that the test command corresponding to the current row of the sub-table is different from the test command corresponding to the same row of the first target test plan table, the test command of the current row is replaced with the corresponding test command in the first test script to obtain a second test script; If the second difference information indicates that the test command corresponding to the current row of the sub-table is the same as the test command corresponding to the same row of the first target test plan table, then determine whether the test script group name corresponding to the current row is different from the test script group name corresponding to the same row of the first target test plan table; In the case where the test script group names are different, the test script group name corresponding to the current row replaces the corresponding test script group name in the first test script to obtain a second test script.

6. The method according to claim 4, characterized in that The updating of the first test script according to the second target test plan table to obtain a second test script includes: If the second difference information is that the test case names in the first target test plan table cannot match the test case names in each sub-table, the unmatched test case names in the first test script are marked as deleted to obtain a second test script.

7. The method according to claim 1, characterized in that The step of obtaining a first target test schedule for a target project includes: Obtaining an initial test plan table of the target project and a path of test cases to be added; the initial test plan table includes a test case basic information column, a test case characteristic parameter column, and a test script group name column; Acquire a test case file according to the test case path to be added, wherein the test case file includes basic information of the test case and test case characteristic parameters; Write the basic information of the test case into the basic information column corresponding to the initial test plan table; Writing the test case characteristic parameters into the characteristic parameter column corresponding to the initial test plan table; The test script group name is obtained, and the test script group name is written into the test script group name column corresponding to the initial test plan table to obtain the first target test plan table of the target project.

8. The method according to claim 1, characterized in that: Generating a first test script according to the first target test plan table includes: Acquire test cases that meet preset conditions from the first target test plan table; A first test script is generated according to the test cases that meet the preset conditions.

9. The method according to claim 1, characterized in that: Generating a first test script according to the first target test plan table includes: Traversing all subtables in the first target test plan table to obtain test information of each test case corresponding to each subtable; A first test script is generated according to the test information of each test case corresponding to each sub-table.

10. The method according to claim 9, characterized in that The test information includes basic information and a test script group name, and the traversing all subtables in the first target test plan table to obtain the test information of each test case corresponding to each subtable includes: Traversing each of the sub-tables to obtain basic information and a test script group name of each test case corresponding to each sub-table, wherein the basic information includes a priority and a test command; The step of generating a first test script according to the test information of each test case corresponding to each sub-table includes: According to the priority and the test script group name, the test command is written into the test script corresponding to the test script group name to obtain the first test script.

11. The method according to claim 1, characterized in that: The cross-checking of the second target test plan table and the second test script, and obtaining a target test script according to the second test script when the second target test plan table and the second test script check contents are consistent, comprises: Obtaining the test command and the test script group name of each test case in each subtable in the second target test plan table; According to the test script group name of each test case in each sub-table, searching the test command of the test case from the corresponding second test script; In a case where the test command corresponding to each test case in each subtable is consistent with the test command of the test case in the second test script, obtain a first number of test cases and a first number of test script groups, as well as a second number of test cases and a second number of test script groups, wherein the first number of test cases represents the number of test cases in each subtable, the first number of test script groups represents the number of test script groups of the test cases in each subtable, the second number of test cases represents the number of test cases in the second test script, and the second number of test script groups represents the number of test cases in the second test script; When the first number of the test cases and the second number of the test cases are equal, and the first number of the test script groups and the second number of the test script groups are equal, the second test script is used as a target test script of a second target test plan.

12. An automated testing device, characterized in that: The device comprises: An acquisition module, used for acquiring a first target test schedule of a target project; A determination module, configured to generate a first test script according to the first target test schedule; An updating module, configured to update the first target test plan table to obtain a second target test plan table when the first target test plan table is updated, and to update the first test script according to the second target test plan table to obtain a second test script; A cross-check and test module is used to cross-check the second target test plan and the second test script. When the check contents of the second target test plan and the second test script are consistent, the target test script is obtained according to the second test script, and the test is performed according to the target test script.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.