Software testing method, device, system, equipment and storage medium

By grouping and parallel execution of test case script sets, the problem of time-consuming and high coupling caused by the large number of test cases in the prior art is solved, and efficient software testing is achieved.

CN112463574BActive Publication Date: 2025-03-21BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910843765.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-06
Publication Date
2025-03-21
Estimated Expiration
2039-09-06

AI Technical Summary

Technical Problem

Existing software testing methods take a long time when there are many test cases, and the next test case script cannot be executed after the execution of the previous test case script fails, resulting in inefficiency in testing.

Method used

Multiple test case script collections are generated by obtaining multiple target test case scripts of the software to be tested and grouping them according to preset grouping rules and the number of available test ends. These collections are then sent to the client, assigned to the corresponding available test ends, and executed in parallel.

Benefits of technology

It realizes parallel execution of multiple test case scripts, shortens software testing time, improves testing efficiency, and reduces the coupling between test case scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112463574B_ABST
    Figure CN112463574B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a software testing method, device, system, equipment and storage medium. The method includes: obtaining multiple target test case scripts of the software to be tested, wherein each target test case script is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed; grouping each target test case script according to the preset grouping rule and the number of available test terminals to obtain multiple test case script sets; sending each test case script set to the client, so that the client assigns each test case script set to the corresponding available test terminal, so as to execute the corresponding test case script set in parallel in each available test terminal. Through the technical solution of the embodiment of the present invention, the testing efficiency of the software can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of Internet technology, and in particular to a software testing method, apparatus, system, device and storage medium. Background Art

[0002] With the continuous development of mobile terminals such as mobile phones, more and more software are installed on the terminals, and the speed of software updates and iterations is getting faster and faster to meet the growing needs of users.

[0003] Usually, after software development or version update, the software functions need to be tested to ensure that the software can run normally and stably. In the process of testing software functions, testers often test software functions through test cases. Test cases are a set of test inputs, execution conditions, and expected results compiled for a specific goal in order to test a program path or verify whether a specific requirement is met.

[0004] Currently, when using multiple test cases to test software, since each test case has a certain correlation, it is necessary to execute multiple test case scripts in series.

[0005] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0006] When the number of test cases is large, the existing software testing method takes a long time, and the next test case script cannot be executed after the previous test case script fails to execute, which greatly reduces the testing efficiency. Summary of the invention

[0007] The embodiments of the present invention provide a software testing method, apparatus, system, device and storage medium to improve the testing efficiency of software.

[0008] In a first aspect, an embodiment of the present invention provides a software testing method, which is applied to a server, comprising:

[0009] Obtain multiple target test case scripts of the software to be tested, wherein each of the target test case scripts is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement falling back to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;

[0010] According to the preset grouping rules and the number of available test terminals, each of the target test case scripts is grouped to obtain multiple test case script sets;

[0011] Each of the test case script sets is sent to a client, so that the client allocates each of the test case script sets to a corresponding available test end, so as to execute the corresponding test case script set in parallel in each of the available test ends.

[0012] In a second aspect, an embodiment of the present invention further provides a software testing method, which is applied to a client and includes:

[0013] Receive multiple test case script sets sent by the server; wherein each of the test case script sets contains at least one target test case script, and each of the target test case scripts is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;

[0014] Determine the available test terminals corresponding to each of the test case script sets, and send each of the test case script sets to the corresponding available test terminals according to the terminal information corresponding to each of the available test terminals, so as to execute the corresponding test case script sets in parallel in each of the available test terminals.

[0015] In a third aspect, an embodiment of the present invention further provides a software testing device, which is arranged at a server end and includes:

[0016] A target test case script acquisition module is used to acquire multiple target test case scripts of the software to be tested, wherein each of the target test case scripts is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;

[0017] A target test case script grouping module groups each of the target test case scripts according to a preset grouping rule and the number of available test terminals to obtain a plurality of test case script sets;

[0018] The test case script set sending module is used to send each of the test case script sets to the client, so that the client allocates each of the test case script sets to the corresponding available test terminals, so as to execute the corresponding test case script sets in parallel in each of the available test terminals.

[0019] In a fourth aspect, an embodiment of the present invention further provides a software testing device, which is arranged on a client, and includes:

[0020] A test case script set receiving module, used to receive multiple test case script sets sent by a server; wherein each of the test case script sets contains at least one target test case script, and each of the target test case scripts is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;

[0021] The test case script set sending module is used to determine the available test terminals corresponding to each of the test case script sets, and send each of the test case script sets to the corresponding available test terminals according to the terminal information corresponding to each of the available test terminals, so as to execute the corresponding test case script sets in parallel in each of the available test terminals.

[0022] In a fifth aspect, an embodiment of the present invention further provides a software testing system, the system comprising a server, a client, and at least one available test terminal; wherein:

[0023] The server is used to implement the software testing method steps provided in the first aspect;

[0024] The client is used to implement the software testing method steps provided in the second aspect.

[0025] In a sixth aspect, an embodiment of the present invention further provides a server, the server comprising:

[0026] one or more processors;

[0027] A memory for storing one or more programs;

[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement the software testing method steps provided in the first aspect.

[0029] In a seventh aspect, an embodiment of the present invention further provides a terminal device, the terminal device comprising:

[0030] one or more processors;

[0031] A memory for storing one or more programs;

[0032] When the one or more programs are executed by the one or more processors, the one or more processors implement the software testing method steps provided in the second aspect.

[0033] In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the software testing method provided in the first aspect.

[0034] In a ninth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the software testing method provided in the second aspect.

[0035] The embodiments of the above invention have the following advantages or beneficial effects:

[0036] By generating the corresponding target test case script in advance according to each target test case and the fallback preset page function data, so that before executing the target test case in each target test case script, you can fall back to the preset page of the software to be tested containing the corresponding test entry of the target test case script, so that the corresponding target test case can be executed smoothly, so that when the previous target test case script is executed abnormally, the next target test case script can also be executed smoothly, reducing the coupling between each target test case script and improving the independence of the target test case script. Based on this, this embodiment can group all target test case scripts according to the preset grouping rules, so that multiple available test terminals can be used to execute the corresponding test case script set in parallel, realizing fragmented execution, overcoming the time-consuming problem caused by the serial execution of all test cases, and achieving the technical effect of shortening the software testing time and improving the testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a flowchart of a software testing method provided by Embodiment 1 of the present invention;

[0038] Figure 2 is a flowchart of a software testing method provided by Embodiment 2 of the present invention;

[0039] Figure 3 is a flowchart of a software testing method provided by Embodiment 3 of the present invention;

[0040] Figure 4 is a flowchart of a software testing method provided by Embodiment 4 of the present invention;

[0041] Figure 5 is a structural diagram of a software testing device provided by Embodiment 5 of the present invention;

[0042] Figure 6 is a structural diagram of a software testing device provided by Embodiment 6 of the present invention;

[0043] Figure 7is a structural diagram of a software testing system provided by Embodiment 7 of the present invention;

[0044] Figure 8 It is a structural diagram of a server provided by Embodiment 8 of the present invention;

[0045] Fig. 9 It is a structural diagram of a terminal device provided in Embodiment 9 of the present invention. DETAILED DESCRIPTION

[0046] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0047] Embodiment 1

[0048] Figure 1 This is a flowchart of a software testing method provided in the first embodiment of the present invention. This embodiment is applicable to the case of testing multiple functions of software. The method can be executed by a software testing device set on the server side. The device can be implemented by software and / or hardware and integrated in the data processing server. Figure 1 As shown, the method specifically comprises the following steps:

[0049] S110. Obtain multiple target test case scripts of the software to be tested, wherein each target test case script is generated according to the target test case and the rollback preset page function data, and the rollback preset page function data is used to implement the rollback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed.

[0050] Among them, the target test case script refers to a script that can execute the target test case. The preset page of the software to be tested refers to the page where the test entry corresponding to the target test case script is located. In this embodiment, the preset page of the software to be tested corresponding to each target test case can be the same or different. Exemplarily, the preset page of the software to be tested can be the homepage or other hierarchical page of the software to be tested, which can be specifically predetermined according to the test entry corresponding to the target test case. The current target test case script can refer to the target test case script that needs to be executed at the current moment. The rollback preset page function data can be used to roll back from the current test page to the preset page of the software to be tested corresponding to the current target test case script before the target test case in the current target test case script is executed. The rollback preset page function data in this embodiment can be encapsulated as a rollback function, so that the function of rolling back the corresponding preset page can be quickly realized by calling the rollback function.

[0051] Specifically, each software function in the software to be tested can be tested using a test case. The present embodiment can generate corresponding test case scripts in advance based on the test case and the fallback preset page function data. If there are multiple versions of the software to be tested, multiple test case scripts corresponding to each software version can be uploaded to the version management system so that each test case script is stored in the corresponding software version address, so that each test case script can be version managed. The version management system can be but is not limited to SVN (Subversion, version control system) or Git (distributed version control system). The present embodiment can obtain multiple pre-stored target test case scripts according to the version address or package name of the software to be tested.

[0052] It should be noted that if the test entry corresponding to the target test case script does not exist in the current test page, the target test case cannot be executed in the current test page, so it is necessary to fall back to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed. Exemplarily, if the software to be tested is a shopping software, and a certain target test case is used to test whether the rush purchase module in the homepage of the shopping software can run normally, then the test entry corresponding to the target test case script is the rush purchase module in the homepage, so that before executing the target test script, it is necessary to return to the homepage of the shopping software so that the target test case can be smoothly executed from the rush purchase module. This embodiment adds the rollback preset page function data in each target test case script in advance, so that when the previous target test case script is executed abnormally, it will not affect the smooth execution of the next target test case script, thereby reducing the coupling between each target test case script and improving the independence of the target test case script.

[0053] S120. Group each target test case script according to a preset grouping rule and the number of available test terminals to obtain a plurality of test case script sets.

[0054] Among them, the preset grouping rule refers to the rule based on which all target test case scripts are grouped. Exemplarily, the preset grouping rule can be a rule that predefines the number of test case scripts included in each script set; it can also be a rule that specifies which test case scripts should be specifically included in each script set; it can also be a rule for random grouping. An available test terminal refers to a terminal that can be used to execute a target test case script, such as a smart phone, tablet computer, etc. It should be noted that the available test terminal needs to pre-install the software to be tested, and the available test terminal is in developer debugging mode so that the corresponding target test case script can be executed. A test case script set is a set consisting of at least one target test case script.

[0055] Specifically, this embodiment can determine the number of available test terminals corresponding to the software to be tested according to a preset test protocol, wherein the preset test protocol can be pre-set according to actual conditions and user needs, and is used to specify the number of available test terminals corresponding to each software or software version, so that the server and the client can quickly test the software to be tested. This embodiment can also obtain the current number of available test terminals by receiving the number of available test terminals sent by the client in real time. Exemplarily, the client can detect the number of available test terminals currently connected to the client in real time, and then send the detected number of available test terminals to the server in real time, so that the server can group all available test terminals currently connected to the client to improve resource utilization, thereby further improving test efficiency.

[0056] In this embodiment, each target test case script does not affect each other and is independent of each other, so all target test case scripts can be grouped based on preset grouping rules. If the preset grouping rules have specified the number of test case scripts included in each set or which test case scripts should be included in each set, all target test case scripts can be grouped according to the preset grouping rules, and each group can be determined as a test case script set, so that multiple test case script sets can be obtained.

[0057] S130: Send each test case script set to the client, so that the client allocates each test case script set to a corresponding available test terminal, so as to execute the corresponding test case script set in parallel in each available test terminal.

[0058] The client may refer to a terminal that sends each test case script set to a corresponding available test terminal, such as a PC (personal computer). The client in this embodiment is pre-connected to the available test terminal by wire or wireless, such as the available test terminal is connected to the client via a USB (Universal Serial Bus).

[0059] Specifically, the server sends the grouped test case script sets to the client. The client can assign each test case script set to a corresponding available test terminal according to the received test case script sets, and simultaneously send each test case script set to the corresponding available test terminal according to the terminal information of each available test terminal, so that multiple available test terminals can execute the sent test case script sets in parallel. Compared with the prior art of using one available test terminal to serially execute all test case scripts, the test time is greatly shortened, thereby improving the test efficiency.

[0060] The technical solution of this embodiment generates a corresponding target test case script in advance according to each target test case and the fallback preset page function data, so that before executing the target test case in each target test case script, it can fall back to the preset page of the software to be tested containing the test entry corresponding to the target test case script, so that the corresponding target test case can be executed smoothly, so that when the previous target test case script is executed abnormally, the next target test case script can also be executed smoothly, reducing the coupling between each target test case script and improving the independence of the target test case script. Based on this, this embodiment can group all target test case scripts according to the preset grouping rules, so that the corresponding test case script set can be executed in parallel using multiple available test terminals, realizing fragmented execution, overcoming the time-consuming problem caused by the serial execution of all test cases, and achieving the technical effect of shortening the software testing time and improving the testing efficiency.

[0061] Embodiment 2

[0062] Figure 2 This is a flowchart of a software testing method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment optimizes "grouping each target test case script according to a preset grouping rule and the number of available test terminals to obtain multiple test case script sets". The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0063] See also Figure 2 The software testing method provided in this embodiment specifically includes the following steps:

[0064] S210. Obtain multiple target test case scripts of the software to be tested, wherein each target test case script is generated according to the target test case and the rollback preset page function data, and the rollback preset page function data is used to implement rolling back to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed.

[0065] S220. Use the number of available test terminals sent by the client as the total number of the set.

[0066] Specifically, when determining the number of available test terminals currently connected to the client, the client can send the current number of available test terminals to the server. The server can directly determine the number of available test terminals sent by the client as the total number of sets, so that a script set can be assigned to each available test terminal, so that all available test terminals can be used to perform parallel testing on the software to be tested, further shortening the test time of the software to be tested and further improving the test efficiency.

[0067] S230, randomly grouping each target test case script according to the total number of sets, and determining each test case script set according to the random grouping result.

[0068] The test case script set includes at least one target test case script.

[0069] Specifically, since each visual test case script is independent of each other, all target test case scripts can be randomly grouped based on the total number of sets, so that each test case script set can be determined according to the random grouping result, and the number of scripts in each test case script set can be the same or different. This embodiment makes software testing more flexible by randomly grouping all target test case scripts, which helps to discover more test problems and further improve the test quality.

[0070] Exemplarily, assuming the total number of sets is 10, a part of all target test case scripts can be randomly selected as the first group, i.e., the first test case script set, and then a part of the remaining target test case scripts can be randomly selected as the second group, i.e., the second test case script set, and so on, until the remaining target test case scripts are taken as the tenth test case script set, thereby 10 test case script sets can be randomly obtained.

[0071] S240: Send each test case script set to the client, so that the client allocates each test case script set to a corresponding available test terminal, so as to execute the corresponding test case script set in parallel in each available test terminal.

[0072] The technical solution of this embodiment directly determines the current number of available test terminals sent by the client as the total number of sets, so that all currently available test terminals can be used to perform parallel testing on the software to be tested, further shortening the test time and improving the test efficiency. In addition, by randomly grouping all target test case scripts, software testing is made more flexible, which helps to discover more test problems and further improve the test quality.

[0073] Based on the above technical solution, S230 may include: determining the number of scripts contained in each set based on the total number of target test case scripts and the total number of sets, wherein the number of scripts contained in any two sets is equal or differs by 1; randomly grouping the target test case scripts based on the number of scripts contained in each set, and determining each test case script set based on the random grouping results.

[0074] Specifically, if the total number of target test case scripts is an integer multiple of the total number of sets, all target test case scripts can be grouped evenly, that is, the number of scripts contained in each set is equal. If the total number of target test case scripts is not an integer multiple of the total number of sets, all target test case scripts can be grouped relatively evenly, that is, the number of scripts contained in each set is equal or differs by 1. For example, if the total number of sets is 10 and the total number of target test case scripts is 99, it can be determined that 9 of the 10 sets contain 10 scripts and the other 1 set contains 9 scripts, thereby achieving relatively even grouping. Through average or relatively even grouping, the number of target test case scripts executed by each available test end in the corresponding test case script set can be equal or differ by 1, so that the testing of all target test case scripts can be completed in the shortest time, further improving the testing efficiency.

[0075] This embodiment can randomly select target test case scripts of each script number from all target test case scripts in turn based on the number of scripts contained in each set to form a corresponding test case script set. For example, if the number of scripts contained in a certain set is 10, 10 scripts can be randomly selected from the target test case scripts that are not currently selected as a group, that is, as a test case script set. It should be noted that since each target test case script is not related to each other, the arrangement order of the target test case scripts in each test case script set can be any random order. In other words, when a certain available test end executes each target test case script in the assigned test case script set, it can be executed serially in any order, which greatly improves the flexibility of the test.

[0076] On the basis of the above technical solution, a target test case script is generated according to the target test case and the fallback preset page function data, which may include: generating a basic test case script according to the target test case, and determining the fallback preset page function data corresponding to the test operating system of the available test end; adding the fallback preset page function data at the start position of the operation in the basic test case script, and determining the added basic test case script as the target test case script.

[0077] Among them, the basic test case script refers to the operation instructions that the tester needs to input during the program testing process, and the corresponding script generated. The test operating system of the available test terminal can be but is not limited to the Android system and the Apple iOS system. In this embodiment, the test operating system of each available test terminal is the same, so that the performance of the software to be tested under a certain operating system can be detected. Different test operating systems correspond to different fallback preset page function data.

[0078] Specifically, for each target test case script, the present embodiment can generate a corresponding basic test case script according to a pre-written target test case. The fallback preset page function data corresponding to the test operating system of the available test end can be determined according to the corresponding relationship between the operating system and the fallback preset page function data. The determined fallback preset page function data is added to the running start position in the basic test case script to generate the corresponding target test case script. If the fallback preset page function data is encapsulated as a fallback function, the call code corresponding to the fallback function can also be added to the running start position in the basic test case script to perform a fallback operation by calling the fallback function before the target test case is executed. In the present embodiment, the fallback preset page function data is executed before the basic test case script is executed, so that after falling back to the preset page of the software to be tested, the basic test case script can be smoothly executed, that is, the target test case is executed, so that each target test case script does not affect each other, so as to perform parallel testing.

[0079] On the basis of the above technical solution, the function data of rolling back to the preset page can be realized by the following steps to roll back to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed:

[0080] Check whether the current test page contains the preset page elements corresponding to the current target test case script; if not, roll back one page level according to the rollback method corresponding to the test operating system of the available test terminal, and update the test page after rolling back one page level to the current test page; return to execute the operation of checking whether the current test page contains the preset page elements corresponding to the current target test case script, and terminate when the current test page contains the preset page elements.

[0081] Among them, the preset page element may refer to any page identifier in the preset page that is different from other test pages, so that different test pages can be distinguished according to the preset page elements. Exemplarily, the test entry identifier corresponding to the current target test case script can be used as the corresponding preset page element. Each test page corresponds to a page level. For example, the software homepage corresponds to the first-level page; the test page entered by clicking on the function module in the software homepage belongs to the second-level page, the test page entered by clicking on the second-level page belongs to the third-level page, and so on. The fallback method refers to the method of returning to the previous level page. Different test operating systems may correspond to different fallback methods.

[0082] Specifically, this embodiment determines whether the current test page is a preset page by detecting whether the current test page contains the preset page element corresponding to the current target test case script. If the current test page does not contain the preset page element, it indicates that the current test page does not contain the test entry corresponding to the current target test case script, that is, it is not a preset page. At this time, according to the rollback method corresponding to the test operating system of the available test end, a page level can be rolled back to return to the previous test page, and the current test page can be updated to the test page after the rollback. After updating the current test page, the next loop can be entered to detect whether the updated current test page contains the preset page element. When the current test page contains the preset page element, it can be determined that the current test page is the preset page of the software to be tested that contains the test entry corresponding to the current target test case script. At this time, the rollback operation can be terminated, so that the target test case can be smoothly executed in the current test page. This embodiment can accurately roll back to the preset page of the software to be tested by rolling back layer by layer and detecting layer by layer, avoiding the situation of exiting the software when performing multi-layer rollback at one time.

[0083] On the basis of the above technical solution, according to the rollback method corresponding to the test operating system of the available test terminal, roll back one page level, including: if the test operating system of the available test terminal is the Android system, then roll back one page level by triggering the return key once; if the test operating system of the available test terminal is the Apple iOS system, then roll back one page level by sliding the screen once.

[0084] Specifically, different test operating systems have different corresponding rollback methods. When the test operating system of the available test end is the Android system, you can return to the previous test page by triggering the back key once, that is, roll back one page level. When the test operating system of the available test end is the Apple iOS system, since there is no back key setting, you can return to the previous test page by swiping the screen to the right once, so that the rollback operation can be quickly implemented based on different test operating systems.

[0085] Embodiment 3

[0086] Figure 3 This is a flowchart of a software testing method provided in the third embodiment of the present invention. This embodiment is applicable to the case of testing multiple functions of the software. The method can be executed by a software testing device set on the client. The device can be implemented by software and / or hardware and integrated in the PC. Figure 3 As shown, the method specifically comprises the following steps:

[0087] S310. Receive multiple test case script sets sent by the server; wherein each test case script set contains at least one target test case script, and each target test case script is generated according to the target test case and the rollback preset page function data, and the rollback preset page function data is used to implement the rollback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed.

[0088] Among them, the target test case script refers to a script that can execute the target test case. The preset page of the software to be tested refers to the page where the test entry corresponding to the target test case script is located. In this embodiment, the preset page of the software to be tested corresponding to each target test case can be the same or different. Exemplarily, the preset page of the software to be tested can be the homepage or other level page of the software to be tested, which can be specifically predetermined according to the test entry corresponding to the target test case. The current target test case script can refer to the target test case script that needs to be executed at the current moment. The rollback preset page function data can be used to roll back from the current test page to the preset page of the software to be tested corresponding to the current target test case script before the target test case in the current target test case script is executed.

[0089] Specifically, the server may group the acquired target test case scripts according to preset grouping rules and the number of available test terminals, and send the obtained multiple test case script sets to the client, so that the client may receive the multiple test case script sets.

[0090] It should be noted that in this embodiment, each target test case script contained in each test case script set has added rollback preset page function data, so that before each test case is executed, it will roll back to the corresponding preset page of the software to be tested. Therefore, when the previous target test case script is executed abnormally, it will not affect the smooth execution of the next target test case script, thereby reducing the coupling between each target test case script and improving the independence of the target test case script.

[0091] S320, determining the available test terminals corresponding to each test case script set, and sending each test case script set to the corresponding available test terminal according to the terminal information corresponding to each available test terminal, so as to execute the corresponding test case script set in parallel in each available test terminal.

[0092] Among them, the available test end refers to a terminal that can be used to execute the target test case script, such as a smart phone, a tablet computer, etc. The available test end in this embodiment needs to pre-install the software to be tested, and the available test end is in developer debugging mode so that the corresponding target test case script can be executed. The terminal information corresponding to each available test end may include but is not limited to the IP (Internet Protocol, a protocol for interconnection between networks) address and port information of the terminal.

[0093] Specifically, this embodiment can randomly assign an available test terminal to each test case script set, or can determine the available test terminal corresponding to each test case script set based on the correspondence between the set identifier and the available test terminal identifier in the preset allocation rule. According to the terminal information corresponding to each available test terminal, the test case script set is sent to the corresponding available test terminal, so that the sent test case script set can be executed in parallel on multiple available test terminals. For each available test terminal, when executing each visual test case script in the test case script set, each target test case script in the set can be executed serially in any execution order, which improves the flexibility of the test, helps to discover more test problems, and improves the test quality.

[0094] The technical solution of this embodiment distributes each received test case set to the corresponding available test terminal, so that the corresponding test case script set can be executed in parallel by using multiple available test terminals, and when the available test terminal executes each issued target test case script, it first executes the corresponding fallback preset page function data to fall back to the preset page of the software to be tested containing the test entry corresponding to the target test case script, so that the corresponding target test case can be executed smoothly, and when the previous target test case script is executed abnormally, the next target test case script can also be executed smoothly, thereby reducing the coupling between each target test case script, and overcoming the time-consuming problem caused by the serial execution of all test cases through sharding execution, thereby achieving the technical effect of shortening the software testing time and improving the testing efficiency.

[0095] On the basis of the above technical solution, S320 may include: compiling each test case script set with the terminal information of the corresponding available test end to generate a test configuration file; executing each test configuration file to send the test case script set in each test configuration file to the corresponding available test end, so as to execute the corresponding test case script set in parallel in each available test end.

[0096] Specifically, for each test case script set, the test case script set and the terminal information of the corresponding available test end can be compiled to generate a test configuration file, such as a Testng.xml file. By executing the Testng.xml file corresponding to each test case script set, the test case script set in each Testng.xml file can be quickly and conveniently sent to the corresponding available test end, so that each available test end can concurrently execute the sent test case script set, greatly shortening the test time.

[0097] On the basis of the above technical solution, before S320, it can also include: monitoring the connection status of each test terminal to determine each connection test terminal connected to the client; according to the operating system version information of each connection test terminal, determining each connection test terminal whose operating system version information is preset version information as each available test terminal.

[0098] The operating system version information of the connection test terminal may refer to the version number of the test operating system currently installed on the connection test terminal, such as Android 6.0, Android 8.0, etc. The preset version information refers to a pre-specified operating system version number in order to test the performance of the software under a specific operating system version number.

[0099] Specifically, the client can monitor the connection status of each test terminal with the client in real time, and determine the test terminal currently connected to the client as the connection test terminal. When there is no need to consider the operating system version number of the test terminal, each connection test terminal can be directly determined as an available test terminal. If the performance of a specific operating system version number is verified, it is necessary to determine each connection test terminal whose operating system version information is a preset version information as each available test terminal. The client in this embodiment can send the number of available test terminals to the server after determining each available test terminal, so that the server can group according to the current number of available test terminals sent by the client to improve the utilization rate of the available test terminals, further shorten the test time, and improve the test efficiency.

[0100] Embodiment 4

[0101] Figure 4 This is a flowchart of a software testing method provided in Embodiment 4 of the present invention. This embodiment provides a preferred example based on the above embodiments. Explanations of terms that are the same or corresponding to the above embodiments are not repeated here.

[0102] See also Figure 4 The software testing method provided in this embodiment specifically includes the following steps:

[0103] S410, the server obtains multiple target test case scripts corresponding to the version address of the software to be tested from the version management system, wherein the target test case scripts are pre-generated according to the target test case and the fallback preset page function data.

[0104] Specifically, by obtaining multiple target test case scripts corresponding to the address of the software version to be tested, it is possible to test whether multiple software functions under a certain software version to be tested meet the requirements.

[0105] S420: The client monitors the connection status of each test terminal and sends the current number of available test terminals to the server.

[0106] Specifically, the client monitors in real time whether each test terminal is connected to the client, and uses the test terminal currently connected to the client as an available test terminal, so as to count the number of available test terminals at the current moment. In this embodiment, the available test terminals are pre-installed with software of the software version to be tested.

[0107] It should be noted that the execution order of steps S410 and S420 is not limited here. For example, step S410 may be executed first and then step S420; or step S420 may be executed first and then step S410.

[0108] S430. The server randomly groups each target test case script according to the received number of available test terminals, and determines each test case script set according to the random grouping result.

[0109] Specifically, the server can directly determine the number of available test terminals sent by the client as the total number of the set, so that all currently available test terminals can be used to perform parallel testing on the software to be tested, further shortening the test time. And because each visual test case script is independent of each other, all target test case scripts can be randomly grouped, and each group can be determined as a test case script set. By randomly grouping all target test case scripts, the server increases the flexibility of software testing, facilitates the discovery of more test problems, and further improves the test quality.

[0110] S440, the client downloads each test case script set, determines the available test end corresponding to each test case script set, and compiles each test case script set with the terminal information of the corresponding available test end to generate a Testng.xml file.

[0111] Specifically, the client obtains each test case script set in the server by downloading, and can allocate an available test end for each test case script set according to a preset allocation rule, or can randomly allocate an available test end for each test case script set so that the test case script set corresponds to the available test end one by one.

[0112] S450: The client executes each Testng.xml file to send the test case script set in each Testng.xml file to the corresponding available test terminal.

[0113] S460. Each available test terminal executes the target test case script in the issued test case script set.

[0114] The technical solution of this embodiment can execute multiple target test case scripts corresponding to the version address of the software to be tested in segments through the interactive processing process among the server, the client and the available test end, which greatly shortens the test time of the software to be tested and improves the test efficiency. In addition, by randomly grouping all target test case scripts, software testing is made more flexible, which helps to discover more test problems and further improve the test quality.

[0115] Embodiment 5

[0116] Figure 5 This is a structural diagram of a software testing device provided in Example 5 of the present invention. This embodiment is applicable to the situation where multiple functions of the software are tested. The device is arranged on the server side and specifically includes: a target test case script acquisition module 510, a target test case script grouping module 520 and a test case script collection sending module 530.

[0117] Among them, the target test case script acquisition module 510 is used to obtain multiple target test case scripts of the software to be tested, wherein each target test case script is generated according to the target test case and the rollback preset page function data, and the rollback preset page function data is used to realize that before the target test case in the current target test case script is executed, it rolls back to the preset page of the software to be tested containing the test entry corresponding to the current target test case script; the target test case script grouping module 520 groups each target test case script according to the preset grouping rules and the number of available test terminals to obtain multiple test case script sets; the test case script set sending module 530 is used to send each test case script set to the client, so that the client allocates each test case script set to the corresponding available test terminal, so as to execute the corresponding test case script set in parallel in each available test terminal.

[0118] The technical solution of this embodiment generates a corresponding target test case script in advance according to each target test case and the fallback preset page function data, so that before executing the target test case in each target test case script, it can fall back to the preset page of the software to be tested containing the test entry corresponding to the target test case script, so that the corresponding target test case can be executed smoothly, so that when the previous target test case script is executed abnormally, the next target test case script can also be executed smoothly, reducing the coupling between each target test case script and improving the independence of the target test case script. Based on this, this embodiment can group all target test case scripts according to the preset grouping rules, so that the corresponding test case script set can be executed in parallel using multiple available test terminals, realizing fragmented execution, overcoming the time-consuming problem caused by the serial execution of all test cases, and achieving the technical effect of shortening the software testing time and improving the testing efficiency.

[0119] Optionally, the device also includes: a target test case script generation module, which is used to: generate a basic test case script according to the target test case, and determine the fallback preset page function data corresponding to the test operating system of the available test end; add the fallback preset page function data at the start position of the operation in the basic test case script, and determine the added basic test case script as the target test case script.

[0120] Optionally, the rollback preset page function data implements the function of rolling back to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed through the following steps:

[0121] Check whether the current test page contains the preset page elements corresponding to the current target test case script; if not, roll back one page level according to the rollback method corresponding to the test operating system of the available test terminal, and update the test page after rolling back one page level to the current test page; return to execute the operation of checking whether the current test page contains the preset page elements corresponding to the current target test case script, and terminate when the current test page contains the preset page elements.

[0122] Optionally, according to the rollback method corresponding to the test operating system of the available test terminal, roll back one page level, including: if the test operating system of the available test terminal is the Android system, roll back one page level by triggering the return key once; if the test operating system of the available test terminal is the Apple iOS system, roll back one page level by sliding the screen once.

[0123] Optionally, the target test case script grouping module 520 includes:

[0124] A set total number determination unit, used to use the number of available test terminals sent by the client as the set total number;

[0125] The target test case script grouping unit is used to randomly group each target test case script according to the total number of the set, and determine each test case script set according to the random grouping result, wherein the test case script set includes at least one target test case script.

[0126] Optionally, the target test case script grouping unit is specifically used to: determine the number of scripts contained in each set based on the total number of target test case scripts and the total number of sets, wherein the number of scripts contained in any two sets is equal or differs by 1; randomly group each target test case script based on the number of scripts contained in each set, and determine each test case script set based on the random grouping result.

[0127] The software testing device provided in the embodiment of the present invention can execute the software testing method provided in the first or second embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the software testing method.

[0128] Embodiment 6

[0129] Figure 6 This is a structural diagram of a software testing device provided in Example 6 of the present invention. This embodiment is applicable to the situation of testing multiple functions of software. The device is arranged on the client and specifically includes: a test case script set receiving module 610 and a test case script set sending module 620.

[0130] Among them, the test case script set receiving module 610 is used to receive multiple test case script sets sent by the server; wherein each test case script set contains at least one target test case script, and each target test case script is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to realize the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed; the test case script set sending module 620 is used to determine the available test terminals corresponding to each test case script set, and send each test case script set to the corresponding available test terminal according to the terminal information corresponding to each available test terminal, so as to execute the corresponding test case script set in parallel in each available test terminal.

[0131] The technical solution of this embodiment distributes each received test case set to the corresponding available test terminal, so that the corresponding test case script set can be executed in parallel by using multiple available test terminals, and when the available test terminal executes each issued target test case script, it first executes the corresponding fallback preset page function data to fall back to the preset page of the software to be tested containing the test entry corresponding to the target test case script, so that the corresponding target test case can be executed smoothly, and when the previous target test case script is executed abnormally, the next target test case script can also be executed smoothly, thereby reducing the coupling between each target test case script, and overcoming the time-consuming problem caused by the serial execution of all test cases through sharding execution, thereby achieving the technical effect of shortening the software testing time and improving the testing efficiency.

[0132] Optionally, the test case script set sending module 620 is specifically used to: compile each test case script set with the terminal information of the corresponding available test end to generate a test configuration file; execute each test configuration file to send the test case script set in each test configuration file to the corresponding available test end, so as to execute the corresponding test case script set in parallel in each available test end.

[0133] Optionally, the device further comprises:

[0134] A test end monitoring module is used to monitor the connection status of each test end and determine each connection test end connected to the client before determining the available test ends corresponding to each test case script set;

[0135] The available test end determination module is used to determine each connection test end whose operating system version information is preset version information as each available test end according to the operating system version information of each connection test end.

[0136] The software testing device provided in the embodiment of the present invention can execute the software testing method provided in the third embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the software testing method.

[0137] Embodiment 7

[0138] Figure 7 Schematic diagram of the structure of a software testing system provided by Embodiment 7 of the present invention. Figure 7 The system includes: a server 710, a client 720 and at least one available test terminal 730.

[0139] The server 710 is used to implement the software testing method steps provided in the first or second embodiment; the client 720 is used to implement the software testing method steps provided in the third embodiment;

[0140] In this embodiment, the server 710 and the client 720 communicate through network services to achieve information exchange. The client 720 and each available test terminal 730 can be connected wirelessly or wired, such as using a USB cable to connect each available test terminal 730 to the client 720.

[0141] The working process of the software testing system provided in this embodiment is as follows:

[0142] The server 710 obtains multiple target test case scripts of the software to be tested, wherein each target test case script is generated according to the target test case and the rollback preset page function data, and the rollback preset page function data is used to implement the rollback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed. The server 710 groups each target test case script according to the preset grouping rule and the number of available test terminals to obtain multiple test case script sets, and sends each test case script set to the client 720. After receiving the multiple test case script sets sent by the server 710, the client 720 determines the available test terminals 730 corresponding to each test case script set according to the random grouping result, and sends each test case script set to the corresponding available test terminal 730 according to the terminal information corresponding to each available test terminal 730, so that each available test terminal 730 can execute the corresponding test case script set in parallel after receiving the sent test case script set.

[0143] The software testing system in this embodiment groups all target test case scripts according to preset grouping rules through the server, so that multiple available test terminals can be used to execute the corresponding test case script sets in parallel, realizing sharded execution, overcoming the time-consuming problem caused by the serial execution of all test cases, and achieving the technical effect of shortening the software testing time and improving the testing efficiency.

[0144] Embodiment 8

[0145] Figure 8 Schematic diagram of the structure of a server provided by the eighth embodiment of the present invention. Figure 8 , the server includes:

[0146] One or more processors 810;

[0147] Memory 820, used to store one or more programs;

[0148] When one or more programs are executed by one or more processors 810, the one or more processors 810 implement the software testing method steps provided in the first or second embodiment. The method includes:

[0149] Obtain multiple target test case scripts of the software to be tested, wherein each target test case script is generated according to the target test case and the rollback preset page function data, and the rollback preset page function data is used to implement the rollback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;

[0150] According to the preset grouping rules and the number of available test terminals, each target test case script is grouped to obtain multiple test case script sets;

[0151] Each test case script set is sent to the client, so that the client allocates each test case script set to a corresponding available test end, so as to execute the corresponding test case script set in parallel in each available test end.

[0152] Figure 8 A processor 810 is taken as an example; the processor 810 and the memory 820 in the server can be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0153] The memory 820, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the software testing method in the embodiment of the present invention (for example, the target test case script acquisition module 410, the target test case script grouping module 420 and the test case script set sending module 430 in the software testing device). The processor 810 executes various functional applications and data processing of the server by running the software programs, instructions and modules stored in the memory 820, that is, implements the above-mentioned software testing method.

[0154] The memory 820 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the server, etc. In addition, the memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 820 may further include a memory remotely arranged relative to the processor 810, and these remote memories may be connected to the server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0155] The server proposed in this embodiment and the software testing method proposed in the above-mentioned embodiment 1 or embodiment 2 belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above-mentioned embodiment 1 or embodiment 2, and this embodiment has the same beneficial effects as executing the software testing method.

[0156] Embodiment 9

[0157] Fig. 9 A schematic diagram of the structure of a terminal device provided in Embodiment 9 of the present invention. Fig. 9 A block diagram of an exemplary terminal device 12 suitable for implementing embodiments of the present invention is shown. Fig. 9 The terminal device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0158] like Fig. 9 As shown, the terminal device 12 is in the form of a general-purpose computing device. The components of the terminal device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0159] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0160] The terminal device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the terminal device 12, including volatile and non-volatile media, removable and non-removable media.

[0161] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The terminal device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig. 9 not shown, usually called a "hard drive"). Although Fig. 9Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0162] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0163] The terminal device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the terminal device 12, and / or may communicate with any device that enables the terminal device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the terminal device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the terminal device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the terminal device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0164] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the steps of the software testing method provided in the third embodiment of the present invention, which includes:

[0165] Receive multiple test case script sets sent by the server; wherein each test case script set contains at least one target test case script, and each target test case script is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;

[0166] Determine the available test terminals corresponding to each test case script set, and send each test case script set to the corresponding available test terminal according to the terminal information corresponding to each available test terminal, so as to execute the corresponding test case script set in parallel in each available test terminal.

[0167] Of course, those skilled in the art can understand that the processing unit 16 can also implement the technical solution of the software testing method provided by any embodiment of the present invention.

[0168] Embodiment 10

[0169] The tenth embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the software testing method of the first or second embodiment of the present invention are implemented. The method includes:

[0170] Obtain multiple target test case scripts of the software to be tested, wherein each target test case script is generated according to the target test case and the rollback preset page function data, and the rollback preset page function data is used to implement the rollback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;

[0171] According to the preset grouping rules and the number of available test terminals, each target test case script is grouped to obtain multiple test case script sets;

[0172] Each test case script set is sent to the client, so that the client allocates each test case script set to a corresponding available test end, so as to execute the corresponding test case script set in parallel in each available test end.

[0173] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0174] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0175] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0176] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0177] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0178] The embodiment of the present invention further provides another computer-readable storage medium, wherein the computer-executable instructions are used to execute a software testing method when executed by a computer processor. The method includes:

[0179] Receive multiple test case script sets sent by the server; wherein each test case script set contains at least one target test case script, and each target test case script is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;

[0180] Determine the available test terminals corresponding to each test case script set, and send each test case script set to the corresponding available test terminal according to the terminal information corresponding to each available test terminal, so as to execute the corresponding test case script set in parallel in each available test terminal.

[0181] Of course, the computer executable instructions of the storage medium provided by the embodiment of the present invention are not limited to the above-mentioned method operations, but can also execute the related operations in the software testing method provided by the third embodiment of the present invention. For the introduction of the storage medium, please refer to the content explanation in the ninth embodiment.

[0182] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A software testing method, characterized in that: Applied to the server, including: Obtain multiple target test case scripts of the software to be tested, wherein each of the target test case scripts is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement falling back to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed; According to the preset grouping rules and the number of available test terminals, each of the target test case scripts is grouped to obtain multiple test case script sets; Sending each of the test case script sets to a client, so that the client allocates each of the test case script sets to a corresponding available test terminal, so as to execute the corresponding test case script sets in parallel in each of the available test terminals; The target test case scripts are grouped according to the preset grouping rules and the number of available test terminals to obtain multiple test case script sets, including: The number of available test terminals sent by the client is taken as the total number of sets; The target test case scripts are randomly grouped according to the total number of the sets, and each test case script set is determined according to the random grouping result, wherein the test case script set includes at least one target test case script, and the arrangement order of the target test case scripts in each test case script set is an arbitrary random order.

2. The method according to claim 1, characterized in that Generate a target test case script based on the target test case and fallback preset page function data, including: Generate a basic test case script according to the target test case, and determine the fallback preset page function data corresponding to the test operating system of the available test terminal; The rollback preset page function data is added at the running start position in the basic test case script, and the added basic test case script is determined as the target test case script.

3. The method according to claim 1, characterized in that The rollback preset page function data implements the function of rolling back to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed through the following steps: Check whether the current test page contains the preset page element corresponding to the current target test case script; If not, then according to the rollback method corresponding to the test operating system of the available test terminal, roll back one page level, and update the test page after rolling back one page level as the current test page; Return to execute the operation of detecting whether the current test page includes the preset page element corresponding to the current target test case script, and terminate when the current test page includes the preset page element.

4. The method according to claim 3, characterized in that Roll back one page level according to the rollback method corresponding to the test operating system of the available test end, including: If the test operating system of the available test terminal is Android system, the back button is triggered once to go back one page level; If the test operating system of the available test terminal is Apple iOS, you can go back one page level by sliding the screen once.

5. The method according to claim 1, characterized in that Randomly grouping the target test case scripts according to the total number of sets, and determining each test case script set according to the random grouping result, including: Determine the number of scripts contained in each set according to the total number of the target test case scripts and the total number of the sets, wherein the number of scripts contained in any two sets is equal or differs by 1; According to the number of scripts contained in each set, the target test case scripts are randomly grouped, and each test case script set is determined according to the random grouping result.

6. A software testing method, characterized in that: Applied to the client, including: Receive multiple test case script sets sent by the server; wherein each of the test case script sets contains at least one target test case script, and each of the target test case scripts is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed; Determine the available test terminals corresponding to each of the test case script sets, and send each of the test case script sets to the corresponding available test terminals according to the terminal information corresponding to each of the available test terminals, so as to execute the corresponding test case script sets in parallel in each of the available test terminals; The plurality of test case script sets are obtained by the server grouping target test case scripts of the software to be tested according to a preset grouping rule and the number of available test terminals; The multiple test case script sets are obtained by the server in the following manner: The number of available test terminals sent by the client is taken as the total number of sets; The target test case scripts are randomly grouped according to the total number of the sets, and each test case script set is determined according to the random grouping result, wherein the arrangement order of the target test case scripts in each test case script set is an arbitrary random order.

7. The method according to claim 6, characterized in that Sending each of the test case script sets to the corresponding available test terminals according to the terminal information corresponding to each available test terminal includes: Compile each of the test case script sets with the corresponding terminal information of the available test terminals to generate a test configuration file; Execute each of the test configuration files to send the test case script set in each of the test configuration files to the corresponding available test terminals, so as to execute the corresponding test case script set in parallel in each of the available test terminals.

8. The method according to claim 6 or 7, characterized in that: Before determining the available test terminals corresponding to the test case script sets, the following steps are included: Monitor the connection status of each test terminal and determine each connection test terminal connected to the client; According to the operating system version information of each connection test terminal, each connection test terminal whose operating system version information is preset version information is determined as each available test terminal.

9. A software testing device, characterized in that: Set on the server side, including: A target test case script acquisition module is used to acquire multiple target test case scripts of the software to be tested, wherein each of the target test case scripts is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed; A target test case script grouping module groups each of the target test case scripts according to a preset grouping rule and the number of available test terminals to obtain a plurality of test case script sets; A test case script set sending module, used for sending each of the test case script sets to a client, so that the client allocates each of the test case script sets to a corresponding available test terminal, so as to execute the corresponding test case script set in parallel in each of the available test terminals; Wherein, the target test case script grouping module includes: A set total number determination unit, used to use the number of available test terminals sent by the client as the set total number; A target test case script grouping unit is used to randomly group each of the target test case scripts according to the total number of the sets, and determine each test case script set according to the random grouping result, wherein the test case script set includes at least one target test case script, and the arrangement order of the target test case scripts in each test case script set is an arbitrary random order.

10. A software testing device, characterized in that: Set on the client, including: A test case script set receiving module, used to receive multiple test case script sets sent by a server; wherein each of the test case script sets contains at least one target test case script, and each of the target test case scripts is generated according to the target test case and the fallback preset page function data, and the fallback preset page function data is used to implement the fallback to the preset page of the software to be tested containing the test entry corresponding to the current target test case script before the target test case in the current target test case script is executed; A test case script set sending module is used to determine the available test terminals corresponding to each of the test case script sets, and send each of the test case script sets to the corresponding available test terminals according to the terminal information corresponding to each of the available test terminals, so as to execute the corresponding test case script sets in parallel in each of the available test terminals; The plurality of test case script sets are obtained by the server grouping target test case scripts of the software to be tested according to a preset grouping rule and the number of available test terminals; The multiple test case script sets are obtained by the server in the following manner: The number of available test terminals sent by the client is taken as the total number of sets; The target test case scripts are randomly grouped according to the total number of the sets, and each test case script set is determined according to the random grouping result, wherein the arrangement order of the target test case scripts in each test case script set is an arbitrary random order.

11. A software testing system, characterized in that: The system includes a server, a client, and at least one available test terminal; wherein, The server is used to implement the software testing method steps as described in any one of claims 1 to 5; The client is used to implement the software testing method steps as described in any one of claims 6-8.

12. A server, characterized in that: The server comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the software testing method steps as described in any one of claims 1-5.

13. A terminal device, characterized in that: The terminal device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the software testing method steps as described in any one of claims 6 to 8.

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

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the software testing method as described in any one of claims 6 to 8 are implemented.

Citation Information

Patent Citations

  • Android APP-based automatic exploration testing method and system

    CN107678940A

  • Test method and apparatus

    CN108459953A

  • Test resource allocation method and device, electronic equipment and storage medium

    CN110083536A