CN110309065B - Concurrent execution method, device and equipment of test tasks and storage medium - Google Patents

Concurrent execution method, device and equipment of test tasks and storage medium Download PDF

Info

Publication number
CN110309065B
CN110309065B CN201910477791.XA CN201910477791A CN110309065B CN 110309065 B CN110309065 B CN 110309065B CN 201910477791 A CN201910477791 A CN 201910477791A CN 110309065 B CN110309065 B CN 110309065B
Authority
CN
China
Prior art keywords
test
mobile terminal
tested
state
operating system
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
CN201910477791.XA
Other languages
Chinese (zh)
Other versions
CN110309065A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910477791.XA priority Critical patent/CN110309065B/en
Publication of CN110309065A publication Critical patent/CN110309065A/en
Application granted granted Critical
Publication of CN110309065B publication Critical patent/CN110309065B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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)
  • Mobile Radio Communication Systems (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention relates to the field of research and development management, discloses a concurrent execution method, a concurrent execution device, concurrent execution equipment and a storage medium of test tasks, can perform automatic test tasks on multiple terminals in a concurrent manner, is compatible with testing of multiple pages, and improves the testing efficiency of automatic testing. The method comprises the following steps: acquiring mobile terminal set information, wherein the number of mobile terminals in the mobile terminal set is an integer not less than 1; according to the mobile terminal set information, sending a test task to a mobile terminal in a state to be tested; according to the type of the test page in the test task, a preset interface tool is called to test the mobile terminal in the state to be tested; and obtaining a test result of the mobile terminal set.

Description

Concurrent execution method, device and equipment of test tasks and storage medium
Technical Field
The present invention relates to the field of automated test tools, and in particular, to a method, an apparatus, a device, and a storage medium for concurrent execution of test tasks.
Background
With the rapid development of the mobile phone industry, the variety of mobile applications is increasing, so that the requirements of mobile application testing are also increasing to ensure the normal use of the mobile application by users, and the improvement of the efficiency of automatic testing is becoming more and more important.
Most of the existing automatic testing tools do not support simultaneous testing of multiple devices, have the problem of compatibility of different types of applications, cannot well be compatible with testing of primary application pages and webpage pages, and are low in testing efficiency.
Disclosure of Invention
The invention provides a concurrent execution method, a concurrent execution device, concurrent execution equipment and a storage medium for test tasks, which can be used for carrying out automatic test tasks on multiple terminals in a concurrent manner, are compatible with testing of multiple pages, and improve the testing efficiency of automatic testing.
A first aspect of an embodiment of the present invention provides a method for concurrently executing test tasks, including: acquiring mobile terminal set information, wherein the number of mobile terminals in the mobile terminal set is an integer not less than 1; transmitting a test task to a mobile terminal in a state to be tested according to the mobile terminal set information; according to the type of the test page in the test task, a preset interface tool is called to test the mobile terminal in the state to be tested; and obtaining a test result of the mobile terminal set.
Optionally, in a first implementation manner of the first aspect of the embodiment of the present invention, before the sending, according to the mobile terminal set information, a test task to a mobile terminal in a state to be tested, after obtaining the mobile terminal set information, the number of mobile terminals in the mobile terminal set is an integer not less than 1, the method further includes: acquiring the test task; and storing the test task into a preset process pool.
Optionally, in a second implementation manner of the first aspect of the embodiment of the present invention, acquiring mobile terminal set information, where the number of mobile terminals in the mobile terminal set is an integer not less than 1, includes: counting the number of mobile terminals connected in a wired or wireless mode; obtaining information of whether the mobile terminals in the mobile terminal set are in a state to be tested or not in a wired mode; and acquiring information whether the mobile terminals in the mobile terminal set are in a state to be tested or not in a wireless mode.
Optionally, in a third implementation manner of the first aspect of the embodiment of the present invention, the obtaining, by a wireless manner, information about whether the mobile terminals in the mobile terminal set are in a state to be tested includes: searching for mobile terminals in the same local area network; connecting with the mobile terminal in the same local area network through an Internet Protocol (IP) address; and acquiring information whether the mobile terminal in the same local area network is in a state to be tested or not through a wireless network.
Optionally, in a fourth implementation manner of the first aspect of the embodiment of the present invention, the sending, according to the mobile terminal set information, a test task to a mobile terminal in a state to be tested includes: counting the number of the mobile terminals in a state to be tested based on the mobile terminal set information, and taking the number of the mobile terminals in the state to be tested as a test number; reading the test tasks with the number being the test number from the preset process pool; and issuing the test tasks with the number being the test number to each mobile terminal in the state to be tested.
Optionally, in a fifth implementation manner of the first aspect of the embodiment of the present invention, according to a type of a test page in the test task, the calling a preset interface tool to test the mobile terminal in a state to be tested includes: when the test page type in the test task is a native application, calling a native application operation API to test; when the test page type in the test task is web page application, calling an HTML5 page operation API to test; and when the test page type in the test task is a mixed application, calling the native application operation API and the HTML5 page operation API to test.
Optionally, in a sixth implementation manner of the first aspect of the embodiment of the present invention, the obtaining a test result of the mobile terminal set includes: detecting whether the mobile terminals in the mobile terminal set are tested or not according to a preset period; marking the mobile terminal which completes the test as a state to be tested; receiving a test result of the mobile terminal which completes the test; and storing the test result to a preset file directory.
A second aspect of an embodiment of the present invention provides a concurrent execution apparatus for a test task, including: the mobile terminal comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring mobile terminal set information, and the number of mobile terminals in the mobile terminal set is an integer not less than 1; the sending unit is used for sending the test task to the mobile terminal in the state to be tested according to the mobile terminal set information; the test unit is used for calling a preset interface tool on the mobile terminal in a state to be tested for testing according to the type of the test page in the test task; and the second acquisition unit is used for receiving the test result of the mobile terminal set.
Optionally, in a first implementation manner of the second aspect of the embodiment of the present invention, the concurrent execution device of a test task further includes: the third acquisition unit is used for acquiring the test task; the third obtaining unit is further configured to store the test task to a preset process pool.
Optionally, in a second implementation manner of the second aspect of the embodiment of the present invention, the first obtaining unit specifically includes: the statistics module is used for counting the number of the mobile terminals connected in a wired or wireless mode; the first acquisition module is used for acquiring information whether the mobile terminals in the mobile terminal set are in a state to be tested or not in a wired mode; and the second acquisition module is used for acquiring information whether the mobile terminals in the mobile terminal set are in a state to be tested in a wireless mode.
Optionally, in a third implementation manner of the second aspect of the embodiment of the present invention, the second obtaining module is specifically configured to: searching for mobile terminals in the same local area network; connecting with the mobile terminal in the same local area network through an Internet Protocol (IP) address; and acquiring information whether the mobile terminal in the same local area network is in a state to be tested or not through a wireless network.
Optionally, in a fourth implementation manner of the second aspect of the embodiment of the present invention, the sending unit is specifically configured to: counting the number of the mobile terminals in a state to be tested based on the mobile terminal set information, and taking the number of the mobile terminals in the state to be tested as a test number; reading the test tasks with the number being the test number from the preset process pool; and issuing the test tasks with the number being the test number to each mobile terminal in the state to be tested.
Optionally, in a fifth implementation manner of the second aspect of the embodiment of the present invention, the test unit is specifically configured to: when the test page type in the test task is a native application, calling a native application operation API to test; when the test page type in the test task is web page application, calling an HTML5 page operation API to test; and when the test page type in the test task is a mixed application, calling the native application operation API and the HTML5 page operation API to test.
Optionally, in a sixth implementation manner of the second aspect of the embodiment of the present invention, the second obtaining unit is specifically configured to: detecting whether the mobile terminals in the mobile terminal set are tested or not according to a preset period; marking the mobile terminal which completes the test as a state to be tested; receiving a test result of the mobile terminal which completes the test; and storing the test result to a preset file directory.
A third aspect of the embodiment of the present invention provides a concurrent execution device for a test task, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the concurrent execution method for the test task according to any one of the foregoing embodiments when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, including instructions that, when executed on a computer, cause the computer to perform the steps of the method for concurrently performing test tasks according to any of the embodiments described above.
In the technical scheme provided by the embodiment of the invention, the information of the mobile terminal set is acquired, and the number of the mobile terminals in the mobile terminal set is an integer not less than 1; transmitting a test task to a mobile terminal in a state to be tested according to the mobile terminal set information; according to the type of the test page in the test task, a preset interface tool is called to test the mobile terminal in the state to be tested; and obtaining a test result of the mobile terminal set. According to the embodiment of the invention, the automatic test task can be carried out on a plurality of terminals simultaneously, and the test method is compatible with the test of a plurality of pages, so that the test efficiency of the automatic test is improved.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for concurrently executing test tasks in an embodiment of the present invention;
FIG. 2 is a schematic diagram of another embodiment of a method for concurrently executing test tasks according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of a concurrent execution apparatus for testing tasks according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of a concurrent execution apparatus for testing tasks according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an embodiment of a device for concurrently executing test tasks in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a concurrent execution method, a concurrent execution device, concurrent execution equipment and a storage medium for test tasks, wherein invalid users are identified through operation paths of the users, so that the popularization efficiency of operation popularization activities is improved, the fund utilization rate of the operation popularization activities is also improved, and the fund waste is avoided.
In order to enable those skilled in the art to better understand the present invention, embodiments of the present invention will be described below with reference to the accompanying drawings.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, a flowchart of a method for concurrently executing test tasks according to an embodiment of the present invention specifically includes:
101. and acquiring mobile terminal set information, wherein the number of the mobile terminals in the mobile terminal set is an integer not less than 1.
The server acquires information of a mobile terminal set, and the number of the mobile terminals in the mobile terminal set is an integer not less than 1. The mobile terminal set information is information of the number of mobile terminals connected with the server and whether each mobile terminal is in a state to be tested. Specifically, the server acquires information of whether the mobile terminals in the mobile terminal set are executing the test task in a wired or wireless mode; the server counts the number of mobile terminals connected to the server in a wired or wireless manner.
For example, the mobile terminal set information acquired by the server is that the number of mobile terminals connected with the server is 5, and the mobile terminals are concentrated with 3 mobile terminals in a state to be tested, 1 mobile terminal is in an initialized state, and the other 1 mobile terminal is in a test state.
The server obtains information of whether the mobile terminals in the mobile terminal set are in an idle state in a wireless mode, specifically: the server searches the mobile terminals in the same local area network; the server is connected with the mobile terminal in the same local area network through an Internet protocol (internet protocol, IP) address; the server acquires information whether the mobile terminal is in a state to be tested or not through a wireless network. For example, the mobile terminal is connected to a wireless network under the same lan as the server, and preset software, such as user interface automation test framework (uiAutomation) software, is initialized and started, the server obtains the IP address of the mobile terminal starting the preset software, connects to the mobile terminal through the IP address, and obtains information about whether the mobile terminal is in a state to be tested.
It should be noted that, the mobile terminal may be a mobile phone, a tablet computer, or other mobile terminals, which is not limited herein.
102. And sending the test task to the mobile terminal in the state to be tested according to the mobile terminal set information.
And the server sends the test task to the mobile terminal in the idle state according to the mobile terminal information. The method specifically comprises the following steps: the server counts the number of the mobile terminals in the state to be tested based on the mobile terminal set information, and takes the number of the mobile terminals in the state to be tested as the test number; the server reads the test tasks with the number being the test number from a preset process pool; the server issues test tasks with the number of tests to each mobile terminal in the state to be tested.
It should be noted that, the mobile terminal set information further includes a model of the mobile terminal, the server may obtain an operating system type of the mobile terminal according to the model of the mobile terminal, based on the mobile terminal information, the server may read different types of test tasks according to the operating system type of the test terminal, for example, when the mobile terminal sets 3 mobile terminals in a state to be tested, 1 operating system of the mobile terminal is an Android operating system, 2 operating systems are iOS, and the server may read 1 test task with the Android operating system as the test environment and 2 test tasks with the iOS operating system as the test environment from a preset process pool.
103. And calling a preset interface tool to test the mobile terminal in the state to be tested according to the type of the test page in the test task.
And the server calls a preset interface tool to test the mobile terminal in the state to be tested according to the type of the test page in the test task. Page types include native application (native application) pages, web application (Web application) pages, and hybrid application (hybrid application) pages. The native application refers to an application program which can directly run on an operating system of the mobile phone terminal, such as an application program of an iOS or Android operating system. The web application refers to a web application written in a fifth generation application hypertext markup language (hypertext markup language, html 5) that needs to be run in a browser. The hybrid application is a combination of a native application and a web application.
Specifically, when the test application in the test task is a native application, the server calls a native application operation application programming interface (application programming interface, API) to test the test task; when the test application in the test task is a web page application, calling an HTML5 page operation API; when the test application in the test task is a hybrid application, a native application operation API and an HTML5 page operation API are called.
The server establishes connection with the selenium through a browser frame driver (automatic) based on an automatic test frame (ATX) of image recognition, and calls a native application operation API provided by the ATX and an HTML5 page operation API provided by the selenium according to different application types when testing. The preset interface tool is an API for native application operations provided by ATX and an HTML5 page operations API provided by browser automation test framework (selenium).
104. And obtaining a test result of the mobile terminal set.
The server obtains the test result of the mobile terminal set. Specifically, the server detects whether the mobile terminals in the mobile terminal set are tested according to a preset period; the server marks the mobile terminal which completes the test as a state to be tested; the server receives the test result of the mobile terminal which completes the test; the server stores the test result in a preset file directory, wherein the preset file target is set by the server according to the file target provided by staff, and can be a server database directory, a terminal file directory or a mobile storage medium directory, and the preset file target is not limited in specific.
The preset period is a duration set according to the average completion time of the test task, and may be adjusted according to the actual situation, or may be 30 seconds or one minute, which is not limited in this embodiment. The test result may be in the form of characters or charts, and may be set according to actual requirements, which is not limited herein.
According to the embodiment of the invention, the automatic test task can be carried out on a plurality of terminals simultaneously, and the test method is compatible with the test of a plurality of pages, so that the test efficiency of the automatic test is improved.
Referring to fig. 2, another embodiment of a method for concurrently executing test tasks in an embodiment of the present invention includes:
201. and acquiring mobile terminal set information, wherein the number of the mobile terminals in the mobile terminal set is an integer not less than 1.
The server acquires information of a mobile terminal set, and the number of the mobile terminals in the mobile terminal set is an integer not less than 1. The mobile terminal set information is information of the number of mobile terminals connected with the server and whether each mobile terminal is in a state to be tested. Specifically, the server acquires information of whether the mobile terminals in the mobile terminal set are executing the test task in a wired or wireless mode; the server counts the number of mobile terminals connected to the server in a wired or wireless manner.
For example, the mobile terminal set information acquired by the server is that the number of mobile terminals connected with the server is 5, and the mobile terminals are concentrated with 3 mobile terminals in a state to be tested, 1 mobile terminal is in an initialized state, and the other 1 mobile terminal is in a test state.
The server obtains information of whether the mobile terminals in the mobile terminal set are in an idle state in a wireless mode, specifically: the server searches the mobile terminals in the same local area network; the server is connected with the mobile terminal in the same local area network through an IP address; the server acquires information whether the mobile terminal is in a state to be tested or not through a wireless network. For example, the mobile terminal is connected to a wireless network under the same lan as the server, a preset software, such as uiautomatic software, is initialized and started, the server obtains the IP address of the mobile terminal that starts the preset software, and connects to the mobile terminal through the IP address and obtains information about whether the mobile terminal is in a state to be tested.
It should be noted that, the mobile terminal may be a mobile phone, a tablet computer, or other mobile terminals, which is not limited herein.
202. And obtaining a test task.
The server obtains the test task. The test tasks are a set of test inputs, execution conditions, execution steps and expected results for testing program paths of different types of application pages or for verifying preset requirements. Such as testing tasks for testing Android native application pages or HTML5 pages.
The server stores the acquired test task into a preset process pool, and stores the acquired test task into a corresponding process sequence according to the test environment of the test task and the acquisition time of the test task. For example, the test tasks of all iOS native application pages and the test tasks of all iOS hybrid application pages are stored in a preset process sequence in a preset process pool.
203. And counting the number of the mobile terminals in the state to be tested based on the mobile terminal set information, and taking the number of the mobile terminals in the state to be tested as the test number.
The server counts the number of the mobile terminals in the state to be tested based on the mobile terminal set information, and takes the number of the mobile terminals in the state to be tested as the test number. Specifically, the server determines the type of an operating system of each mobile terminal based on the model of each mobile terminal in the mobile terminal set information, wherein the operating system type comprises an Android operating system and an iOS operating system; the server respectively counts the number of the mobile terminals of the Android operating system and the iOS operating system for all the mobile terminals in the state to be tested based on the information of whether each mobile terminal in the mobile terminal set information is in the state to be tested; the server takes the number of mobile terminals in a state to be tested and with an operating system being an Android operating system as a first test number, and takes the number of mobile terminals in a state to be tested and with an operating system being an iOS operating system as a second test number.
For example, in the mobile terminal set a, there are 3 mobile terminals in the state to be tested, and the server obtains that the models of the 3 mobile terminals are HUAWEI P20, millet mix3 and IPHONE 7P respectively, so that the server counts that in the mobile terminal set a, there are 2 mobile terminal operating systems in the testable state as Android operating systems, there are 1 mobile terminal operating systems as iOS operating systems, the first test number is 2, and the second test number is 1.
204. And reading the test tasks with the number being the test number from a preset process pool.
The server reads the test tasks with the number being the test number from a preset process pool. Specifically, according to the counted first test quantity and second test quantity, the server reads the test tasks with the first test quantity from a first preset process sequence with the test environment being the Android operating system in a preset process pool, and reads the test tasks with the second test quantity from a second preset process sequence with the test environment being the iOS operating system.
It can be understood that when the number of test tasks in the first preset process sequence of the Android operating system is smaller than the first test number, the server reads all the test tasks in the first preset process sequence; when the test environment is that the number of the test tasks in the second preset process sequence of the iOS operating system is smaller than the second test number, the server reads all the test tasks in the second preset process sequence.
205. And issuing the test tasks with the number being the test number to each mobile terminal in the state to be tested.
The server issues test tasks with the number of tests to each mobile terminal in the state to be tested. Specifically, the server issues test tasks with the number of first test numbers and the test environment of the Android operating system to each mobile terminal with the operating system of the Android operating system in a state to be tested; and the server transmits the test tasks with the second test quantity and the test environment of the iOS operating system to each mobile terminal with the operating system of the iOS operating system in a state to be tested.
206. And calling a preset interface tool to test the mobile terminal in the state to be tested according to the type of the test page in the test task.
And the server calls a preset interface tool to test the mobile terminal in the state to be tested according to the type of the test page in the test task. The page types include native application pages, web application pages, and hybrid application pages. The native application refers to an application program which can directly run on an operating system of the mobile phone terminal, such as an application program of an iOS or Android operating system. The web application refers to a web application written in HTML5 language that needs to be run in a browser. The hybrid application is a combination of a native application and a web application.
Specifically, when the test application in the test task is a native application, the server calls a native application operation API to test the test task; when the test application in the test task is a web page application, calling an HTML5 page operation API; when the test application in the test task is a hybrid application, a native application operation API and an HTML5 page operation API are called.
The server establishes connection with the selenium through the chromadriver based on the ATX, and calls the native application operation API provided by the ATX and the HTML5 page operation API provided by the selenium according to different application types when testing. The preset interface tool is a native application operation API provided by ATX and an HTML5 page operation API provided by selenium.
207. And obtaining a test result of the mobile terminal set.
The server obtains the test result of the mobile terminal set. Specifically, the server detects whether the mobile terminals in the mobile terminal set are tested according to a preset period; the server marks the mobile terminal which completes the test as a state to be tested; the server receives the test result of the mobile terminal which completes the test; the server stores the test result in a preset file directory, wherein the preset file target is set by the server according to the file target provided by staff, and can be a server database directory, a terminal file directory or a mobile storage medium directory, and the preset file target is not limited in specific.
The preset period is a duration set according to the average completion time of the test task, and may be adjusted according to the actual situation, or may be 30 seconds or one minute, which is not limited in this embodiment. The test result may be in the form of characters or charts, and may be set according to actual requirements, which is not limited herein.
According to the embodiment of the invention, the automatic test task can be carried out on a plurality of terminals simultaneously, and the test method is compatible with the test of a plurality of pages, so that the test efficiency of the automatic test is improved.
The method for concurrently executing the test tasks in the embodiment of the present invention is described above, and the apparatus for concurrently executing the test tasks in the embodiment of the present invention is described below, referring to fig. 3, where an embodiment of the apparatus for concurrently executing the test tasks in the embodiment of the present invention includes:
a first obtaining unit 301, configured to obtain mobile terminal set information, where the number of mobile terminals in the mobile terminal set is an integer not less than 1;
a sending unit 302, configured to send a test task to a mobile terminal in a state to be tested according to the mobile terminal set information;
the testing unit 303 is configured to invoke a preset interface tool on the mobile terminal in a state to be tested to perform a test according to a test page type in the test task;
A second obtaining unit 304, configured to receive a test result of the mobile terminal set.
According to the embodiment of the invention, the automatic test task can be carried out on a plurality of terminals simultaneously, and the test method is compatible with the test of a plurality of pages, so that the test efficiency of the automatic test is improved.
Referring to fig. 4, an embodiment of a concurrent execution device for testing tasks in an embodiment of the present invention includes:
a first obtaining unit 301, configured to obtain mobile terminal set information, where the number of mobile terminals in the mobile terminal set is an integer not less than 1;
a sending unit 302, configured to send a test task to a mobile terminal in a state to be tested according to the mobile terminal set information;
the testing unit 303 is configured to invoke a preset interface tool on the mobile terminal in a state to be tested to perform a test according to a test page type in the test task;
a second obtaining unit 304, configured to receive a test result of the mobile terminal set.
According to the embodiment of the invention, the automatic test task can be carried out on a plurality of terminals simultaneously, and the test method is compatible with the test of a plurality of pages, so that the test efficiency of the automatic test is improved.
Optionally, the concurrent execution device of the test task further includes:
A third obtaining unit 305, configured to obtain the test task;
the third obtaining unit is further configured to store the test task to a preset process pool.
Optionally, the first acquiring unit 301 specifically includes:
a statistics module 3011, configured to count the number of mobile terminals connected in a wired or wireless manner;
a first obtaining module 3012, configured to obtain, in a wired manner, information about whether a mobile terminal in the mobile terminal set is in a state to be tested;
the second obtaining module 3013 is configured to obtain, in a wireless manner, information about whether the mobile terminals in the mobile terminal set are in a state to be tested:
optionally, the second obtaining module 3013 is specifically configured to:
searching for mobile terminals in the same local area network; connecting with the mobile terminal in the same local area network through an Internet Protocol (IP) address; and acquiring information whether the mobile terminal in the same local area network is in a state to be tested or not through a wireless network.
Optionally, the sending unit 302 is specifically configured to:
counting the number of the mobile terminals in a state to be tested based on the mobile terminal set information, and taking the number of the mobile terminals in the state to be tested as a test number; reading the test tasks with the number being the test number from the preset process pool; and issuing the test tasks with the number being the test number to each mobile terminal in the state to be tested.
Optionally, the test unit 303 is specifically configured to:
when the test page type in the test task is a native application, calling a native application operation interface API to test; when the test page type in the test task is web page application, calling a fifth generation hypertext markup language (HTML 5) page operation API to test; and when the test page type in the test task is a mixed application, calling the native application operation API and the HTML5 page operation API to test.
Optionally, the second obtaining unit 304 is specifically configured to:
detecting whether the mobile terminals in the mobile terminal set are tested or not according to a preset period; marking the mobile terminal which completes the test as a state to be tested; receiving a test result of the mobile terminal which completes the test; and storing the test result to a preset file directory.
According to the embodiment of the invention, the automatic test task can be carried out on a plurality of terminals simultaneously, and the test method is compatible with the test of a plurality of pages, so that the test efficiency of the automatic test is improved.
The concurrent execution apparatus for test tasks in the embodiment of the present invention is described in detail above in fig. 3 to 4 from the point of view of modularized functional entities, and the concurrent execution apparatus for test tasks in the embodiment of the present invention is described in detail below from the point of view of hardware processing.
Fig. 5 is a schematic structural diagram of a concurrent execution device for test tasks according to an embodiment of the present invention, where the concurrent execution device 500 for test tasks may have a relatively large difference due to configuration or performance, and may include one or more processors (central processingunits, CPU) 501 (e.g., one or more processors) and a memory 509, and one or more storage media 508 (e.g., one or more mass storage devices) storing applications 507 or data 506. Wherein the memory 509 and storage medium 508 may be transitory or persistent storage. The program stored on the storage medium 508 may include one or more modules (not shown), each of which may include a series of instruction operations in a concurrent execution device for test tasks. More optionally, the processor 501 may be configured to communicate with the storage medium 508 and execute a series of instruction operations in the storage medium 508 on the concurrent execution device 500 of test tasks.
The concurrent execution apparatus 500 for test tasks may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input/output interfaces 504, and/or one or more operating systems 505, such as Windows Server, mac OS X, unix, linux, freeBSD, and the like. Those skilled in the art will appreciate that the concurrent execution device structure of the test tasks shown in fig. 5 does not constitute a limitation of concurrent execution devices of the test tasks, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components. The processor 501 may perform the functions of the first acquisition unit 301, the transmission unit 302, the test unit 303, and the second acquisition unit 304 in the above-described embodiments.
The following describes the components of the concurrent execution apparatus for testing tasks in detail with reference to fig. 5:
the processor 501 is a control center of a concurrent execution device of a test task, and may perform processing according to a set concurrent execution method of the test task. The processor 501 connects various parts of the concurrent execution device of the entire test task using various interfaces and lines to implement the concurrent execution of the test task by running or executing software programs and/or modules stored in the memory 509 and invoking data stored in the memory 509 to perform various functions and process data of the concurrent execution device of the test task. Both the storage medium 508 and the memory 509 are carriers for storing data, the storage medium 508 may refer to an internal memory having a small storage capacity but a high speed, and the memory 509 may be an external memory having a large storage capacity but a low storage speed.
The memory 509 may be used to store software programs and modules, and the processor 501 performs various functional applications and data processing of the concurrent execution device 500 for testing tasks by running the software programs and modules stored in the memory 509. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (a program for calling a preset interface tool to test the mobile terminal in a state to be tested, etc.), etc.; the storage data area may store data created according to the use of concurrent execution devices for test tasks (such as test results, etc.), and the like. In addition, the memory 509 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 volatile solid-state storage device. The concurrent execution method program of the test tasks and the received data stream provided in the embodiment of the present invention are stored in the memory, and the processor 501 is called from the memory 509 when necessary for use.
When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center by means of wired (e.g., coaxial cable, fiber optic cable, twisted pair), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a data center that contains one or more integration of available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., an optical disk), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiment of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or partly in the form of a software product or all or part of the technical solution, which is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. A method for concurrently executing test tasks, comprising:
acquiring mobile terminal set information, wherein the number of mobile terminals in the mobile terminal set is an integer not less than 1;
transmitting a test task to a mobile terminal in a state to be tested according to the mobile terminal set information;
according to the type of the test page in the test task, a preset interface tool is called to test the mobile terminal in the state to be tested;
obtaining a test result of the mobile terminal set;
before the test task is sent to the mobile terminal in the state to be tested according to the mobile terminal set information, after the mobile terminal set information is obtained and the number of the mobile terminals in the mobile terminal set is an integer not less than 1, the method further comprises: acquiring the test task; storing the test task into a preset process pool; storing the acquired time of the test task to a corresponding process sequence according to the test environment of the test task;
the step of sending the test task to the mobile terminal in the state to be tested according to the mobile terminal set information comprises the following steps: counting the number of the mobile terminals in a state to be tested based on the mobile terminal set information, and taking the number of the mobile terminals in the state to be tested as a test number; reading the test tasks with the number being the test number from the preset process pool; issuing the test tasks with the number being the test number to each mobile terminal in the state to be tested;
And according to the type of the test page in the test task, calling a preset interface tool to test the mobile terminal in the state to be tested, wherein the method comprises the following steps: when the test page type in the test task is a native application, calling a native application operation interface API to test; when the test page type in the test task is web page application, calling a fifth generation hypertext markup language (HTML 5) page operation API to test; when the test page type in the test task is a mixed application, calling the native application operation API and the HTML5 page operation API to test;
the counting of the number of the mobile terminals in the state to be tested based on the mobile terminal set information, and taking the number of the mobile terminals in the state to be tested as the test number, comprises the following steps: the server counts the number of the mobile terminals in the state to be tested based on the mobile terminal set information, and takes the number of the mobile terminals in the state to be tested as the test number; the server determines the type of an operating system of each mobile terminal based on the model of each mobile terminal in the mobile terminal set information, wherein the operating system type comprises an Android operating system and an iOS operating system; the server respectively counts the number of the mobile terminals of the Android operating system and the iOS operating system for all the mobile terminals in the state to be tested based on the information of whether each mobile terminal in the mobile terminal set information is in the state to be tested; the server takes the number of mobile terminals in a state to be tested and with the operating system being the Android operating system as a first test number and takes the number of mobile terminals in a state to be tested and with the operating system being the iOS operating system as a second test number;
The reading the test tasks with the test number from the preset process pool comprises the following steps: the server reads the test tasks with the number being the test number from the preset process pool; according to the counted first test quantity and second test quantity, the server reads the test tasks with the first test quantity from a first preset process sequence with the test environment being the Android operating system in the preset process pool, and reads the test tasks with the second test quantity from a second preset process sequence with the test environment being the iOS operating system; when the test environment is that the number of test tasks in a first preset process sequence of the Android operating system is smaller than the first test number, the server reads all the test tasks in the first preset process sequence; when the test environment is that the number of test tasks in a second preset process sequence of the iOS operating system is smaller than the second test number, the server reads all the test tasks in the second preset process sequence.
2. The method for concurrently executing test tasks according to claim 1, wherein obtaining mobile terminal set information, the number of mobile terminals in the mobile terminal set being an integer not less than 1, comprises:
Counting the number of mobile terminals connected in a wired or wireless mode;
obtaining information of whether the mobile terminals in the mobile terminal set are in a state to be tested or not in a wired mode;
and acquiring information whether the mobile terminals in the mobile terminal set are in a state to be tested or not in a wireless mode.
3. The method for concurrently executing test tasks according to claim 2, wherein the obtaining, by wireless means, information about whether the mobile terminals in the mobile terminal set are in a state to be tested, includes:
searching for mobile terminals in the same local area network;
connecting with the mobile terminal in the same local area network through an Internet Protocol (IP) address;
and acquiring information whether the mobile terminal in the same local area network is in a state to be tested or not through a wireless network.
4. A method for concurrently executing test tasks according to any of claims 1-3, wherein the obtaining the test result of the mobile terminal set comprises:
detecting whether the mobile terminals in the mobile terminal set are tested or not according to a preset period;
marking the mobile terminal which completes the test as a state to be tested;
receiving a test result of the mobile terminal which completes the test;
And storing the test result to a preset file directory.
5. A concurrent execution apparatus for testing tasks, comprising:
the mobile terminal comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring mobile terminal set information, and the number of mobile terminals in the mobile terminal set is an integer not less than 1;
the sending unit is used for sending the test task to the mobile terminal in the state to be tested according to the mobile terminal set information;
the test unit is used for calling a preset interface tool on the mobile terminal in a state to be tested for testing according to the type of the test page in the test task;
the second acquisition unit is used for receiving the test result of the mobile terminal set;
the apparatus further comprises: the third acquisition unit is used for acquiring the test task; storing the test task into a preset process pool; storing the acquired time of the test task to a corresponding process sequence according to the test environment of the test task;
the sending unit is further configured to count the number of mobile terminals in a state to be tested based on the mobile terminal set information, and take the number of mobile terminals in the state to be tested as a test number; reading the test tasks with the number being the test number from the preset process pool; issuing the test tasks with the number being the test number to each mobile terminal in the state to be tested;
The test unit is further used for calling a native application operation interface (API) to test when the test page type in the test task is a native application; when the test page type in the test task is web page application, calling a fifth generation hypertext markup language (HTML 5) page operation API to test; when the test page type in the test task is a mixed application, calling the native application operation API and the HTML5 page operation API to test;
the test unit is further used for calling a native application operation interface (API) to test when the test page type in the test task is a native application; when the test page type in the test task is web page application, calling a fifth generation hypertext markup language (HTML 5) page operation API to test; when the test page type in the test task is a mixed application, calling the native application operation API and the HTML5 page operation API to test;
the sending unit is further used for counting the number of the mobile terminals in the state to be tested based on the mobile terminal set information by the server, and taking the number of the mobile terminals in the state to be tested as the test number; the server determines the type of an operating system of each mobile terminal based on the model of each mobile terminal in the mobile terminal set information, wherein the operating system type comprises an Android operating system and an iOS operating system; the server respectively counts the number of the mobile terminals of the Android operating system and the iOS operating system for all the mobile terminals in the state to be tested based on the information of whether each mobile terminal in the mobile terminal set information is in the state to be tested; the server takes the number of mobile terminals in a state to be tested and with the operating system being the Android operating system as a first test number and takes the number of mobile terminals in a state to be tested and with the operating system being the iOS operating system as a second test number;
The sending unit is further used for reading the test tasks with the number being the test number from the preset process pool by the server; according to the counted first test quantity and second test quantity, the server reads the test tasks with the first test quantity from a first preset process sequence with the test environment being the Android operating system in the preset process pool, and reads the test tasks with the second test quantity from a second preset process sequence with the test environment being the iOS operating system; when the test environment is that the number of test tasks in a first preset process sequence of the Android operating system is smaller than the first test number, the server reads all the test tasks in the first preset process sequence; when the test environment is that the number of test tasks in a second preset process sequence of the iOS operating system is smaller than the second test number, the server reads all the test tasks in the second preset process sequence.
6. A device for concurrent execution of test tasks, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method for concurrent execution of test tasks according to any one of claims 1-4 when executing the computer program.
7. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform a concurrent execution method of a test task according to any one of claims 1-4.
CN201910477791.XA 2019-06-03 2019-06-03 Concurrent execution method, device and equipment of test tasks and storage medium Active CN110309065B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910477791.XA CN110309065B (en) 2019-06-03 2019-06-03 Concurrent execution method, device and equipment of test tasks and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910477791.XA CN110309065B (en) 2019-06-03 2019-06-03 Concurrent execution method, device and equipment of test tasks and storage medium

Publications (2)

Publication Number Publication Date
CN110309065A CN110309065A (en) 2019-10-08
CN110309065B true CN110309065B (en) 2023-05-30

Family

ID=68075033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910477791.XA Active CN110309065B (en) 2019-06-03 2019-06-03 Concurrent execution method, device and equipment of test tasks and storage medium

Country Status (1)

Country Link
CN (1) CN110309065B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061526B (en) * 2019-10-12 2023-12-01 天航长鹰(江苏)科技有限公司 Automatic test method, device, computer equipment and storage medium
CN110888807B (en) * 2019-11-15 2024-04-26 苏州金智渠信息技术有限公司 Automatic packet grabbing method for android application
CN111786852B (en) * 2020-06-30 2022-08-26 展讯通信(上海)有限公司 Test method and related equipment
CN113065079B (en) * 2021-04-13 2023-10-13 开鑫金服(南京)信息服务有限公司 Method, equipment and storage medium for realizing calling of native page based on address protocol

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9103874B2 (en) * 2012-01-09 2015-08-11 International Business Machines Corporation Concurrent test instrumentation
US9021438B2 (en) * 2013-06-20 2015-04-28 Sap Portals Israel Ltd Automatic framework for parallel testing on multiple testing environments
CN104978259B (en) * 2014-04-01 2017-11-17 中国银联股份有限公司 Mobile device software automated testing group system and its method of testing

Also Published As

Publication number Publication date
CN110309065A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
CN110309065B (en) Concurrent execution method, device and equipment of test tasks and storage medium
RU2648966C2 (en) Apparatus and method for processing multiple open api
CN107809383B (en) MVC-based path mapping method and device
CN103150238A (en) Service request processing method, simulation performance test method and simulation performance test device
CN110598135A (en) Network request processing method and device, computer readable medium and electronic equipment
CN107766509A (en) A kind of method and apparatus of webpage static backup
CN107395747A (en) A kind of high extended method based on STF platforms
CN106034113A (en) Data processing method and data processing device
CN106936660B (en) Data acquisition method and device
CN112256557B (en) Program regression testing method, device, system, computer equipment and storage medium
CN101442539B (en) Method and apparatus for implementing field filtration
CN112579406B (en) Log call chain generation method and device
CN112671878A (en) Block chain information subscription method, device, server and storage medium
CN109684156B (en) Monitoring method, device, terminal and storage medium based on mixed mode application
CN108205487A (en) A kind of method, apparatus and user terminal for monitoring browser performance
CN111045934A (en) Page analysis method, device, client, storage medium and electronic equipment
CN106648912A (en) Modular method and apparatus for data processing in data acquisition platform
CN115904388A (en) Application program protocol analysis method, device, equipment and storage medium
CN114253441A (en) Target function starting method and device, storage medium and electronic device
CN112417324A (en) Chrome-based URL (Uniform resource locator) interception method and device and computer equipment
CN111124365A (en) RPA demand collection method and device
CN110096281A (en) Code analysis method, resolution server, storage medium and device
CN117528431B (en) Data monitoring method and device of communication platform and terminal equipment
CN110659214B (en) Information processing system, method, computing device, and storage medium
CN110866211B (en) Method and device for processing abnormal page of client

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