Automatic testing method and device

By obtaining the current test cases and test operation description text of the target program, determining the target test operations, and filtering the target test scripts in the test script dictionary, the complexity and inefficiency of the existing automated testing methods are solved, and an automated testing method that flexibly adapts to the needs of complex testing is realized.

CN119917414APending Publication Date: 2025-05-02GUANGZHOU SEASUN ENTERTAINMENT NETWORK TECHCO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510057498.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Existing automated testing methods require writing a large number of test scripts, which is time-consuming and labor-intensive, and difficult to adapt to complex user interactions and dynamically changing interfaces, limiting the widespread application of automated testing.

Method used

By obtaining the current test cases and test operation description text of the target program, determining the target test operation, and filtering the target test scripts in the test script dictionary to form the target test scripts to achieve automated testing of the target program.

Benefits of technology

Reduces the complexity of generating test scripts, improves the efficiency of generating test scripts under multiple tests, and is suitable for complex testing needs without a lot of programming knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917414A_ABST
    Figure CN119917414A_ABST
Patent Text Reader

Abstract

The invention provides an automatic test method and device.The automatic test method comprises the steps that a current test case and a test operation description text of a target program are obtained, and a target test operation is determined in the test operation description text based on the current test case; according to the target test operation, screening at least one target test script in a test script dictionary corresponding to the test operation description text, and forming a target test script corresponding to the current test case based on each target test script, the test operation description text is obtained on the basis of identifying a test operation screenshot corresponding to a historical test case of the target program; and testing the target program based on the target test script. The target test operation is determined based on the current test case and the test operation description text, and then the target test script is obtained based on the target test operation, so that the complexity of generating the test script is reduced, and the efficiency of generating the test script is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an automated testing method and device. Background Art

[0002] With the rapid development of the software industry, the importance of software testing has become increasingly prominent. Although traditional manual testing methods can find problems in software, they have problems such as low efficiency, high repetitiveness, and easy omissions. In order to improve testing efficiency and quality, automated testing came into being. Automated testing can simulate user operations, repeatedly execute test cases, reduce human errors, and improve test coverage. However, the implementation of automated testing requires writing a large number of test scripts, which is not only time-consuming and labor-intensive, but also requires professional programming skills, which is a huge challenge for testers with non-technical backgrounds.

[0003] In order to solve the above problems, the current solution is to propose a variety of automated testing frameworks and tools to achieve automated testing by writing test scripts. However, these tools usually require testers to have certain programming knowledge, and are difficult to adapt to changing testing requirements when faced with complex user interactions and dynamically changing interfaces and when requirements change. In addition, current automated testing methods often require a lot of manual intervention and script adjustments when dealing with complex business logic and user behavior, which not only increases the complexity of testing, but also limits the widespread application of automated testing.

[0004] Therefore, there is an urgent need for an automated testing method that does not require a lot of programming knowledge and can flexibly adapt to complex testing requirements to solve the above problems. Summary of the invention

[0005] In view of this, the embodiment of the present application provides an automated testing method to solve the technical defects existing in the prior art. The embodiment of the present application also provides an automated testing method, an automated testing device, a computing device, a computer-readable storage medium, and a computer program product.

[0006] According to a first aspect of an embodiment of the present application, there is provided an automated testing method, comprising: Obtaining a current test case and a test operation description text of a target program, and determining a target test operation in the test operation description text based on the current test case, wherein the test operation description text is obtained based on identifying a test operation screenshot corresponding to a historical test case of the target program; Selecting at least one target test script from the test script dictionary corresponding to the test operation description text according to the target test operation, and composing a target test script corresponding to the current test case based on each target test script; The target program is tested based on the target test script.

[0007] According to a second aspect of an embodiment of the present application, there is provided an automated testing device, comprising: A determination module is configured to obtain a current test case and a test operation description text of a target program, and determine a target test operation in the test operation description text based on the current test case, wherein the test operation description text is obtained based on a test operation screenshot corresponding to a historical test case of the target program; A screening module is configured to screen at least one target test script in a test script dictionary corresponding to the test operation description text according to the target test operation, and compose a target test script corresponding to the current test case based on each target test script; A test module is configured to test the target program based on the target test script.

[0008] Optionally, the device further includes a generating module configured to: Get historical test cases of the target program; Testing the target program based on the historical test cases, and monitoring test operation information and test location information during the test process; Intercepting the test interface during the test process according to the test operation information and the test position information to obtain a test operation screenshot; Parsing the test operation screenshot to determine the operation description information corresponding to the test operation screenshot; Based on the operation description information, a test operation description text of the target program is generated.

[0009] Optionally, the device further includes an adjustment module configured to: Obtaining description information format rules based on the test script dictionary settings; The operation description information is adjusted according to the description information format rule to obtain a test operation description text.

[0010] Optionally, the device further comprises a parsing module configured to: Determine a control image library corresponding to the target program; Compare the test operation screenshot with the control images in the control image library to determine the target control image corresponding to the test operation screenshot; The operation identifier corresponding to the target control image is used as the operation description information corresponding to the test operation screenshot.

[0011] Optionally, the screening module is further configured to: Compare the target test operation with each preset test operation in the test script dictionary to determine the preset test operation corresponding to the target test operation; The test script corresponding to the preset test operation is used as the target test script.

[0012] Optionally, the test module is further configured to: Identifying current location information of the target program; Obtain a test sub-script corresponding to the current position information in the target test script, and execute the target program based on the test sub-script.

[0013] Optionally, the device further comprises an update test module configured to: In response to the test case adjustment request, the current test case is adjusted to obtain a target test case; Determine a target test operation in the test operation description text corresponding to the target program based on the target test case; Filtering at least one target test script in the test script field corresponding to the test operation text according to the target test operation, and composing an update test script corresponding to the current test case based on each target test script; The target program is tested based on the updated test script.

[0014] According to a third aspect of an embodiment of the present application, a computing device is provided, including: Memory and processor; The memory is used to store computer executable instructions, and the processor implements the steps of the automated testing method when executing the computer executable instructions.

[0015] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the automated testing method are implemented.

[0016] According to a fifth aspect of an embodiment of the present application, a chip is provided, which stores a computer program, and the computer program implements the steps of the automated testing method when executed by the chip.

[0017] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions, which implement the steps of the above-mentioned automated testing method when executed by a processor.

[0018] The automated testing method provided by the present application obtains the current test case and test operation description text of the target program, and determines the target test operation in the test operation description text based on the current test case; selects at least one target test script in the test script dictionary corresponding to the test operation description text according to the target test operation, and composes the target test script corresponding to the current test case based on each target test script, wherein the test operation description text is obtained based on the test operation screenshot corresponding to the historical test case of the target program; and tests the target program based on the target test script. By determining the target test operation based on the current test case and the test operation description text, and then obtaining the target test script in the test script dictionary based on the target test operation, the complexity of generating the test script is reduced, and the efficiency of generating the test script is improved when the target program needs to be tested multiple times. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a schematic diagram of an automated test scenario provided by an embodiment of the present application; Figure 2 This is a flow chart of an automated test provided by an embodiment of the present application; Figure 3 This is a schematic diagram of an automated monitoring program provided by an embodiment of the present application; Figure 4 This is a schematic diagram of script generation provided by an embodiment of the present application; Figure 5 It is a flowchart of an automated testing method provided by an embodiment of the present application; Figure 6 It is a structural schematic diagram of an automated testing device provided by an embodiment of the present application; Figure 7 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0020] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0021] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0022] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0023] Figure 1 is a schematic diagram of an automated test scenario provided by an embodiment of the present application, such as Figure 1 As shown, Figure 1 The application process of the automated testing method of the present application in the login program testing scenario specifically includes: building an automated monitoring program; having the tester test the login program based on historical test cases, and having the monitoring program monitor the test operation information and test location information of the tester, and taking a screenshot of the test part of the program interface based on preset screenshot rules; comparing the screenshot with each control image in the control image library, and determining the control image "login" with a similarity greater than a threshold as the target control image; using the operation identifier corresponding to the target control image as the test operation information of the control image "login", and generating a test operation text based on at least one determined test operation information.

[0024] After receiving a new round of test requests for the login program, obtain the current test case corresponding to the current login program; based on the current test case, filter the target test operation "click to log in" corresponding to the current test case in the test operation text; based on the target test operation, determine the corresponding test script "login script" in the test script dictionary; based on at least one test script, form a target test script; and perform automated testing on the login program based on the generated target test script.

[0025] The present application is applied to the automated testing method for the login program test. When the login program is tested for the second or multiple times, the target test script can be generated based on the test case and test operation description text corresponding to the current login program without rebuilding the test program; and the automated testing method of the present application does not require programming basics. It only needs to follow the guidance of the test case to conduct the test, and it can easily generate a test script that supports playback test operations, which reduces labor costs and increases the reusability of the script. By automatically capturing the manual operation steps of the tester, the time and workload of manually writing automated test scripts are reduced, and the efficiency of the test is improved. By using image recognition, the test program itself will not be affected, and the work costs caused by methods such as embedding points and plugging piles can be reduced.

[0026] In the present application, an automated testing method is provided. The present application also relates to an automated testing device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0027] See also Figure 2 , Figure 2 A flowchart of an automated test provided according to an embodiment of this specification is shown, which specifically includes the following steps: Step 202: Obtain a current test case and a test operation description text of the target program, and determine a target test operation in the test operation description text based on the current test case, wherein the test operation description text is obtained based on identifying a test operation screenshot corresponding to a historical test case of the target program.

[0028] Specifically, the target program refers to the program that needs to be tested, for example, a shopping program or a game program that needs to be tested, etc.; the test operation description text refers to a collection of operation description texts of the target program in historical tests, for example, testing the login program requires the "click the login button" operation and the "enter user name" operation, then the test operation description text of the login program is composed of the "click the login button" operation and the "enter user name" operation; the current test case refers to the test case used to test the target program again; the target test operation refers to the test operation that needs to be performed on the target program during the test, for example, the target test operations include: "click the update button" operation, "click the login button" operation, etc.

[0029] Based on this, the current test case is obtained to determine the test method for testing the target program; the test operation description text is obtained so that a test script that can perform automated testing on the target program can be generated based on the test operation description text; the test operations required for this test are determined based on the current test case, and the test operations that are consistent with the current test case are determined in the test operation description text based on the current test case as the target test operation.

[0030] For example, the target program can be a game program, and the current test case and test operation description text corresponding to the game program are obtained, wherein the current test case includes a login button test, a game start button test, etc.; based on the current test case, the target test operation is determined in the test operation description text, that is, the test operation corresponding to the login button test and the game start button test is determined in the test operation description text as the target test operation.

[0031] Furthermore, the test operation description text is generated after a test is performed on the target program. Therefore, before using the test operation description text, it is necessary to test the target program in advance to generate the test operation description text.

[0032] That is, before obtaining the current test case and test operation description text of the target program, the historical test case of the target program can be obtained; the target program is tested based on the historical test case, and the test operation information and test location information during the test process are monitored; the test interface during the test process is intercepted according to the test operation information and the test location information to obtain a test operation screenshot; the test operation screenshot is parsed to determine the operation description information corresponding to the test operation screenshot; based on the operation description information, the test operation description text of the target program is generated.

[0033] Specifically, historical test cases refer to test cases that are set for the target program for the first time, or test cases that are set for the target program before the current test case; test operation information refers to test operations performed on the target program based on historical test cases, such as mouse clicks, drags, double clicks, etc.; test location information refers to the location where the test operation is triggered, such as the position coordinates of the mouse click operation in the interface; the test interface refers to the interface that displays the test process of the target program; the test operation screenshot refers to an image captured in the test interface according to preset capture rules, which is used to subsequently determine the specific operations of the test; the operation description information refers to the description information corresponding to the test operation screenshot, for example, a screenshot of the mouse clicking the login button, and the corresponding operation description information is "click the system login button".

[0034] Based on this, an automated monitoring program is pre-built; in the process of testing the target program based on historical test cases, the automated monitoring program monitors the test operation information and test location information generated by the tester during the test process. Based on the test operation information, test location information and preset interception rules, screenshots are taken of the test interface corresponding to different test operations during the test process to obtain at least one test operation screenshot; the operation description information corresponding to each test operation screenshot is determined, and a test operation description text is generated based on each operation description information; in actual applications, such as Figure 3 As shown in a schematic diagram of an automated monitoring program provided in one embodiment of the present application, the automated testing program can be displayed visually, and the tester can control the startup of the automated monitoring program and the export of monitoring data, including clicking on the automated script generation to start automated monitoring and clicking on the export button to export the script file collected through image recognition.

[0035] Continuing with the above example, obtain historical test cases for the game program; test the game program based on the historical test cases, and detect the test operation information and test location information during the test; capture the test interface during the game program testing process based on the test operation information and test location information, and obtain a test operation screenshot; parse the test operation screenshot to obtain the operation description information corresponding to the test operation screenshot, and generate the test operation description text of the target program based on the operation description information.

[0036] Furthermore, the format of the test operation description text can be set according to requirements, that is, non-code texts in different formats can be generated according to requirements, for example, test operation description texts in formats such as excel and json.

[0037] That is, based on the operation description information, a method for generating a test operation description text of the target program may include: obtaining a description information format rule based on the test script dictionary setting; adjusting the operation description information according to the description information format rule to obtain a test operation description text.

[0038] Specifically, a test script dictionary refers to a dictionary containing test operation names and test scripts corresponding to the test operations, and is used to display the correspondence between test operations and test scripts. The test script dictionary is generated based on the test cases that are first set up for the target program; description information format rules refer to pre-set rules for generating test operation description texts, and the description information format rules are set based on the test script dictionary, that is, there is a correspondence between the test operation description text generated based on the description information format rules and the content in the test script dictionary.

[0039] Based on this, during the first test of the target program based on historical test cases, the test operation information and test location information of the tester are monitored and saved, and an automated test script is built based on the detected test operation information and test location information to obtain a test script corresponding to each test operation, and the test operations and the test scripts corresponding to the test operations are stored to obtain a test script dictionary.

[0040] Furthermore, the method of parsing the test operation screenshot and determining the operation description information corresponding to the test operation screenshot may include: determining a control image library corresponding to the target program; comparing the test operation screenshot with the control images in the control image library to determine the target control image corresponding to the test operation screenshot; and using the operation identifier corresponding to the target control image as the operation description information corresponding to the test operation screenshot.

[0041] Specifically, the control image library refers to a database storing control images, and each control image corresponds to an operation identifier, which is used to identify the test operation corresponding to the image, wherein the control image refers to the control image in the interface displayed when the target program is executed, for example, a screenshot of the login button, a screenshot of the close button, etc.; the target control image refers to a control image in the control image library whose similarity with the test operation screenshot is greater than or equal to a preset threshold.

[0042] Based on this, a control image library corresponding to the target program is obtained, and the control images in the control image library are captured during the execution of the target program; at least one captured test operation screenshot is compared with the control images in the control image library, and the control image whose similarity between the test operation screenshot and the control image is greater than or equal to a preset threshold is used as the target control image, and the operation identifier of the target control image is used as the operation description information corresponding to the test operation screenshot.

[0043] Continuing with the above example, determine the control image library corresponding to the game program; compare the test operation screenshots with the control images in the control image library respectively, use the control images with a similarity with the test operation screenshot greater than or equal to a preset threshold as the target control image, and use the operation identifier corresponding to the target control image as the operation description information corresponding to the test operation screenshot.

[0044] To sum up, before obtaining the current test case and test operation description text of the target program, a test operation description text is generated; then, the target operation test is determined in the test operation description text based on the current test case, so that the corresponding test script can be determined based on the target operation test later, thereby avoiding rebuilding the test case based on the current test case and improving the testing efficiency of the target program.

[0045] Step 204: Filter at least one target test script in the test script dictionary corresponding to the test operation description text according to the target test operation, and compose a target test script corresponding to the current test case based on each target test script.

[0046] The test script dictionary contains test operations and test scripts corresponding to preset test operations; the target test script refers to the test script corresponding to the test operation description text in the test script dictionary.

[0047] Furthermore, the method of screening at least one target test script in the test script dictionary corresponding to the test operation description text according to the target test operation may include: comparing the target test operation with each preset test operation in the test script dictionary to determine the preset test operation corresponding to the target test operation; and using the test script corresponding to the preset test operation as the target test script.

[0048] Based on this, the target test operation is compared with the preset test operations in the test script dictionary; in actual applications, the target test operation can be one or more, so it is necessary to compare each target test operation with the preset test operations in the test script dictionary to determine the test script corresponding to the target test operation as the target test script corresponding to the target test operation.

[0049] In practical applications, the process of composing the target test script corresponding to the current test case based on each target test script can be displayed in a visual manner, such as Figure 4 As shown in a script generation diagram provided in an embodiment of the present application, the tester can select the appropriate test operation in the leftmost column according to the test case, such as deleting the directory, closing the game, etc., and then obtain the target test script by clicking on the export script file, or click on the run script to directly test the target program.

[0050] Continuing with the above example, obtain the target test operations contained in the test operation description text of the game program, including target test operation 1 "game startup operation" and target test operation 2 "game login operation"; compare the target test operation with each preset test operation in the test script dictionary, where the test script dictionary contains preset test operation a "game startup operation" and preset test operation b "game login operation"; then the test script corresponding to preset test operation a can be used as the test script for target test operation 1, and the test script corresponding to preset test operation b can be used as the test script for target test operation 2.

[0051] To summarize, by further screening the test scripts corresponding to the target test operation in the test script dictionary according to the target test operation determined in the test operation description text, and then composing the target test script corresponding to the current test case based on the determined test scripts, an automated test script for testing the target program based on the current test case is obtained, thereby avoiding redesigning the automated test script based on the current test case and improving the testing efficiency of the target program.

[0052] Step 206: Testing the target program based on the target test script.

[0053] Furthermore, the method for testing the target program based on the target test script may specifically include: identifying the current position information of the target program; obtaining the test sub-script corresponding to the current position information in the target test script, and executing the target program based on the test sub-script. The current position information refers to the interface position information that needs to be tested and is identified by the target test script during the execution of the target program; the test sub-script refers to the test script corresponding to the current position information.

[0054] Based on this, the target test script identifies the current position information where test operations need to be performed during the execution of the target program, which is equivalent to the simulation tester determining the test position; the target program is executed according to the test sub-script corresponding to the current position information, which is equivalent to the simulation tester performing the test operation.

[0055] Continuing with the above example, after generating the target test script for the game program, the game program is tested based on the target test script, which may specifically include: identifying the current position information in the game program, determining the test sub-script corresponding to the current position information, executing the game program based on the test sub-script, and implementing the test of the game program.

[0056] Furthermore, after the target program is adjusted such as functional improvement or version update, the test cases will also be adjusted accordingly, so the test operation description text can be based on the adjusted test cases and the target program.

[0057] That is, after testing the target program based on the target test script, it can also include: adjusting the current test case in response to a test case adjustment request to obtain a target test case; determining a target test operation in a test operation description text corresponding to the target program based on the target test case; screening at least one target test script in a test script field corresponding to the test operation text according to the target test operation, and composing an updated test script corresponding to the current test case based on each target test script; and testing the target program based on the updated test script.

[0058] Specifically, the target test case refers to a test case after adjusting the current test case, wherein the adjustment includes operations such as adding, deleting, and modifying the test case; the updated test script refers to a script generated based on the target test script for testing the target program.

[0059] It should be noted that before generating a test script based on the target test case, it is necessary to determine whether the target test case has added test operations that were not performed in the first test. If so, it is necessary to adjust the test operation description text and the test script dictionary according to the target test script, add operation tests, and obtain the target test operation description text, thereby avoiding rebuilding the test script based on the new test case. Only the test operation description text and the test script dictionary need to be adjusted, thereby improving the testing efficiency of the target program.

[0060] In summary, the automated testing method of the present application obtains the current test case and test operation description text of the target program, and determines the target test operation in the test operation description text based on the current test case, wherein the test operation description text is obtained based on identifying the test operation screenshot corresponding to the historical test case of the target program; at least one target test script is screened in the test script dictionary corresponding to the test operation description text according to the target test operation, and the target test script corresponding to the current test case is composed based on each target test script; and the target program is tested based on the target test script. By determining the target test operation based on the current test case and the test operation description text, and then obtaining the target test script in the test script dictionary based on the target test operation, the complexity of generating the test script is reduced, and the efficiency of generating the test script is improved when the target program needs to be tested multiple times.

[0061] The following combination Figure 5 Taking the application of the automated testing method provided in this application to a game program as an example, the automated testing method is further described. Figure 5 The following is a flow chart of an automated testing method provided by an embodiment of the present application, which specifically includes the following steps: Step 502: Obtain historical test cases of the game program, test the game program based on the historical test cases, and monitor test operation information and test position information during the test process.

[0062] Specifically, historical test cases refer to test cases used when the game program is tested for the first time.

[0063] Step 504: intercept the test interface during the test process according to the test operation information and the test location information to obtain a test operation screenshot.

[0064] Step 506: Compare the test operation screenshot with the control images in the control image library to determine the target control image corresponding to the test operation screenshot.

[0065] Step 508: Use the operation identifier corresponding to the target control image as the operation description information corresponding to the test operation screenshot.

[0066] Step 510: Adjust the operation description information according to the description information format rule to obtain the test operation description text.

[0067] Step 512: In response to a test request for the game program, obtain a current test case and a test operation description text of the game program, and determine a target test operation in the test operation description text based on the current test case.

[0068] Step 514: Compare the target test operation with each preset test operation in the test script dictionary to determine the preset test operation corresponding to the target test operation.

[0069] Step 516: Use the test script corresponding to the preset test operation as the target test script, and compose the target test script corresponding to the current test case based on each target test script.

[0070] Step 518: Test the game program based on the target test script.

[0071] The automated testing method provided by the present application obtains the current test case and test operation description text of the target program, and determines the target test operation in the test operation description text based on the current test case; selects at least one target test script in the test script dictionary corresponding to the test operation description text according to the target test operation, and composes the target test script corresponding to the current test case based on each target test script, wherein the test operation description text is obtained based on the test operation screenshot corresponding to the historical test case of the target program; and tests the target program based on the target test script. By determining the target test operation based on the current test case and the test operation description text, and then obtaining the target test script in the test script dictionary based on the target test operation, the complexity of generating the test script is reduced, and the efficiency of generating the test script is improved when the target program needs to be tested multiple times.

[0072] Corresponding to the above method embodiment, the present application also provides an automated testing device embodiment, Figure 6 FIG. 1 is a schematic diagram showing the structure of an automated testing device provided by an embodiment of the present application. Figure 6 As shown, the device comprises: The determination module 602 is configured to obtain a current test case and a test operation description text of a target program, and determine a target test operation in the test operation description text based on the current test case, wherein the test operation description text is obtained based on identifying a test operation screenshot corresponding to a historical test case of the target program; A screening module 604 is configured to screen at least one target test script in the test script dictionary corresponding to the test operation description text according to the target test operation, and compose a target test script corresponding to the current test case based on each target test script; The testing module 606 is configured to test the target program based on the target testing script.

[0073] Optionally, the device further includes a generating module configured to: Get historical test cases of the target program; Testing the target program based on the historical test cases, and monitoring test operation information and test location information during the test process; Intercepting the test interface during the test process according to the test operation information and the test position information to obtain a test operation screenshot; Parsing the test operation screenshot to determine the operation description information corresponding to the test operation screenshot; Based on the operation description information, a test operation description text of the target program is generated.

[0074] Optionally, the device further includes an adjustment module configured to: Obtaining description information format rules based on the test script dictionary settings; The operation description information is adjusted according to the description information format rule to obtain a test operation description text.

[0075] Optionally, the device further comprises a parsing module configured to: Determine a control image library corresponding to the target program; Compare the test operation screenshot with the control images in the control image library to determine the target control image corresponding to the test operation screenshot; The operation identifier corresponding to the target control image is used as the operation description information corresponding to the test operation screenshot.

[0076] Optionally, the screening module is further configured to: Compare the target test operation with each preset test operation in the test script dictionary to determine the preset test operation corresponding to the target test operation; The test script corresponding to the preset test operation is used as the target test script.

[0077] Optionally, the test module is further configured to: Identifying current location information of the target program; Obtain a test sub-script corresponding to the current position information in the target test script, and execute the target program based on the test sub-script.

[0078] Optionally, the device further comprises an update test module configured to: In response to the test case adjustment request, the current test case is adjusted to obtain a target test case; Determine a target test operation in the test operation description text corresponding to the target program based on the target test case; Filtering at least one target test script in the test script field corresponding to the test operation text according to the target test operation, and composing an update test script corresponding to the current test case based on each target test script; The target program is tested based on the updated test script.

[0079] The automated testing device provided by the present application includes a determination module configured to obtain the current test case and test operation description text of the target program, and determine the target test operation in the test operation description text based on the current test case, wherein the test operation description text is obtained based on a test operation screenshot corresponding to a historical test case of the target program; a screening module configured to screen at least one target test script in the test script dictionary corresponding to the test operation description text according to the target test operation, and compose the target test script corresponding to the current test case based on each target test script; and a testing module configured to test the target program based on the target test script. By determining the target test operation based on the current test case and the test operation description text, and then obtaining the target test script in the test script dictionary based on the target test operation, the complexity of generating the test script is reduced, and the efficiency of generating the test script is improved when the target program needs to be tested multiple times.

[0080] The above is a schematic scheme of an automated testing device of the present embodiment. It should be noted that the technical scheme of the automated testing device and the technical scheme of the automated testing method described above belong to the same concept. For details not described in detail in the technical scheme of the automated testing device, please refer to the description of the technical scheme of the automated testing method described above. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method, and each functional module is not an actual functional division or separation definition. The device claim defined by such a group of functional modules should be understood as a functional module architecture that mainly implements the solution through a computer program recorded in the specification, and should not be understood as a physical device that mainly implements the solution through hardware.

[0081] Figure 7 The structure block diagram of a computing device 700 provided according to an embodiment of the present application is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.

[0082] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0083] In one embodiment of the present application, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0084] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 700 may also be a mobile or stationary server.

[0085] The processor 720 is used to execute computer executable instructions of the game character hosting method.

[0086] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned automated testing method belong to the same concept, and the details of the technical scheme of the computing device not described in detail can be found in the description of the technical scheme of the above-mentioned automated testing method.

[0087] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which are used in an automated testing method when executed by a processor.

[0088] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned automated testing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned automated testing method.

[0089] An embodiment of the present application further provides a chip storing a computer program, which implements the steps of the automated testing method when executed by the chip.

[0090] An embodiment of the present specification also provides a computer program product, including a computer program or instructions, which implement the steps of the above-mentioned automated testing method when executed by a processor.

[0091] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned automated testing method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above-mentioned automated testing method.

[0092] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0093] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0094] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0095] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0096] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. An automated testing method, characterized in that: include: Obtaining a current test case and a test operation description text of a target program, and determining a target test operation in the test operation description text based on the current test case, wherein the test operation description text is obtained based on identifying a test operation screenshot corresponding to a historical test case of the target program; Selecting at least one target test script from the test script dictionary corresponding to the test operation description text according to the target test operation, and composing a target test script corresponding to the current test case based on each target test script; The target program is tested based on the target test script.

2. The automated testing method according to claim 1, characterized in that: Before obtaining the current test case and test operation description text of the target program, it also includes: Get historical test cases of the target program; Testing the target program based on the historical test cases, and monitoring test operation information and test location information during the test process; Intercepting the test interface during the test process according to the test operation information and the test position information to obtain a test operation screenshot; Parsing the test operation screenshot to determine the operation description information corresponding to the test operation screenshot; Based on the operation description information, a test operation description text of the target program is generated.

3. The automated testing method according to claim 2, characterized in that: Generating a test operation description text of the target program based on the operation description information includes: Obtaining description information format rules based on the test script dictionary settings; The operation description information is adjusted according to the description information format rule to obtain a test operation description text.

4. The automated testing method according to claim 2, characterized in that: Parsing the test operation screenshot to determine the operation description information corresponding to the test operation screenshot includes: Determine a control image library corresponding to the target program; Compare the test operation screenshot with the control images in the control image library to determine the target control image corresponding to the test operation screenshot; The operation identifier corresponding to the target control image is used as the operation description information corresponding to the test operation screenshot.

5. The automated testing method according to claim 1, characterized in that: Selecting at least one target test script from a test script dictionary corresponding to the test operation description text according to the target test operation includes: Compare the target test operation with each preset test operation in the test script dictionary to determine the preset test operation corresponding to the target test operation; The test script corresponding to the preset test operation is used as the target test script.

6. The automated testing method according to claim 1, characterized in that: Testing the target program based on the target test script includes: Identifying current location information of the target program; Obtain a test sub-script corresponding to the current position information in the target test script, and execute the target program based on the test sub-script.

7. The automated testing method according to claim 1, characterized in that: After testing the target program based on the target test script, the method further includes: In response to the test case adjustment request, the current test case is adjusted to obtain a target test case; Determine a target test operation in the test operation description text corresponding to the target program based on the target test case; Filtering at least one target test script in the test script field corresponding to the test operation text according to the target test operation, and composing an update test script corresponding to the current test case based on each target test script; The target program is tested based on the updated test script.

8. An automated testing device, characterized in that: include: A determination module is configured to obtain a current test case and a test operation description text of a target program, and determine a target test operation in the test operation description text based on the current test case, wherein the test operation description text is obtained based on a test operation screenshot corresponding to a historical test case of the target program; A screening module is configured to screen at least one target test script in a test script dictionary corresponding to the test operation description text according to the target test operation, and compose a target test script corresponding to the current test case based on each target test script; A test module is configured to test the target program based on the target test script.

9. A computing device, characterized in that include: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to implement the steps of the automated testing method according to claims 1-7.

10. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by the processor, the steps of the automated testing method described in claims 1-7 are implemented.

11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the automated testing method according to claims 1-7 are implemented.