CN112463574B - Software testing method, device, system, equipment and storage medium - Google Patents

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

Info

Publication number
CN112463574B
CN112463574B CN201910843765.4A CN201910843765A CN112463574B CN 112463574 B CN112463574 B CN 112463574B CN 201910843765 A CN201910843765 A CN 201910843765A CN 112463574 B CN112463574 B CN 112463574B
Authority
CN
China
Prior art keywords
test case
case script
test
target
available
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910843765.4A
Other languages
Chinese (zh)
Other versions
CN112463574A (en
Inventor
焦艳君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910843765.4A priority Critical patent/CN112463574B/en
Publication of CN112463574A publication Critical patent/CN112463574A/en
Application granted granted Critical
Publication of CN112463574B publication Critical patent/CN112463574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

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 rules 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.

Description

Software testing method, device, system, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of Internet, in particular to a software testing method, a device, a system, equipment and a storage medium.
Background
With the continuous development of mobile terminals such as mobile phones, more and more software is installed on the terminals, and the software updating iteration speed is also faster and faster, so as to meet the increasing demands of users.
In general, after a software is developed or updated, a software function needs to be tested to ensure that the software can normally and stably run. In the process of testing software functions, testers often test the software functions through test cases. A test case is a set of test inputs, execution conditions, and expected results that are formulated for a particular goal in order to test a program path or verify whether a particular requirement is met.
At present, when testing software by using a plurality of test cases, because each test case has a certain relevance, a plurality of test case scripts need to be executed in series.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art:
when the number of test cases is large, the existing software test mode consumes longer time, and the next test case script cannot be executed after the previous test case script fails to execute, so that the test efficiency is greatly reduced.
Disclosure of Invention
The embodiment of the invention provides a software testing method, a device, a system, equipment and a storage medium, so as to improve the testing efficiency of software.
In a first aspect, an embodiment of the present invention provides a software testing method, applied to a server, including:
Acquiring a plurality of 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 rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a preset page of the software to be tested containing a 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 a preset grouping rule and the number of available test terminals to obtain a plurality of test case script sets;
and sending each test case script set to a client, so that the client distributes each test case script set to a corresponding available test end, and the corresponding test case script set is executed in parallel in each available test end.
In a second aspect, an embodiment of the present invention further provides a software testing method, applied to a client, including:
receiving a plurality of test case script sets sent by a server side, wherein each test case script set comprises at least one target test case script, each target test case script is generated according to a target test case and rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a preset page of software to be tested, which comprises a test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;
And determining available test terminals corresponding to the test case script sets respectively, and issuing the test case script sets to the corresponding available test terminals according to terminal information corresponding to the available test terminals so as to execute the corresponding test case script sets in parallel in the available test terminals.
In a third aspect, an embodiment of the present invention further provides a software testing device, provided at a server, including:
The system comprises a target test case script acquisition module, a target test case script acquisition module and a test program execution module, wherein the target test case script acquisition module is used for acquiring a plurality of target test case scripts of software to be tested, each target test case script is generated according to a target test case and rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a preset page of the software to be tested containing a 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 target test case script grouping module is used for grouping 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;
The test case script set sending module is used for sending each test case script set to the client so that the client distributes each test case script set to the corresponding available test end, and the corresponding test case script set is executed in parallel in each available test end.
In a fourth aspect, an embodiment of the present invention further provides a software testing apparatus, provided at a client, including:
The system comprises a test case script set receiving module, a test case script set receiving module and a test program script set processing module, wherein the test case script set receiving module is used for receiving a plurality of test case script sets sent by a server side, each test case script set comprises at least one target test case script, each target test case script is generated according to a target test case and rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a to-be-tested software preset page comprising a test entry corresponding to a current target test case script before the target test case in the current target test case script is executed;
the test case script set issuing module is used for determining available test terminals corresponding to the test case script sets respectively, issuing the test case script sets to the corresponding available test terminals according to terminal information corresponding to the available test terminals, and executing the corresponding test case script sets in parallel in the available test terminals.
In a fifth aspect, the embodiment of the invention also provides a software testing system, which comprises a server, a client and at least one available testing end, wherein,
The server is used for realizing the software testing method steps provided by the first aspect;
the client is configured to implement the software testing method steps as provided in the second aspect.
In a sixth aspect, an embodiment of the present invention further provides a server, where the server includes:
one or more processors;
a memory for storing one or more programs;
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the software testing method steps as provided in the first aspect.
In a seventh aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes:
one or more processors;
a memory for storing one or more programs;
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the software testing method steps as provided in the second aspect.
In an eighth aspect, embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the software testing method steps as provided in the first aspect.
In a ninth aspect, embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the software testing method steps as provided in the second aspect.
The embodiments of the above invention have the following advantages or benefits:
By generating the corresponding target test case script according to each target test case and the back-off preset page function data in advance, before executing the target test cases in each target test case script, the back-off can be carried out 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 cases can be smoothly executed, the next target test case script can be smoothly executed when the previous target test case script is abnormal in execution, the coupling property between each target test case script is reduced, and the independence of the target test case scripts is improved. Based on the above, the embodiment can group all target test case scripts according to the preset grouping rule, so that a plurality of available test terminals can be utilized to execute corresponding test case script sets in parallel, the execution of the fragments is realized, the problem of long time consumption caused by the serial execution of all test cases is solved, and the technical effects of shortening the test time of software and improving the test efficiency are achieved.
Drawings
FIG. 1 is a flowchart of a software testing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a software testing method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a software testing method according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a software testing method according to a fourth embodiment of the present invention;
Fig. 5 is a schematic structural diagram of a software testing device according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a software testing device according to a sixth embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a software testing system according to a seventh embodiment of the present invention;
Fig. 8 is a schematic structural diagram of a server according to an eighth embodiment of the present invention;
fig. 9 is a schematic structural diagram of a terminal device according to a ninth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a software testing method according to an embodiment of the present invention, where the method may be applied to a case of testing multiple functions of software, and the method may be performed by a software testing device disposed at a server, where the device may be implemented by software and/or hardware, and integrated in a data processing server. As shown in fig. 1, the method specifically includes the following steps:
S110, acquiring a plurality of 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 for realizing rollback to a preset page of the software to be tested containing a 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 target test case script refers to a script capable of executing the target test case. The preset page of the software to be tested is a page where a test entry corresponding to the target test case script is located. In this embodiment, the preset pages of the software to be tested corresponding to each target test case may be the same or different. The preset page of the software to be tested may be a home page or other hierarchical page of the software to be tested, which may be specifically predetermined according to a test entry corresponding to the target test case. The current target test case script may refer to a target test case script that needs to be executed at the current time. The rollback preset page function data can be used for rollback from the current test page to a software preset page 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 the embodiment can be packaged as a rollback function, so that the function of rollback the corresponding preset page can be quickly realized by calling the rollback function.
Specifically, each software function in the software under test may be tested using a test case. The embodiment can generate the corresponding test case script in advance according to the test case and the rollback preset page function data. If the software to be tested has a plurality of versions, uploading a plurality of test case scripts corresponding to each software version to a version management system so as to store each test case script in a corresponding software version address, thereby carrying out version management on each test case script. The version management system may be, but is not limited to, SVN (version control system) or Git (distributed version control system). The embodiment can acquire a plurality of prestored target test case scripts according to the version address or the package name of the software to be tested.
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 that before the target test case in the current target test case script is executed, the method needs 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. If the software to be tested is shopping software, a certain target test case is used for testing whether the first-order module in the first page of the shopping software can normally run, and the test entry corresponding to the target test case script is the first-order module in the first page, so that before the target test script is executed, the target test case needs to be returned to the first page of the shopping software, and the target test case can be smoothly executed from the first-order module. According to the embodiment, the rollback preset page function data is added in each target test case script in advance, so that when the previous target test case script is abnormal in execution, the smooth execution of the next target test case script is not affected, the coupling between each target test case script is reduced, and the independence of the target test case scripts is improved.
S120, grouping 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.
The preset grouping rule refers to a rule according to which all target test case scripts are grouped. The preset grouping rule may be, for example, a rule that specifies the number of test case scripts included in each script set in advance, a rule that specifies which test case scripts should be included in each script set, or a rule that randomly performs grouping. The available test end refers to a terminal, such as a smart phone, a tablet computer, etc., which can be used for executing the target test case script. It should be noted that the available test end needs to be pre-installed with the software to be tested, and the available test end is in a developer debug mode, so that the corresponding target test case script can be executed. The test case script set is a set of at least one target test case script.
Specifically, the number of available test ends corresponding to the software to be tested can be determined according to a preset test protocol, wherein the preset test protocol can be preset according to actual conditions and user requirements and is used for defining the number of available test ends corresponding to each software or software version, so that the server and the client can test the software to be tested quickly. The 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. The client can detect the number of available test terminals currently connected with 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 according to all available test terminals currently connected with the client, thereby improving the resource utilization rate and further improving the test efficiency.
In this embodiment, each target test case script is independent of each other, so that all target test case scripts can be grouped based on a preset grouping rule. If the number of test case scripts contained in each set or which test case scripts should be contained in each set are specified in the preset grouping rule, all target test case scripts can be grouped according to the preset grouping rule, and each group is determined to be one test case script set, so that a plurality of test case script sets can be obtained.
S130, sending each test case script set to the client side so that the client side distributes each test case script set to the corresponding available test end, and the corresponding test case script set is executed in parallel in each available test end.
The client may refer to a terminal, such as a PC (personal computer ) terminal, that issues each test case script set to a corresponding available test terminal. The client in this embodiment makes a wired or wireless connection with the available test terminal in advance, for example, the available test is connected to the client through USB (Universal Serial Bus ).
Specifically, the server side sends each test case script set after grouping to the client side, the client side can distribute each test case script set to the corresponding available test end according to each received test case script set, and issue each test case script set to the corresponding available test end in a contract mode according to terminal information of each available test end, so that a plurality of available test ends can execute the issued test case script set in parallel.
According to the technical scheme, the corresponding target test case scripts are generated in advance according to each target test case and the back-off preset page function data, so that before the target test cases in each target test case script are executed, the back-off can be carried out to the preset page of the software to be tested containing the corresponding test entry of the target test case script, the corresponding target test cases can be executed smoothly, when the previous target test case script is abnormal in execution, the next target test case script can be executed smoothly, the coupling property among the target test case scripts is reduced, and the independence of the target test case scripts is improved. Based on the above, the embodiment can group all target test case scripts according to the preset grouping rule, so that a plurality of available test terminals can be utilized to execute corresponding test case script sets in parallel, the execution of the fragments is realized, the problem of long time consumption caused by the serial execution of all test cases is solved, and the technical effects of shortening the test time of software and improving the test efficiency are achieved.
Example two
Fig. 2 is a flowchart of a software testing method according to a second embodiment of the present invention, where the "grouping of test case scripts according to preset grouping rules and the number of available test terminals to obtain multiple test case script sets" is optimized on the basis of the foregoing embodiments. Wherein the explanation of the same or corresponding terms as those of the above embodiments is not repeated herein.
Referring to fig. 2, the method for testing software provided in this embodiment specifically includes the following steps:
s210, acquiring a plurality of 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 for realizing rollback to a preset page of the software to be tested containing a test entry corresponding to the current target test case script before the target test case in the current target test case script is executed.
S220, the number of available test terminals sent by the client is used as the total number of the sets.
Specifically, the client may send the current number of available test terminals to the server when determining the current number of available test terminals connected to the client. The server can directly determine the number of available test terminals sent by the client as the total number of the sets, so that a script set can be distributed to each available test terminal, and therefore all the available test terminals can be utilized to perform parallel test on the software to be tested, the test time of the software to be tested is further shortened, and the test efficiency is further improved.
S230, randomly grouping the target test case scripts according to the total number of the sets, and determining each test case script set according to a random grouping result.
The test case script set comprises at least one target test case script.
Specifically, since the test case scripts are mutually independent, all target test case scripts can be randomly grouped based on the total number of the sets, so that each test case script set can be determined according to a random grouping result, and the number of scripts in each test case script set can be the same or different. According to the embodiment, the software test is more flexible by randomly grouping all target test case scripts, so that more test problems can be found, and the test quality is further improved.
For example, assuming that the total number of the sets is 10, a part of the target test case scripts can be randomly selected as a first group, namely a first test case script set, and then a part of the target test case scripts are randomly selected as a second group, namely a second test case script set, from the rest of the target test case scripts, and the test case scripts are sequentially performed until the rest of the target test case scripts are used as a tenth test case script set, so that 10 test case script sets can be randomly obtained.
S240, sending each test case script set to the client so that the client distributes each test case script set to the corresponding available test end, and the corresponding test case script set is executed in parallel in each available test end.
According to the technical scheme, the number of the current available test terminals sent by the client is directly determined to be the total number of the sets, so that all the current available test terminals can be used for carrying out parallel test on the software to be tested, the test time is further shortened, and the test efficiency is improved. And by randomly grouping all target test case scripts, the software test is more flexible, so that more test problems can be found, and the test quality is further improved.
Based on the technical scheme, S230 can include determining the number of scripts contained in each set according to 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 to or different from 1, randomly grouping the target test case scripts according to the number of scripts contained in each set, and determining each test case script set according to a random grouping result.
Specifically, if the total number of the target test case scripts is an integer multiple of the total number of the sets, all the target test case scripts may be grouped averagely, that is, the number of scripts included in each set is equal. If the total number of the target test case scripts is not an integer multiple of the total number of the sets, the target test case scripts can be divided into groups more evenly, namely, the number of the scripts contained in each set is equal or different by 1. For example, if the total number of sets is 10 and the total number of target test case scripts is 99, it may be determined that 9 sets of 10 sets contain 10 scripts, and the other 1 set contains 9 scripts, so as to implement a more average grouping. The number of the target test case scripts in the corresponding test case script set executed by each available test end can be equal or different by 1 through average or average grouping, so that the test of all the target test case scripts can be completed in the shortest time, and the test efficiency is further improved.
The embodiment can randomly select the target test case scripts of each script number from all the target test case scripts in turn based on the script number contained in each set to form a corresponding test case script set. For example, if a set includes 10 scripts, 10 scripts can be randomly selected from the currently unselected target test case scripts to be used as a group, i.e. to be used as a test case script set. It should be noted that, because each target test case script is not associated with each other, the order of arrangement of the target test case scripts in each test case script set may be any random order. That is, when executing each target test case script in the distributed test case script set, a certain available test terminal can perform serial execution in any order, so that the flexibility of the test is greatly improved.
On the basis of the technical scheme, generating the target test case script according to the target test case and the rollback preset page function data can comprise generating a basic test case script according to the target test case, determining the rollback preset page function data corresponding to a test operating system of an available test end, adding the rollback preset page function data at an operation starting position in the basic test case script, and determining the added basic test case script as the target test case script.
The basic test case script refers to a corresponding script generated by an operation instruction which needs to be input by a tester in the program test process. The test operating systems of the available test terminals can be, but are not limited to, android systems and apple iOS systems. In this embodiment, the test operating systems of each available test end are the same, so that the performance of the software to be tested under a certain operating system can be detected. The corresponding rollback preset page function data of different test operating systems are different.
Specifically, for each target test case script, the embodiment may generate a corresponding basic test case script according to a target test case written in advance. The rollback preset page function data corresponding to the test operating system of the available test end can be determined according to the corresponding relation between the operating system and the rollback preset page function data. And adding the determined rollback preset page function data at the operation starting position in the basic test case script, thereby generating a corresponding target test case script. If the rollback preset page function data is packaged into a rollback function, a calling code corresponding to the rollback function can be added at the operation starting position in the basic test case script, so that rollback operation can be performed by calling the rollback function before the target test case is executed. According to the embodiment, the back preset page function data is executed before the basic test case script is executed, so that after the back is carried out to the preset page of the software to be tested, the basic test case script can be executed smoothly, namely the target test case is executed, and therefore each target test case script is not affected by each other, and parallel testing is conducted.
On the basis of the technical scheme, the function data of the rollback preset page can realize the function of rollback to the preset page of the software to be tested containing the corresponding test entry of the current target test case script before the target test case in the current target test case script is executed by the following steps:
If not, a page level is rolled back according to a rollback mode corresponding to a test operation system of an available test end, the test page after the page level is rolled back is updated to be the current test page, and the operation of detecting whether the current test page contains the preset page element corresponding to the current target test case script is carried out again until the current test page contains the preset page element.
The preset page element may refer to any one of the preset pages and a page identifier different from other test pages, so that different test pages may be distinguished according to the preset page element. For example, the test entry identifier corresponding to the current target test case script may be used as a corresponding preset page element. Each test page corresponds to a page level. For example, the software home page corresponds to a first-level page, the test page which is clicked by the functional module in the software home page belongs to a second-level page, the test page which is clicked by the second-level page belongs to a third-level page, and so on. The rollback mode refers to a mode in which a page of a previous hierarchy can be returned. The rollback patterns corresponding to different test operating systems may be different.
Specifically, the embodiment determines whether the current test page is a preset page by detecting whether the current test page contains preset page elements corresponding to the current target test case script. If the current test page does not contain the preset page element, the current test page is indicated to not contain the test entry corresponding to the current target test case script, namely, the current test page is not the preset page, at this time, a page level can be rolled back according to a rollback mode corresponding to a test operation system of an available test end, so as to return to the last test page, and the current test page is updated to be the test page after the rollback. After updating the current test page, a next cycle may be entered to detect whether the updated current test page contains preset page elements. When the current test page contains preset page elements, the current test page can be determined to be the preset page of the software to be tested containing the test entry corresponding to the script of the current target test case, and the rollback operation can be terminated at the moment, so that the target test case can be smoothly executed in the current test page. According to the embodiment, the mode of layer-by-layer rollback and layer-by-layer detection can accurately roll back to the preset page of the software to be tested, and the situation that the software is exited when multi-layer rollback is performed at one time is avoided.
Based on the technical scheme, one page level is rolled back according to a rollback mode corresponding to the test operating system of the available test end, wherein the method comprises the steps of rolling back one page level by triggering a return key once if the test operating system of the available test end is an Android system, and rolling back one page level by sliding a screen once if the test operating system of the available test end is an apple iOS system.
Specifically, the rollback modes corresponding to different test operating systems are different. When the test operating system of the available test terminal is the Android system, the last test page can be returned by triggering a return key once, namely, a page level is returned. When the test operation system of the available test end is the apple iOS system, the last test page can be returned by sliding the screen once to the right at the moment because the return key is not set, so that the rollback operation can be quickly realized based on different test operation systems.
Example III
Fig. 3 is a flowchart of a software testing method according to a third embodiment of the present invention, where the present embodiment is applicable to a case of testing multiple functions of software, the method may be performed by a software testing device disposed at a client, and the device may be implemented by software and/or hardware, and integrated in a PC. As shown in fig. 3, the method specifically includes the following steps:
And S310, receiving a plurality of test case script sets sent by the server, wherein each test case script set comprises at least one target test case script, 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 for realizing rollback to a preset page of the software to be tested, which comprises a corresponding test entry of the current target test case script before the target test case in the current target test case script is executed.
The target test case script refers to a script capable of executing the target test case. The preset page of the software to be tested is a page where a test entry corresponding to the target test case script is located. In this embodiment, the preset pages of the software to be tested corresponding to each target test case may be the same or different. The preset page of the software to be tested may be a home page or other hierarchical page of the software to be tested, which may be specifically predetermined according to a test entry corresponding to the target test case. The current target test case script may refer to a target test case script that needs to be executed at the current time. The rollback preset page function data can be used for rollback from the current test page to a software preset page 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.
Specifically, the server may group the obtained target test case scripts according to a preset grouping rule 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.
It should be noted that, in this embodiment, each target test case script included in each test case script set is added with rollback preset page function data, so that before each test case is executed, each test case is rolled back to a corresponding preset page of software to be tested, and thus when the previous target test case script is abnormal in execution, smooth execution of the next target test case script is not affected, coupling between each target test case script is reduced, and independence of the target test case scripts is improved.
S320, determining available test terminals corresponding to the test case script sets respectively, and issuing the test case script sets to the corresponding available test terminals according to terminal information corresponding to the available test terminals so as to execute the corresponding test case script sets in parallel in the available test terminals.
The available test end refers to a terminal, such as a smart phone, a tablet computer, and the like, which can be used for executing the target test case script. The available test end in this embodiment needs to install the software to be tested in advance, and the available test end is in a developer debug mode, so that the corresponding target test case script can be executed. The terminal information corresponding to each available test terminal may include, but is not limited to, IP (Internet Protocol, protocol for interconnection between networks) address and port information of the terminal, etc.
Specifically, in this embodiment, an available test end may be randomly allocated to each test case script set, or the available test end corresponding to each test case script set may be determined based on a correspondence between a set identifier and an available test end identifier in a preset allocation rule. And according to the terminal information corresponding to each available test end, issuing the test case script set to the corresponding available test end, so that the issued test case script set can be executed in parallel on a plurality of available test ends. For each available test end, when each visual test case script in the test case script set is executed, each target test case script in the set can be executed in series according to any execution sequence, so that the flexibility of testing is improved, more test problems can be found, and the test quality is improved.
According to the technical scheme, the received test case sets are distributed to the corresponding available test terminals, so that the corresponding test case script sets can be executed in parallel by utilizing the available test terminals, when each target test case script issued by the available test terminals is executed, corresponding back preset page function data is executed first and is backed back to a preset page of software to be tested containing a corresponding test entry of the target test case script, and when the previous target test case script is abnormal in execution, the corresponding target test case can be executed smoothly, the next target test case script can be executed smoothly, the coupling between each target test case script is reduced, the problem of long time consumption caused by serial execution of all the test cases is solved through the execution of the fragments, and the technical effects of shortening the test time of software and improving the test efficiency are achieved.
Based on the above technical solution, the step S320 of issuing each test case script set to the corresponding available test end according to the terminal information corresponding to each available test end may include compiling each test case script set and the terminal information of the corresponding available test end to generate test configuration files, and executing each test configuration file to issue 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.
Specifically, for each test case script set, the test case script set and the terminal information of the corresponding available test end may be compiled to generate a test configuration file, such as a testng. 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 rapidly and conveniently issued to the corresponding available test end, so that each available test end can concurrently execute the issued test case script set, and the test time is greatly shortened.
Based on the above technical solution, before S320, the method may further include monitoring connection conditions of the test terminals, determining each connection test terminal connected to the client, and determining each connection test terminal with the operating system version information being preset version information as each available test terminal according to the operating system version information of each connection test terminal.
The operating system version information of the connection test terminal may refer to the version number of the test operating system currently installed by the connection test terminal, such as Android 6.0, android 8.0, and the like. 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.
Specifically, the client can monitor the connection condition between each test terminal and the client in real time, and determine the test terminal currently connected with the client as the connection test terminal. When the operating system version number of the test terminal is not considered, each connection test terminal can be directly determined as an available test terminal. If the performance of the specific operating system version number is verified, each connection testing end with the operating system version information being the preset version information needs to be determined as each available testing end. The client in this embodiment may send the number of available test ends to the server after determining each available test end, so that the server may group according to the number of current available test ends sent by the client, so as to improve the utilization rate of the available test ends, further shorten the test time, and improve the test efficiency.
Example IV
Fig. 4 is a flowchart of a software testing method according to a fourth embodiment of the present invention, and a preferred example is provided based on the foregoing embodiment. Wherein the explanation of the same or corresponding terms as those of the above embodiments is not repeated herein.
Referring to fig. 4, the software testing method provided in this embodiment specifically includes the following steps:
S410, the server side obtains a plurality of target test case scripts corresponding to the version addresses of the software to be tested from the version management system, wherein the target test case scripts are generated in advance according to the target test cases and the rollback preset page function data.
Specifically, by acquiring a plurality of target test case scripts corresponding to the addresses of the software version to be tested, whether a plurality of software functions under a certain software version to be tested meet the requirements can be tested.
S420, the client monitors the connection condition of each test end and sends the current number of available test ends to the server.
Specifically, the client monitors whether each test terminal is connected with the client in real time, and takes the test terminal currently connected with the client as an available test terminal, so that the number of available test terminals at the current moment can be counted. The software with the software version to be tested is pre-installed in the available test end of the embodiment.
The execution order of steps S410 and S420 is not limited, and for example, step S410 may be executed first and then step S420 may be executed, or step S420 may be executed first and then step S410 may be executed.
S430, the server side 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.
Specifically, the server can directly determine the number of available test terminals sent by the client as the total number of the sets, so that all the available test terminals can be used for parallel testing of the software to be tested, and the testing time is further shortened. And because each visual test case script is mutually independent, all target test case scripts can be randomly grouped, and each group is determined to be a test case script set. The server side randomly groups all target test case scripts, so that flexibility of software testing is improved, more testing problems can be found conveniently, and testing quality is further improved.
S440, the client downloads each test case script set, determines an available test end corresponding to each test case script set, compiles each test case script set and terminal information of the corresponding available test end, and generates a test.
Specifically, the client obtains each test case script set in the server through a downloading mode, and can allocate an available test terminal for each test case script set according to a preset allocation rule, and also can randomly allocate an available test terminal for each test case script set, so that the test case script sets and the available test terminals are in one-to-one correspondence.
S450, the client executes each testng.xml file to issue the test case script set in each testng.xml file to the corresponding available test end.
S460, each available test terminal executes the target test case script in the issued test case script set.
According to the technical scheme, through the interaction processing process among the server side, the client side and the available testing end, the target test case scripts corresponding to the version address of the software to be tested can be executed in a partitioned mode, testing time of the software to be tested is greatly shortened, and testing efficiency is improved. And by randomly grouping all target test case scripts, the software test is more flexible, so that more test problems can be found, and the test quality is further improved.
Example five
Fig. 5 is a schematic structural diagram of a software testing device according to a fifth embodiment of the present invention, where the embodiment is applicable to testing multiple functions of software, and the device is disposed at a server, and specifically includes a target test case script obtaining module 510, a target test case script grouping module 520, and a test case script set sending module 530.
The system comprises 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, wherein the target test case script acquisition module 510 is used for acquiring a plurality of target test case scripts of software to be tested, each target test case script is generated according to target test cases and rollback preset page function data, the rollback preset page function data is used for realizing that before target test cases in the current target test case scripts are executed, the target test case scripts are rolled back to a test software preset page containing a test entry corresponding to the current target test case scripts, each target test case script is grouped according to preset grouping rules and the number of available test terminals to obtain a plurality of test case script sets, and the test case script set sending module 530 is used for sending each test case script set to a client so that each test case script set is distributed to the corresponding available test terminals by the client so as to execute the corresponding test case script sets in parallel in each available test terminals.
According to the technical scheme, the corresponding target test case scripts are generated in advance according to each target test case and the back-off preset page function data, so that before the target test cases in each target test case script are executed, the back-off can be carried out to the preset page of the software to be tested containing the corresponding test entry of the target test case script, the corresponding target test cases can be executed smoothly, when the previous target test case script is abnormal in execution, the next target test case script can be executed smoothly, the coupling property among the target test case scripts is reduced, and the independence of the target test case scripts is improved. Based on the above, the embodiment can group all target test case scripts according to the preset grouping rule, so that a plurality of available test terminals can be utilized to execute corresponding test case script sets in parallel, the execution of the fragments is realized, the problem of long time consumption caused by the serial execution of all test cases is solved, and the technical effects of shortening the test time of software and improving the test efficiency are achieved.
Optionally, the device further comprises a target test case script generation module, wherein the target test case script generation module is used for generating a basic test case script according to the target test case, determining rollback preset page function data corresponding to a test operating system of an available test end, adding the rollback preset page function data at an operation starting position in the basic test case script, and determining the added basic test case script as the target test case script.
Optionally, the rollback preset page function data realizes the function of rollback to the preset page of the software to be tested containing the corresponding test entry of the current target test case script before the target test case in the current target test case script is executed by the following steps:
If not, a page level is rolled back according to a rollback mode corresponding to a test operation system of an available test end, the test page after the page level is rolled back is updated to be the current test page, and the operation of detecting whether the current test page contains the preset page element corresponding to the current target test case script is carried out again until the current test page contains the preset page element.
Optionally, backing a page level according to a backing mode corresponding to the test operating system of the available test end, wherein the backing mode comprises backing the page level by triggering a return key once if the test operating system of the available test end is an Android system, and backing the page level by sliding a screen once if the test operating system of the available test end is an apple iOS system.
Optionally, the target test case script grouping module 520 includes:
The total set determining unit is used for taking the number of available test terminals sent by the client as the total set;
The target test case script grouping unit is used for randomly grouping all target test case scripts according to the total number of the sets and determining each test case script set according to a random grouping result, wherein the test case script set comprises at least one target test case script.
The target test case script grouping unit is specifically configured to determine the number of scripts included in each set according to the total number of target test case scripts and the total number of sets, wherein the number of scripts included in any two sets is equal to or different from 1, randomly group each target test case script according to the number of scripts included in each set, and determine each test case script set according to a random grouping result.
The software testing device provided by the embodiment of the invention can execute the software testing method provided by the first embodiment or the second embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the software testing method.
Example six
Fig. 6 is a schematic structural diagram of a software testing device according to a sixth embodiment of the present invention, where the device is configured on a client and specifically includes a test case script set receiving module 610 and a test case script set issuing module 620.
The test case script set receiving module 610 is configured to receive a plurality of test case script sets sent by a server, where each test case script set includes at least one target test case script, and each target test case script is generated according to a target test case and rollback preset page function data, where the rollback preset page function data is used to implement rollback to a preset page of a software to be tested including a test entry corresponding to a current target test case script before the target test case in the current target test case script is executed, and the test case script set issuing module 620 is configured to determine available test ends corresponding to each test case script set respectively, issue each test case script set to a corresponding available test end according to terminal information corresponding to each available test end, so as to execute the corresponding test case script set in parallel in each available test end.
According to the technical scheme, the received test case sets are distributed to the corresponding available test terminals, so that the corresponding test case script sets can be executed in parallel by utilizing the available test terminals, when each target test case script issued by the available test terminals is executed, corresponding back preset page function data is executed first and is backed back to a preset page of software to be tested containing a corresponding test entry of the target test case script, and when the previous target test case script is abnormal in execution, the corresponding target test case can be executed smoothly, the next target test case script can be executed smoothly, the coupling between each target test case script is reduced, the problem of long time consumption caused by serial execution of all the test cases is solved through the execution of the fragments, and the technical effects of shortening the test time of software and improving the test efficiency are achieved.
Optionally, the test case script set issuing module 620 is specifically configured to compile each test case script set with terminal information of a corresponding available test end to generate test configuration files, execute each test configuration file, and issue 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.
Optionally, the apparatus further comprises:
the test end monitoring module is used for monitoring the connection condition of each test end before determining the available test end corresponding to each test case script set respectively and determining each connection test end connected with the client;
And the available test end determining module is used for determining each connection test end with the operating system version information being preset version information as each available test end according to the operating system version information of each connection test end.
The software testing device provided by the embodiment of the invention can execute the software testing method provided by the third embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the software testing method.
Example seven
Fig. 7 is a schematic structural diagram of a software testing system according to a seventh embodiment of the present invention. Referring to fig. 7, the system includes a server 710, a client 720, and at least one available test 730.
The server 710 is configured to implement the steps of the software testing method provided in the first embodiment or the second embodiment; the client 720 is configured to implement the software testing method steps provided in the third embodiment;
In this embodiment, the server 710 and the client 720 communicate through a network service, so as to implement information interaction. The client 720 and each available test terminal 730 may be connected by wireless or wired means, such as by connecting each available test terminal 730 to the client 720 using a USB cable.
The working process of the software testing system provided in this embodiment is as follows:
The server 710 obtains a plurality of 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 for realizing rollback to a preset page of the software to be tested containing a 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 a preset grouping rule and the number of available test terminals, obtains a plurality of 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 available test terminals 730 corresponding to each test case script set according to the random grouping result, and issues each test case script set to the corresponding available test terminal 730 according to 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 issued test case script set.
According to the software testing system in the embodiment, all target test case scripts are grouped through the server according to the preset grouping rule, so that a plurality of available test terminals can be utilized to execute corresponding test case script sets in parallel, the execution of fragments is realized, the problem of long time consumption caused by serial execution of all test cases is solved, and the technical effects of shortening the test time of software and improving the test efficiency are achieved.
Example eight
Fig. 8 is a schematic structural diagram of a server according to an embodiment of the present invention. Referring to fig. 8, the server includes:
one or more processors 810;
a memory 820 for storing one or more programs;
When executed by the one or more processors 810, causes the one or more processors 810 to implement the software testing method steps as provided in the first or second embodiments described above, the method includes:
Acquiring a plurality of 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 back-off preset page function data, and the back-off preset page function data is used for backing off to a preset page of the software to be tested containing a corresponding test entry of 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 a preset grouping rule and the number of available test terminals to obtain a plurality of test case script sets;
And sending each test case script set to the client so that the client distributes each test case script set to the corresponding available test end, and the corresponding test case script set is executed in parallel in each available test end.
In fig. 8, a processor 810 is illustrated, and in a server, the processor 810 and memory 820 may be connected by a bus or otherwise, in fig. 8, by a bus connection is illustrated.
The memory 820 is used as a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as program instructions/modules corresponding to a software testing method in an 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 of the server and data processing, i.e., implements the software testing methods described above, by running software programs, instructions, and modules stored in the memory 820.
The memory 820 mainly includes a storage program area that can store an operating system, application programs required for at least one function, and a storage data area that can store data created according to the use of a server, etc. In addition, memory 820 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 820 may further include memory remotely located relative to processor 810, which may be connected to the server via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The server proposed in this embodiment belongs to the same inventive concept as the software testing method proposed in the first or second embodiment, and technical details not described in detail in this embodiment can be seen in the first or second embodiment, and this embodiment has the same advantages of executing the software testing method.
Example nine
Fig. 9 is a schematic structural diagram of a terminal device according to a ninth embodiment of the present invention. Fig. 9 shows a block diagram of an exemplary terminal device 12 suitable for use in implementing embodiments of the present invention. The terminal device 12 shown in fig. 9 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
As shown in fig. 9, the terminal device 12 is in the form of a general purpose computing device. The components of 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 that connects the various system components, including system memory 28 and processing units 16.
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, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Terminal device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by terminal device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
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. Terminal device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 9, commonly referred to as a "hard disk drive"). Although not shown in fig. 9, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through 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 configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, 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 or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
Terminal device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with terminal device 12, and/or any devices (e.g., network card, modem, etc.) that enable terminal device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, terminal device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, via network adapter 20. As shown, network adapter 20 communicates with other modules of terminal device 12 over bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with terminal device 12 including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system memory 28, for example, implementing the software testing method steps provided in the third embodiment of the present invention, and the method includes:
receiving a plurality of test case script sets sent by a server side, wherein each test case script set comprises at least one target test case script, each target test case script is generated according to target test cases and rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a preset page of software to be tested, which comprises a test entry corresponding to the current target test case script before the target test cases in the current target test case script are executed;
And determining available test terminals corresponding to the test case script sets respectively, and issuing the test case script sets to the corresponding available test terminals according to terminal information corresponding to the available test terminals so as to execute the corresponding test case script sets in parallel in the available test terminals.
Of course, those skilled in the art will appreciate that the processing unit 16 may also implement the technical solution of the software testing method provided in any embodiment of the present invention.
Examples ten
The tenth embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the software testing method according to the first or second embodiments of the present invention, the method comprising:
Acquiring a plurality of 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 back-off preset page function data, and the back-off preset page function data is used for backing off to a preset page of the software to be tested containing a corresponding test entry of 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 a preset grouping rule and the number of available test terminals to obtain a plurality of test case script sets;
And sending each test case script set to the client so that the client distributes each test case script set to the corresponding available test end, and the corresponding test case script set is executed in parallel in each available test end.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may 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 electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a 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.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It will be appreciated by those of ordinary skill in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed over a network of computing devices, or they may alternatively be implemented in program code executable by a computer device, such that they are stored in a memory device and executed by the computing device, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps within them may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
Embodiments of the present invention also provide another computer readable storage medium, which when executed by a computer processor, is configured to perform a software testing method step, the method comprising:
receiving a plurality of test case script sets sent by a server side, wherein each test case script set comprises at least one target test case script, each target test case script is generated according to target test cases and rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a preset page of software to be tested, which comprises a test entry corresponding to the current target test case script before the target test cases in the current target test case script are executed;
And determining available test terminals corresponding to the test case script sets respectively, and issuing the test case script sets to the corresponding available test terminals according to terminal information corresponding to the available test terminals so as to execute the corresponding test case script sets in parallel in the available test terminals.
Of course, the storage medium containing the computer executable instructions provided in the embodiment of the present invention is not limited to the method operations described above, and may also perform the related operations in the software testing method provided in the third embodiment of the present invention. The description of the storage medium may be found in the description of the ninth embodiment.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (15)

1. The software testing method is characterized by being applied to a server and comprising the following steps:
Acquiring a plurality of 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 rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a preset page of the software to be tested containing a 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 a preset grouping rule and the number of available test terminals to obtain a plurality of test case script sets;
sending each test case script set to a client, so that the client distributes each test case script set to a corresponding available test end, and the corresponding test case script set is executed in parallel in each available test end;
The grouping of 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 includes:
The number of available test ends sent by the client is used as the total number of the set;
and randomly grouping the target test case scripts according to the total number of the sets, and determining each test case script set according to a random grouping result, wherein the test case script set comprises at least one target test case script, and the arrangement sequence of the target test case scripts in each test case script set is any random sequence.
2. The method of claim 1, wherein generating the target test case script from the target test case and the rollback preset page function data comprises:
generating a basic test case script according to the target test case, and determining rollback preset page function data corresponding to a test operating system of an available test end;
and adding the back preset page function data at the operation starting position in the basic test case script, and determining the added basic test case script as a target test case script.
3. The method according to claim 1, wherein the rollback preset page function data realizes a function of rollback to a preset page of the software to be tested including a test entry corresponding to the current target test case script before the target test case in the current target test case script is executed by:
detecting whether the current test page contains preset page elements corresponding to the current target test case script;
If not, a page level is rolled back according to a rollback mode corresponding to a test operation system of the available test end, and the test page after the page level is rolled back is updated to be a current test page;
and returning to execute the operation of detecting whether the current test page contains the preset page element corresponding to the current target test case script or not, and ending until the current test page contains the preset page element.
4. The method of claim 3, wherein backing off a page level according to a backing-off manner corresponding to a test operating system of the available test end, comprising:
if the test operating system of the available test end is an Android system, a page level is returned by triggering a return key once;
If the test operating system of the available test end is an apple iOS system, a page level is rolled back by sliding the screen once.
5. The method of claim 1, wherein randomly grouping each of the target test case scripts according to the total number of sets, and determining each test case script set according to a random grouping result comprises:
determining 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 to or different from 1;
And randomly grouping the target test case scripts according to the number of scripts contained in each set, and determining each test case script set according to a random grouping result.
6. A software testing method, applied to a client, comprising:
receiving a plurality of test case script sets sent by a server side, wherein each test case script set comprises at least one target test case script, each target test case script is generated according to a target test case and rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a preset page of software to be tested, which comprises a test entry corresponding to the current target test case script before the target test case in the current target test case script is executed;
determining available test terminals corresponding to the test case script sets respectively, and issuing the test case script sets to the corresponding available test terminals according to terminal information corresponding to the available test terminals so as to execute the corresponding test case script sets in parallel in the available test terminals;
The server side groups each target test case script of the software to be tested according to a preset grouping rule and the number of available test terminals;
the plurality of test case script sets are specifically obtained by the server through the following modes:
The number of available test ends sent by the client is used as the total number of the set;
And randomly grouping the target test case scripts according to the total number of the sets, and determining each test case script set according to a random grouping result, wherein the arrangement sequence of the target test case scripts in each test case script set is any random sequence.
7. The method of claim 6, wherein issuing each test case script set to a corresponding available test end according to terminal information corresponding to each available test end comprises:
compiling each test case script set and the terminal information of the corresponding available test end to generate a test configuration file;
Executing each test configuration file to issue 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.
8. The method according to claim 6 or 7, wherein before determining the available test end corresponding to each of the test case script sets, the method comprises:
monitoring the connection condition of each test end, and determining each connection test end connected with the client;
And determining each connection testing end with the operating system version information being preset version information as each available testing end according to the operating system version information of each connection testing end.
9. The utility model provides a software testing arrangement which characterized in that sets up in the server, includes:
The system comprises a target test case script acquisition module, a target test case script acquisition module and a test program execution module, wherein the target test case script acquisition module is used for acquiring a plurality of target test case scripts of software to be tested, each target test case script is generated according to a target test case and rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a preset page of the software to be tested containing a 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 target test case script grouping module is used for grouping 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;
the test case script set sending module is used for sending each test case script set to a client so that the client distributes each test case script set to a corresponding available test end, and the corresponding test case script set is executed in parallel in each available test end;
The target test case script grouping module comprises:
The total set determining unit is used for taking the number of available test terminals sent by the client as the total set;
The target test case script grouping unit is used for randomly grouping all the target test case scripts according to the total number of the sets, and determining each test case script set according to a random grouping result, wherein the test case script set comprises at least one target test case script, and the arrangement sequence of the target test case scripts in each test case script set is any random sequence.
10. The software testing device is characterized by being arranged at a client and comprising:
The system comprises a test case script set receiving module, a test case script set receiving module and a test program script set processing module, wherein the test case script set receiving module is used for receiving a plurality of test case script sets sent by a server side, each test case script set comprises at least one target test case script, each target test case script is generated according to a target test case and rollback preset page function data, and the rollback preset page function data is used for realizing rollback to a to-be-tested software preset page comprising a test entry corresponding to a current target test case script before the target test case in the current target test case script is executed;
The test case script set issuing module is used for determining available test terminals corresponding to the test case script sets respectively, issuing the test case script sets to the corresponding available test terminals according to terminal information corresponding to the available test terminals, and executing the corresponding test case script sets in parallel in the available test terminals;
The server side groups each target test case script of the software to be tested according to a preset grouping rule and the number of available test terminals;
the plurality of test case script sets are specifically obtained by the server through the following modes:
The number of available test ends sent by the client is used as the total number of the set;
And randomly grouping the target test case scripts according to the total number of the sets, and determining each test case script set according to a random grouping result, wherein the arrangement sequence of the target test case scripts in each test case script set is any random sequence.
11. A software testing system is characterized by comprising a service end, a client end and at least one available testing end, wherein,
The server is used for realizing the software testing method steps according to any one of claims 1-5;
The client is configured to implement the software testing method steps of any of claims 6-8.
12. A server is characterized in that, the server includes:
one or more processors;
a memory for storing one or more programs;
When executed by the one or more processors, causes the one or more processors to implement the software testing method steps of any 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 executed by the one or more processors, causes the one or more processors to implement the software testing method steps of any of claims 6-8.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the software testing method steps of any of claims 1-5.
15. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the software testing method steps of any of claims 6-8.
CN201910843765.4A 2019-09-06 2019-09-06 Software testing method, device, system, equipment and storage medium Active CN112463574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910843765.4A CN112463574B (en) 2019-09-06 2019-09-06 Software testing method, device, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910843765.4A CN112463574B (en) 2019-09-06 2019-09-06 Software testing method, device, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112463574A CN112463574A (en) 2021-03-09
CN112463574B true CN112463574B (en) 2025-03-21

Family

ID=74807064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910843765.4A Active CN112463574B (en) 2019-09-06 2019-09-06 Software testing method, device, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112463574B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113268416B (en) * 2021-05-17 2024-12-03 深圳Tcl新技术有限公司 A method, device, storage medium and terminal for testing an application program
CN114024735B (en) * 2021-11-02 2024-02-02 北京天融信网络安全技术有限公司 Multi-task parallel feature library testing method and device
CN114519006A (en) * 2022-02-16 2022-05-20 北京百度网讯科技有限公司 Test method, device, equipment and storage medium
CN116069649A (en) * 2023-01-29 2023-05-05 杭州网易云音乐科技有限公司 Page testing method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678940A (en) * 2017-08-30 2018-02-09 苏州朗动网络科技有限公司 Automation exploratory testing method and system based on Android APP
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
CN110083536A (en) * 2019-04-25 2019-08-02 厦门网宿有限公司 Test resource distribution method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609352B (en) * 2011-01-19 2014-11-19 阿里巴巴集团控股有限公司 Parallel testing method and parallel testing server
US9032370B2 (en) * 2011-12-29 2015-05-12 Tata Consultancy Services Limited Automated test cycle estimation system and method
CN103914523A (en) * 2014-03-24 2014-07-09 小米科技有限责任公司 Page rollback controlling method and page rollback controlling device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
CN107678940A (en) * 2017-08-30 2018-02-09 苏州朗动网络科技有限公司 Automation exploratory testing method and system based on Android APP
CN110083536A (en) * 2019-04-25 2019-08-02 厦门网宿有限公司 Test resource distribution method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112463574A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN110297689B (en) Intelligent contract execution method, device, equipment and medium
CN112463574B (en) Software testing method, device, system, equipment and storage medium
CN111737127B (en) Method and apparatus for testing map services
JP6363152B2 (en) Apparatus, method, computer program, and storage medium for data flow analysis
US9355003B2 (en) Capturing trace information using annotated trace output
US20120331449A1 (en) Device, method and computer program product for evaluating a debugger script
Shi et al. Evaluating scalability bottlenecks by workload extrapolation
WO2016095554A1 (en) Test method, device and system for application
CN104699601A (en) Injecting Faults at Select Execution Points of Distributed Applications
CN108111364B (en) Service system testing method and device
US20150288614A1 (en) Definition of a multi-node synthetic application for assessment of cloud-hosting suitability
CN110851471B (en) Distributed log data processing method, device and system
CN112799939A (en) Incremental code coverage rate testing method and device, storage medium and electronic equipment
CN111666201A (en) Regression testing method, apparatus, medium and electronic equipment
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
CN110457179A (en) System detection method, memory monitoring method, device, medium and electronic device
CN116974874A (en) Database testing method and device, electronic equipment and readable storage medium
CN109977005B (en) End-to-end test method, medium, device and computing equipment
CN119149429A (en) Method, device, equipment and medium for exporting code coverage rate data
CA2811617C (en) Commit sensitive tests
CN106549795B (en) System for monitoring a plurality of distributed devices
CN112463432B (en) Inspection method, device and system based on index data
CN116227395B (en) Simulation test method and device for digital chip and electronic equipment
US20120159247A1 (en) Automatically changing parts in response to tests
CN109408309A (en) The test method and device of multiple terminals

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant