CN109302522B - Test method, test device, computer system, and computer medium - Google Patents

Test method, test device, computer system, and computer medium Download PDF

Info

Publication number
CN109302522B
CN109302522B CN201811057022.6A CN201811057022A CN109302522B CN 109302522 B CN109302522 B CN 109302522B CN 201811057022 A CN201811057022 A CN 201811057022A CN 109302522 B CN109302522 B CN 109302522B
Authority
CN
China
Prior art keywords
test
information
testing
application package
package
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
CN201811057022.6A
Other languages
Chinese (zh)
Other versions
CN109302522A (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.)
Jingdong Technology Holding Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN201811057022.6A priority Critical patent/CN109302522B/en
Publication of CN109302522A publication Critical patent/CN109302522A/en
Application granted granted Critical
Publication of CN109302522B publication Critical patent/CN109302522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing

Abstract

The test method is applied to a test server, the test server is in communication connection with at least one test device and can remotely control the at least one test device, an STF test platform and a simulated manual click tool which are constructed based on an STF mobile phone management framework are arranged in the test server, and the method comprises the following steps: receiving a first request instruction, wherein the first request instruction comprises test application information, and the test application information is used for determining a test application package; responding to the received first request instruction, and acquiring a test application package according to the test application information, wherein the test application package comprises a test application installation package; testing the at least one piece of test equipment by using the test application package based on a preset test mode at least by using a simulated manual click tool to obtain a test result; and sending the test result.

Description

Test method, test device, computer system, and computer medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a test method, an apparatus, a computer system, and a medium.
Background
The mobile terminal test is an important component in the whole test link and may include a mobile terminal compatibility test, a performance test, and the like, and the conventional test method needs to repeatedly execute all test cases on each test device, acquire performance data, and check whether an execution process and an execution result of each test device are abnormal or not. The data collected includes, but is not limited to: data of device dimensions, data of device performance dimensions, data of compatibility dimensions, and various logs, screenshots, and the like.
The conventional automated testing framework is difficult to support the data to be collected, and therefore, the mobile terminal compatibility test and the performance test cannot meet the automated testing process. For example, performance data acquisition generally uses an android debug bridge (adb) command or a third-party application (app) to acquire various performance data, repetitive work exists in the data acquisition process, the acquisition process consumes time and labor, the data acquisition mode in the prior art is separated from automatic testing, and no standardized scheme is used for supporting. In addition, the number of frames involved in the test process is large, the requirements on testers are high, and the test difficulty is high.
Disclosure of Invention
In view of the above, the present disclosure provides a testing method, device, computer system and medium with low difficulty of use and consistent with an automated testing process.
One aspect of the present disclosure provides a testing method, which may be applied to a testing server, where the testing server may be in communication connection with at least one testing device, the testing server has an STF testing platform and a simulated manual click tool, which are constructed based on an STF mobile phone management framework, and the simulated manual click tool may simulate manual click testing, and the testing server may further remotely control the at least one testing device by means of an application program interface of the STF mobile phone management framework, and the method may include: firstly, receiving a first request instruction, wherein the first request instruction comprises test application information, the test application information is used for determining a test application package, and acquiring the test application package according to the test application information in response to receiving the first request instruction, wherein the test application package comprises a test application installation package, the test application installation package can be a test application installation package pre-stored in a test server, so that a tester can find the test application installation package from the test server by inputting the relevant information of the required test application package, and then testing in at least one test device by using the test application package based on a preset test mode by using at least a simulated manual click tool to obtain a test result, wherein the test process is realized by simulating manual click, so that the programming work of the tester for realizing the test can be at least partially reduced, the test difficulty is greatly reduced, in addition, various logic processing through background packaging is realized through a preset test method, a test task can be issued as long as a tester selects a test application package, the next test process can be tested according to various logics of the background packaging, the test difficulty is further reduced, and the test result can be displayed by sending the test result to a request end after the test result is obtained.
According to an embodiment of the present disclosure, the test platform test server may store at least one test application package and an application package information corresponding relationship, where the application package information may include any one or more of the following: the method comprises the following steps of obtaining package name information of an application package, version information of the application package, user information of the application package, package workflow (activity) information or encryption information of the package name, wherein the application package information can be used for recording attribute information and used information of a test application package so as to facilitate searching or checking workflow information or tracing use conditions of the test application package. Accordingly, the obtaining of the test application package according to the test application information may include: firstly, the test application package is obtained according to the test application information and the corresponding relation between the at least one test application package and the application package information, and then the application package information can be updated, for example, when the test application package is used by who, the method has the advantage that when a plurality of test devices are occupied by other test personnel and the test personnel need a plurality of test devices, the test devices can be checked according to the recently used test application information, so that the test personnel can conveniently communicate with the corresponding test personnel, and the use of the test devices is coordinated.
According to the embodiment of the present disclosure, the method may further include establishing a correspondence relationship between the uploaded test application package and the application package information after receiving the uploaded test application package. This facilitates maintenance of the test server and updating of test application information. For example, when a tester inputs test application information and does not find a corresponding test application package, the tester can upload the test application package by itself for use by the tester or other testers, and meanwhile, the corresponding relationship between the uploaded test application package and the application package information is also established for subsequent use.
According to an embodiment of the present disclosure, the simulated manual click tool is a Monkey (Monkey) tool. The Monkey tool can randomly and circularly simulate manual clicking on android equipment, replaces writing cases, and is convenient for collecting various test data through programs.
According to an embodiment of the present disclosure, the preset test mode includes any one or more of the following: installation testing, start testing, uninstall testing, overlay installation testing, login testing, uninstall testing, statistical start-up hours, stress testing, delay testing, or exception testing. The test logic may exist among various test modes, for example, the installation test, the start test and the uninstallation test may be a set of consecutive tests, the pressure test, the delay test and the exception test may be a set of consecutive tests, and the coverage installation test, the login test, the uninstallation test and the statistical start-up test may be a set of consecutive tests, so that the finally obtained test data may be more logical, and the previous test may be the basis of the later test, for example, the start test may be performed only after the installation is successful, and then the performance test and the uninstallation test may be performed. That is, there are various combinations, which are not limited herein.
According to an embodiment of the present disclosure, the test method may further include the operations of: before the test application packet is used for testing in the at least one test device, the device state of the at least one test device is obtained, wherein the device state comprises an occupied state and an empty state, so that confusion caused by the fact that one test device is used by a plurality of testers at the same time can be effectively avoided. Accordingly, the testing in the at least one test device using the test application package may include testing in at least one test device in an empty state using the test application package.
According to an embodiment of the present disclosure, the testing in the at least one test device in the idle state using the test application package may include the following operations: first, a second request instruction is received, where the second request instruction includes test device information requesting an idle state, and the test device information in the idle state may be sent to a request end in response to receiving the second request instruction. Then, a third request instruction may be received, where the third request instruction includes test device information of an unoccupied state requested to be occupied, and in response to receiving the third request instruction, an occupation interface of the STF handset management frame is called to occupy a test device corresponding to the test device information of the unoccupied state requested to be occupied, and after occupation is successful, a device state of the test device corresponding to the test device information of the unoccupied state requested to be occupied is updated, so that other testers can know a use state of each test device in time, for example, a test server only displays a test device list of the test device of the unoccupied state, and once a test device of a certain unoccupied state is occupied, the test device is deleted from the displayed test device list. And then, testing the test equipment corresponding to the test equipment information of the vacant state occupied by the request by using the test application packet.
According to an embodiment of the present disclosure, the performing of the special test in the test device corresponding to the selected test device information that is requested to be occupied by using the test application package may include a data acquisition and storage process and a data analysis process, where the data acquisition and storage process may include acquiring and storing operation data generated in the test process based on a preset test mode, and the operation data includes any one or more of the following: the method comprises the steps of unique code of the device, starting test time, starting first page time, whether the starting is successful or not, data generated when the monkey tool is executed, memory information of the test device, CPU information of the test device, network flow information, installation information, test device and installation package information, an installation package icon, the name of a test application package, the version of a software development kit (sdk for short), the brand of the test device, and an IP address and a port for remote connection of the test device. The data analysis process may include generating test report data of various preset dimensions from the operation data by analyzing a json string. Therefore, test report data of various preset dimensions can be obtained, and statistical analysis can be performed according to the preset dimensions in the follow-up process.
According to the embodiment of the disclosure, the test server may store a test result visualization display template, for example, various visualization templates such as an Excel chart template, and when data is filled in the template, a visualization report may be automatically generated, and accordingly, the method may further include the following operations: after the test report data is generated, a visual test result is generated by using the test report data and the visual test result display template, and accordingly, the sending of the test result may include sending the visual test result, and of course, the test data may also be sent to the request end at the same time, which is not limited herein.
Another aspect of the present disclosure provides a testing apparatus, which is communicatively connected to at least one testing device and can remotely control the at least one testing device, where the testing apparatus has an STF testing platform constructed based on an STF handset management framework and a simulated manual click tool therein, and accordingly, the testing apparatus may include a receiving module, an application package obtaining module, a testing module, and a sending module, where the receiving module is configured to receive a first request instruction, the first request instruction includes testing application information, the testing application information is used to determine a testing application package, the application package obtaining module is configured to obtain the testing application package according to the testing application information in response to receiving the first request instruction, where the testing application package includes a testing application installation package, and the testing module is configured to use at least the simulated manual click tool based on a preset testing mode, and the sending module is used for sending the test result.
According to an embodiment of the present disclosure, the testing device may store at least one corresponding relationship between the testing application package and the application package information, where the application package information includes any one or more of the following: the application package obtaining module may include an obtaining unit and an updating unit, wherein the obtaining unit is configured to obtain the test application package according to the test application information and a corresponding relationship between the at least one test application package and the application package information, and the updating unit is configured to update the application package information.
According to an embodiment of the present disclosure, the test apparatus may further include a creating module, where the creating module is configured to establish a correspondence between the uploaded test application package and the application package information after receiving the uploaded test application package.
According to an embodiment of the present disclosure, the test apparatus may further include a state obtaining module, where the state obtaining module may be configured to obtain a device state of the at least one test device before the test application package is used to perform a test in the at least one test device, where the device state includes an occupied state and an empty state, and accordingly, the test module is specifically configured to perform a test in the at least one empty test device using the test application package.
According to an embodiment of the present disclosure, the test module may include a first receiving unit, a sending unit, a second receiving unit, an occupying unit, and a test unit, wherein the first receiving unit is configured to receive a second request instruction, the second request instruction includes test device information requesting an idle state, the sending unit is configured to send the test device information requesting the idle state in response to receiving the second request instruction, the second receiving unit is configured to receive a third request instruction, the third request instruction includes test device information requesting the idle state, the occupying unit is configured to invoke an occupying interface of the STF handset management framework to occupy a test device corresponding to the test device information requesting the idle state of the occupied state in response to receiving the third request instruction, and update a device state of the test device corresponding to the test device information requesting the idle state of the occupied state after the occupation is successful, the test unit is used for testing the test equipment corresponding to the test equipment information of the vacant state occupied by the request by using the test application packet.
According to an embodiment of the present disclosure, the simulated manual click tool is a monkey tool.
According to an embodiment of the present disclosure, the preset test mode includes any one or more of the following: installation testing, start testing, uninstall testing, overlay installation testing, login testing, uninstall testing, statistical start-up hours, stress testing, delay testing, or exception testing.
According to an embodiment of the present disclosure, the test unit may include a data acquisition subunit and an analysis subunit, where the data acquisition subunit is configured to acquire and store operation data generated in a test process based on a preset test mode, and the operation data includes any one or more of the following: the device comprises a unique code of the device, test starting time, first page starting time, whether the start is successful, data generated when a monkey tool is executed, memory information of the test device, CPU information of the test device, network flow information, installation information, the test device, installation package information, an installation package icon, a name of a test application package, sdk versions, a brand of the test device, and an IP address and a port of remote connection of the test device, wherein the analysis subunit is used for generating test report data of various preset dimensions from the operation data in a json string analysis mode. Therefore, the operation data generated in the test process can be analyzed into data with various preset dimensions so as to facilitate the subsequent statistical analysis.
According to an embodiment of the present disclosure, the test apparatus may further store a visual test result display template, and correspondingly, the test apparatus may further include a visualization module, where the visualization module may be configured to generate a visual test result by using the test report data and the visual test result display template after the test report data is generated, and correspondingly, the sending module may be specifically configured to send the visual test result.
Another aspect of the present disclosure provides a computer system that may include one or more processors, and a storage device that may be used to store executable instructions that, when executed by the processors, implement a testing method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the testing method as described above when executed by a processor.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the testing method as described above when executed by a processor.
According to the embodiment of the disclosure, the problem that the testing difficulty is high due to the fact that a tester needs to know various related frame technologies in the existing testing method can be at least partially solved, various preset testing modes can be packaged through a testing platform background, testing tasks can be issued as long as the tester selects a testing application package, and the testing platform automatically tests. In addition, due to the fact that the preset test mode is set, consistency, comparability, integrity and expandability of the data acquisition process can be achieved, and the integrity of the acquired data is guaranteed so that the accuracy of the test result is improved.
According to the embodiment of the disclosure, the test process is streamlined, a plurality of sets of solutions are integrated, compatibility test and performance test can be simultaneously met, data acquisition does not need human participation, and automatic test can be realized only by associating test equipment and selecting a test application package.
According to the embodiment of the disclosure, the android equipment can be randomly and circularly simulated to click instead of writing a case by means of a monkey tool, and the test difficulty is effectively reduced.
According to the embodiment of the disclosure, after the test platform collects data generated in various test processes, a plurality of stages of associating test equipment, triggering test, data analysis and generating report are integrated in an automatic report generating mode, and a test closed loop is formed.
According to the embodiment of the disclosure, data generated in the test process of multiple dimensions can be analyzed, so that data of different dimensions can be obtained, and further visual test results of the dimensions can be generated according to the preset visual template, which is helpful for improving the intuitiveness of the test results.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
FIG. 1A schematically illustrates an application scenario of a testing method, apparatus, and computer system and medium according to embodiments of the disclosure;
FIG. 1B schematically shows a processing logic diagram of a test method according to an embodiment of the present disclosure;
FIG. 2A schematically illustrates a flow diagram of a testing method according to an embodiment of the present disclosure;
FIG. 2B schematically illustrates a flow diagram of a testing method according to another embodiment of the present disclosure;
FIG. 2C schematically shows a schematic view of a human-machine interaction interface of a testing method according to an embodiment of the present disclosure;
FIG. 2D schematically illustrates a flow diagram of a testing method according to another embodiment of the present disclosure;
FIG. 3A schematically illustrates a visual report of compatibility testing, in accordance with an embodiment of the present disclosure;
FIG. 3B schematically illustrates a visual report of compatibility testing according to another embodiment of the present disclosure;
FIG. 3C schematically illustrates a visual report of compatibility testing according to another embodiment of the present disclosure;
FIG. 3D schematically illustrates a visual report of compatibility testing according to another embodiment of the present disclosure;
FIG. 4 schematically shows a block diagram of a testing device according to an embodiment of the present disclosure; and
FIG. 5 schematically shows a block diagram of a computer system suitable for implementing a testing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). It will be further understood by those within the art that virtually any disjunctive word and/or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase "a or B" should be understood to include the possibility of "a" or "B", or "a and B".
The embodiment of the disclosure provides a test method, a test device, a computer system and a test medium, wherein test device information is acquired in real time by using device management and device information of an STF framework, a simulated manual click tool can be used for randomly and circularly simulating manual click test devices to replace writing cases, and a test closed loop of test device management, trigger test, data analysis and report generation is realized by automatically generating reports after various data are acquired by a program.
Fig. 1A schematically illustrates an application scenario of a testing method, apparatus, and computer system and medium according to embodiments of the disclosure, and an exemplary system architecture 100 is presented in fig. 1A. It should be noted that fig. 1A is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1A, a system architecture 100 according to this embodiment may include test devices 101, 102, 103, a network 104, a server 105, and requesting devices 106, 107. The network 104 is used to provide a medium for communication links between the test devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The test personnel may use the test devices 101, 102, 103 to interact with the server 105 over the network 104 to receive or transmit information or the like. The testing devices 101, 102, 103 may be various brands and models of mobile terminals, for example, various brands or models of smart phones with android operating systems installed thereon, and the testing devices 101, 102, 103 may be used to install various client applications so as to test compatibility and performance of the application packages to be tested on the various testing devices 101, 102, 103, and the like, where the testing applications include but are not limited to: shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The requesting devices 106, 107 may be various electronic devices having display screens and supporting access to Web services, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a back-office management server (for example only) providing support for a test platform browsed by a tester using the requesting device 106, 107. The background management server may analyze and process data such as a received request of a tester, and feed back a processing result (e.g., a web page, information, or data obtained or generated according to a user request) to the test equipment.
It should be noted that the testing method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the testing device provided by the embodiments of the present disclosure may be generally disposed in the server 105. The testing method provided by the embodiments of the present disclosure may also be performed by a server or a cluster of servers different from the server 105 and capable of communicating with the testing devices 101, 102, 103 and/or the server 105. Accordingly, the testing apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the testing devices 101, 102, 103 and/or the server 105.
It should be understood that the number of test devices, networks, servers, and requesting devices in FIG. 1A are merely illustrative. There may be any number of test devices, networks, and servers, as desired for implementation.
FIG. 1B schematically shows a processing logic diagram of a test method according to an embodiment of the disclosure.
As shown in fig. 1B, the test server has a tool and a web frame that can simulate a user click, such as an STF test platform (STF server for short) and a monkey tool that are constructed based on an STF handset management frame, so that the test server can remotely control the test device through an adb command, and detect compatibility, performance, and the like of the test application package in the test device through a click instruction generated by the monkey tool. In addition, the STF server may further include a front-end data visualization application, such as echarts, so as to facilitate visualization of data obtained by the test, and send a visualized test result to the user, so that the user can view the test result more intuitively.
As an exemplary illustration, first, the service of the test platform queries whether a new test request (test task) exists in the database, if so, the thread execution task is newly started, an installation package of the corresponding test application is locally searched according to test application information, such as name, version, and the like of the test application, included in the test request, then, the STF server remotely controls (occupies) at least one test device, and then performs a test by a preset test method, for example, the installation package of the test application is installed on the occupied test device by an adb command, such as an STF handset management framework, relevant data is recorded after successful installation or failure, the test application is started after successful installation, then, a specific test is performed by executing a simulated manual click tool to obtain corresponding data, and the application is uninstalled after the test is completed, and storing all data generated in the testing process in an appointed address, analyzing the data generated in the testing process to obtain data with different preset dimensions, then directly outputting the data with different preset dimensions or analyzing and tabulating the data by utilizing visual applications such as echarts and the like, and sending the data to request equipment so as to be displayed to a tester.
Fig. 2A schematically illustrates a flow diagram of a testing method according to an embodiment of the present disclosure.
As shown in fig. 2A, the method includes operations S201 to S204. The method is applied to a test server, the test server is in communication connection with at least one test device and can remotely control the at least one test device, and the test server is provided with an STF test platform and a simulated manual click tool which are constructed based on an STF mobile phone management framework.
First, in operation S201, a first request instruction is received, where the first request instruction includes test application information, and the test application information is used to determine a test application package.
In this embodiment, the test application information may be information that may be used to determine a test application package to be tested, such as a name of the test application, a version number of the test application, and an icon of the test application. Specifically, the test server may store a corresponding relationship between the test application information and the test application package, and after a tester inputs an instruction including the test application information to the test server, the test server may find the corresponding test application package.
If the test server does not have the test application package corresponding to the test application information, the test server is indicated to possibly not store the relevant application package, and therefore the test application package can be uploaded by the tester so that the tester or other testers can conveniently use the test application package subsequently.
In addition, in order to facilitate test history tracing and the like of each test application package, the test server may further store a corresponding relationship between at least one test application package and application package information, where the application package information includes any one or more of the following: package name information of the application package, version information of the application package, user information of the application package, package workflow information, or encryption information of the package name (e.g., package name UDID encryption name). Wherein the user information of the application package can be used to indicate which testers used the test application package at what time; the package workflow information is used for user interface UI automation, generally, manual information filling is needed for automation, the information can be automatically identified through a platform and then is inserted into a script; the encrypted information of the package name is used to store in a database to distinguish the name. It should be noted that, in addition to being convenient for knowing who the application package is used by, the user information of the application package can also be convenient for coordinating the use of the testing equipment among the testing personnel, for example, test equipment cannot be configured in an unlimited number of ways, and typically each model of test equipment of each brand will be configured with one or several test equipment (e.g., test handsets), however, a plurality of testers need to use the testing equipment every day, especially for some newly marketed models of mobile phones, a lot of verification needs to be performed, and therefore, part of the testing equipment is often occupied, other testers cannot use the test equipment, and when the test equipment needing to be used is occupied by storing the corresponding relation between the test application package and the application package information, the user who is used the test application package recently can be searched, the occupied time is long, and the like, so that the test personnel can conveniently communicate the distribution affairs of the test equipment.
Accordingly, the obtaining of the test application package according to the test application information may include: firstly, acquiring the test application package according to the test application information and the corresponding relation between the at least one test application package and the application package information; then, the application package information is updated.
It should be noted that, when the test server receives a newly uploaded test application package, the corresponding relationship between the uploaded test application package and the application package information needs to be established in time. This facilitates subsequent user tracking or other functions.
Then, in operation S202, in response to receiving the first request instruction, a test application package is obtained according to the test application information, where the test application package includes a test application installation package.
In this embodiment, for example, the test server may store a corresponding relationship between the test application information and the test application package, and after a tester inputs an instruction including the test application information to the test server, the test server may find the corresponding test application package.
In operation S203, the test application package is used to perform a test in the at least one test device based on a preset test mode by using at least a simulated manual click tool, so as to obtain a test result.
In this embodiment, the preset test mode includes any one or more of the following: an install test, a launch test, an unload test, an overlay install test, a login test, an unload test, a statistical launch time, a stress (crash) test, a latency (nar) test, or an exception (exception) test. It should be noted that the test method may have a certain test logic, for example, first, an installation test is required, then a start test is performed, then, a login, a statistical start time, a stress, a delay test or an exception test may be performed, then, an uninstall test may be performed, so that a complete test flow may be formed. Further, it is also possible to perform tests of similar functions, for example, a stress test, a delay test, an abnormality test, and the like. The specific tests to be performed may depend on the requirements of the tester or the standard test flow, for example, the test modes are all displayed to the tester, and the tester selects the required test mode. It should be noted that the test mode selected by the tester may not be complete, for example, an application is not installed in the test equipment, and the tester selects only the stress test, and the test server supplements the relevant operations required for implementing the stress test, for example, installing and starting the application, and unloading the application after the test is completed.
In one embodiment, the simulated manual click tool is illustrated as a monkey (monkey) tool. Firstly, when the service of the test platform inquires a new test task from a database, a new start thread executes the test task, a corresponding installation package of the test application is searched from a test server according to the name, the version and the like of the test application contained in a test request, then the test server occupies at least one piece of test equipment through an occupied interface of an STF frame, then the test is carried out through a preset test method, for example, the installation package of the test application is installed on the occupied test equipment through an adb command of an STF mobile phone management frame, relevant data is recorded after the installation is successful or failed, the test application is started after the installation is successful, then a specific test is carried out through executing a simulated manual click tool to obtain corresponding data, the application is unloaded after the test is finished, and all data generated in the test process are stored in a designated address, and analyzing the data generated in the test process to obtain data with preset dimensionality as a test result, and sending the data to the request equipment so as to be displayed to a tester. Wherein the acquired data includes, but is not limited to, one or more of the following: the method comprises the steps of obtaining unique codes of the devices, starting test time, starting first page time, whether starting is successful or not, data generated when the monkey tool is executed, memory information of the test devices, CPU information of the test devices, network traffic information, installation information, test device and installation package information, installation package icons, names of test applications, names of test application packages, sdk versions, brands of the test devices, and IP addresses and ports of remote connection of the test devices.
By the test process, automatic test such as compatibility and performance is realized.
In operation S204, the test result is transmitted.
In this embodiment, the test result may be one or more of an equipment unique code, start test time, start top page time, whether start is successful, data generated when the monkey tool is executed, and the like, or may be a result obtained by further performing statistical analysis, for example, a total compatibility score, and the like, or may be a visual report, which is not limited herein.
Fig. 2B schematically illustrates a flow diagram of a testing method according to another embodiment of the present disclosure.
As shown in fig. 2B, the detection method may further include operation S205.
In operation S205, before performing a test in the at least one test device using the test application package, a device state of the at least one test device is obtained, where the device state includes an occupied state and an empty state.
Accordingly, the testing in the at least one test device using the test application package includes testing in at least one test device in an empty state using the test application package.
In this embodiment, the test server may also feed back, to the request terminal, the device status of each currently connected test device in real time, for example, whether each test device is in an idle state or an occupied state, so that a tester can conveniently select a suitable test device, and a conflict with other tests is avoided. It should be noted that the device list displayed to the tester by the request end may be a test device list in an empty state, a test device list in an occupied state, or a combination thereof, and is not limited herein.
Specifically, the performing a test in at least one test device in an idle state using the test application package may include:
first, a second request instruction is received, wherein the second request instruction comprises test equipment information requesting an idle state.
Then, in response to receiving the second request instruction, the test device information in the idle state is sent.
Then, a third request instruction is received, wherein the third request instruction comprises test equipment information of an occupied vacant state.
And then, in response to receiving the third request instruction, calling an occupation interface of the STF mobile phone management framework to occupy the test equipment corresponding to the test equipment information in the vacant state requested to be occupied, and updating the equipment state of the test equipment corresponding to the test equipment information in the vacant state requested to be occupied after occupation is successful.
And then, testing the test equipment corresponding to the test equipment information of the vacant state occupied by the request by using the test application packet.
The testing, performed by using the test application package, in the test device corresponding to the test device information in the vacant state requested to be occupied may include two operations: data collection operations and data parsing operations.
In the data collection operation, collecting and storing operation data generated in the test process based on a preset test mode, wherein the operation data comprises any one or more of the following data: the method comprises the steps of obtaining unique codes of the devices, starting test time, starting first page time, whether starting is successful or not, data generated when the monkey tool is executed, memory information of the test devices, CPU information of the test devices, network traffic information, installation information, test device and installation package information, installation package icons, names of test applications, names of test application packages, sdk versions, brands of the test devices, and IP addresses and ports of remote connection of the test devices.
In the data analysis operation, the running data can be generated into test report data of various preset dimensions in a json string analysis mode.
Fig. 2C schematically shows a schematic diagram of a human-machine interaction interface of a testing method according to an embodiment of the present disclosure.
In one embodiment, when a tester accesses a web service (which may be any development framework to develop a web foreground or background) through a request side (front side) browser, a page presented to a user may be as shown in fig. 2C, and the tester may select or input test application information so that a server determines a test application package, and if there is no corresponding test application package in the server, the tester may upload the required test application package. The STF test platform of the test server manages the corresponding relation between the test application package and the application package information through the database table relation, and the application package information comprises: package name, package name UDID encrypted name, user, package version number, package activity, etc. The front end can request to acquire the version and package name information corresponding to the test application package through asynchronous JavaScript (ajax for short) based on XML. Taking the example of displaying the test mobile phone in the idle state and the occupied state as an example, the test mobile phone area is selected to obtain the device state information of the connected test device in real time through the application interface of the encapsulated STF, and the test mobile phone in the idle state is displayed on the foreground. When a tester selects a test mobile phone to be occupied, the foreground sends an ajax request to a corresponding context method, and an occupation interface of the STF can be called in the method, so that the test mobile phone selected by the tester can be occupied, if the occupation is successful, the information of the test mobile phone can be removed from a control state test equipment list, and the information can be added into the occupied test equipment, so that other testers are prevented from selecting the same test mobile phone at the same time. After a tester inputs test application information and selects a test mobile phone, the front end sends the relevant information as request information to the test server, and the test server uses the test application packet to test in the at least one test device according to a preset test mode. It should be noted that, at this time, the operation of the tester is completed, and the subsequent testing process is completed by the test server background.
The following illustrates an example of the test logic of the test server, which can be seen with reference to FIG. 1B.
The service of the STF test platform queries a database to determine whether a new task exists, if so, a new start thread executes the new task, firstly, local installation package information is obtained through the information of the new task, and then a corresponding installation package is found, and then a test device is occupied, the service of the STF test platform returns to a port of the test device occupied by the platform, so that the device can be really occupied through an adb command, and then, the corresponding installation package (such as the path of the adb install + installation package) is installed on the occupied test device through the adb command, at this time, logic for judging successful installation or failed installation exists, and if the installation fails, the logic can be directly stored in an array, such as { "device name": the format of "fail" } then continues to try to occupy the second test device, if the second device is successfully installed, the application service is executed and started, which may also be to use an adb command to implement application starting, and meanwhile, logic for judging whether the starting is successful or failed also exists, after the starting is successful, the monkey tool is executed, the logcat log is cleared, and meanwhile, another thread is started to collect relevant performance data, (wherein, the performance data is realized by encapsulating the adb command, data is collected at a specified frequency, for example, data is collected every two seconds), after the execution of the monkey tool is completed, the information of the logcat log is obtained, and the information is stored in a specified or corresponding directory, and written into a large map table, and so on until all the test devices selected by the tester are completed. The information of the whole of the large map table can be as follows:
{u'NX512J':{'ctime':'Wed Apr 11 17:46:52 2018','start_activity':{'totalTime':'4003','starting':'Pass'},'run_monkey':{'crashlist':[],'log_name':'163d869caa8012a5d0ced4b0c9b9fe92.log','mem':[78831,122044,131985,145369,145438,145889,146218,149429,147974,148217,148304,156620,165388,165700,165739,159507,160030,164118,177835,175206,175653,178409,179401,179638,181086,181134],'flow':[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],'cpu':[0,0,98,56,35,21,21,29,33,16,16,25,54,16,24,39,39,22,42,55,45,45,43,39,44,44]},'install':'Pass','phoneinfo':{'iconPath':u'f084f9c0-3709-11e8-b631-415645000030/r/o/icon.png','appname':u'NetEase News','appPackageName':u'com.netease.newsreader.activity','abi':u'arm64-v8a','display_heigh':1920,'remoteConnectUrl':u'10.13.24.118:7413','version':u'5.0.2','appversion':u'798','display_width':1080,'manufacturer':u'NUBIA','model':u'NX512J','serial':u'NX512J','sdk':u'21'},'uninstall':'Pass'}}
the data is saved to the last field report _ info (not shown) of the whole task table of the database, and then the test server may begin to analyze the data, and generate tables with different dimensions and test reports from the acquired data by parsing json strings.
The description of the codes in the acquired data is as follows:
furthermore, the field phoneinfo':
{ ' iconPath ' u ' f084f9c0-3709-11e8-b631-415645000030/r/o/icon. png ', ' appname ' u ' net News ', ' appPackageName ' u ' com.netease. newsreader. activity ', ' 567 ' u ' arm64-v8a ', ' display _ height ' 1920 ', ' remoteconnectantuctu '10.13.24.118:7413', ' version ' u '5.0.2', ' appversion '798', ' display _ width ' 1080 ', ' manufacturer ' u ' a ', ' biel ' 829 ', 2' x ' 2', 512 ' n-p-n-p-n-p-.
The fields start _ activity { 'totalTime': 4003',' starting ': Pass' } are the response time to start the first page activity acquisition page, and whether the start is possible, the test performance, and whether the installation package is normally started.
The fields run _ monkey ' { ' crashlist ' [ ], ' log _ name ': 163 ' 869 caaa8012a5d0ced4b9b9fe92.log ', ' mem ': 78831,122044,131985,145369,145438,145889,146218,149429,147974,148217,148304,156620,165388,165700,165739,159507,160030,164118,177835,175206,175653,178409,179401,179638,181086,181134], ' flow ': 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], ' cpu ': 0,0,98,56,35,21,21,29,33,16,16,25,54,16,24,39,39,22,42,55,45,45,43,39,44,44] } are data generated by cyclic clicking through a monkey tool, and if exception information, such as asptend to enter a crahl array.
The field log _ name field is the log information of the device counted in the process of monkey starting, and then after execution of monkey tool is finished, the log is uploaded from the test device by calling adb command and stored in the test server.
Then, after the server acquires the data, the backstage automatically analyzes the json string, and finally shows the compatibility and performance test result after processing and analysis.
Fig. 2D schematically illustrates a flow diagram of a testing method according to another embodiment of the present disclosure.
In this embodiment, the test server stores a visual display template of the test result. As shown in fig. 2D, the test method may further include operation S206.
In operation S206, after the test report data is generated, a visual test result is generated by using the test report data and the test result visual display template.
Accordingly, the sending the test result includes sending the visual test result.
In this embodiment, a visualization application, for example, echarts, may be installed in the test server, and data in each dimension may be graphed, so that a tester can more intuitively see a test result.
FIG. 3A schematically illustrates a visual report of compatibility testing, according to an embodiment of the disclosure.
As shown in fig. 3A, the compatibility test results applied to various models of test handsets are displayed: whether the installation is available, whether the starting is available, whether the unloading is available and whether the abnormity occurs in the operation process. In order to facilitate the tester to lock the specific information of the test equipment with errors, the visual report also shows the specific model, system, CPU, system version, sdk version, equipment unique code and other information of the test equipment, so that the errors can be analyzed conveniently. As shown in FIG. 3A, the test application package can be successfully installed, successfully started, and successfully uninstalled on the test handsets of NUBIA NX512J 5.0.2, HUAWEI JMM-AL 007.0, LEMOBILE LeX6206.0, 3601607-A017.1.1, and SAMSUNG SM-C50007.0, without exception during operation. The test application package cannot be installed on the test handset of MEIZU M1E 6.0.0, and cannot be started or uninstalled naturally.
FIG. 3B schematically illustrates a visual report of compatibility testing according to another embodiment of the present disclosure.
As shown in fig. 3B, the performance test result of the test application package on each test handset is exemplarily shown. The three test results of the CPU utilization rate, the occupied memory size and the starting time consumption are specifically shown, so that the CPU occupancy rate of 360 mobile phones is small, the occupied memory of the SAMSUNG mobile phone is the minimum, and the performance of the two test mobile phones is relatively good when the test application package is used. The test application package cannot be installed on a test mobile phone of the MEIZU M1E 6.0.0, and a performance test result cannot be given naturally.
FIG. 3C schematically illustrates a visual report of compatibility testing according to another embodiment of the present disclosure.
As shown in fig. 3C, a comparison line chart of the performance test results of the test application packages on the test handsets in the same dimension is exemplarily shown. As can be seen from the figure, the performance test results of the test application package on each test handset are analyzed in four dimensions respectively: starting time length, CPU occupancy rate, memory utilization rate and network flow. The longest time spent by 360 mobile phones can be seen in the dimension of the starting time length visually and clearly. Under the dimension of the CPU utilization rate, the CPU utilization rate of the LEMOBILE mobile phone is the highest. Under the dimension of the memory utilization rate, the memory utilization rate of the LEMOBILE mobile phone is the highest. Under the dimensionality of network flow, the network flow of the LEMOBILE mobile phone is the largest. Therefore, the tester can obtain useful test information conveniently and feed the useful test information back to the developer to improve the defects.
FIG. 3D schematically illustrates a visual report of compatibility testing, according to another embodiment of the present disclosure.
As shown in fig. 3D, another form of comparison graph of the performance test results of the test application package on each test handset in the same dimension is exemplarily shown. The tester can select a specific display mode according to the requirement of the tester.
FIG. 4 schematically shows a block diagram of a testing device according to an embodiment of the disclosure.
The testing device is in communication connection with at least one testing device, the testing device can remotely control the at least one testing device, an STF testing platform and a simulated manual click tool which are constructed based on an STF mobile phone management framework are arranged in the testing device, as shown in fig. 4, the testing device 400 comprises a receiving module 410, an application packet obtaining module 420, a testing module 430 and a sending module 440.
The receiving module 410 is configured to receive a first request instruction, where the first request instruction includes test application information, and the test application information is used to determine a test application package.
The application package obtaining module 420 is configured to, in response to receiving the first request instruction, obtain a test application package according to the test application information, where the test application package includes a test application installation package.
The test module 430 is configured to use the test application package to perform a test in the at least one test device based on a preset test mode by using at least a simulated manual click tool, so as to obtain a test result.
The sending module 440 is configured to send the test result.
In an embodiment, the testing apparatus 400 may store at least one corresponding relationship between a testing application package and application package information, where the application package information includes any one or more of the following: package name information of the application package, version information of the application package, user information of the application package, package workflow information, or encryption information of the package name.
Accordingly, the application package obtaining module 420 may include an obtaining unit and an updating unit.
The obtaining unit is used for obtaining the test application package according to the test application information and the corresponding relation between the at least one test application package and the application package information.
The updating unit is used for updating the application package information.
The testing apparatus 400 may further include a creating module 450, where the creating module 450 is configured to establish a correspondence relationship between the uploaded testing application package and the application package information after receiving the uploaded testing application package.
In another embodiment, the testing device 400 may further include a status acquisition module 460. The state obtaining module 460 may be configured to obtain a device state of the at least one test device before the test application package is used to perform a test in the at least one test device, where the device state includes an occupied state and an empty state.
Accordingly, the test module 430 is specifically configured to perform a test in at least one test device in an idle state using the test application package.
The test module 430 may include a first receiving unit, a sending unit, a second receiving unit, an occupying unit, and a test unit.
Specifically, the first receiving unit is configured to receive a second request instruction, where the second request instruction includes test device information requesting an idle state.
The sending unit is used for responding to the received second request instruction and sending the test equipment information in the idle state.
The second receiving unit is configured to receive a third request instruction, where the third request instruction includes test device information of an idle state requested to be occupied.
The occupation unit is used for responding to the third request instruction, calling an occupation interface of the STF mobile phone management frame to occupy the test equipment corresponding to the test equipment information in the vacant state requested to be occupied, and updating the equipment state of the test equipment corresponding to the test equipment information in the vacant state requested to be occupied after occupation is successful.
The test unit is used for testing the test equipment corresponding to the test equipment information of the vacant state occupied by the request by using the test application packet.
Optionally, the simulated manual click tool is a monkey tool.
In a specific embodiment, the preset test mode includes any one or more of the following: installation testing, start testing, uninstall testing, overlay installation testing, login testing, uninstall testing, statistical start-up hours, stress testing, delay testing, or exception testing.
In addition, the test unit may include a data acquisition subunit and a parsing subunit.
The data acquisition subunit is configured to acquire and store operation data generated in a test process based on a preset test mode, where the operation data includes any one or more of the following: the method comprises the steps of obtaining unique codes of the devices, starting test time, starting first page time, whether starting is successful or not, data generated when the monkey tool is executed, memory information of the test devices, CPU information of the test devices, network traffic information, installation information, test device and installation package information, installation package icons, names of test applications, names of test application packages, sdk versions, brands of the test devices, and IP addresses and ports of remote connection of the test devices.
The analysis subunit is used for generating the test report data of various preset dimensions from the running data in a json string analysis mode. Therefore, the operation data generated in the test process can be analyzed into data with various preset dimensions so as to facilitate the subsequent statistical analysis.
In yet another embodiment, the testing apparatus 400 may further store a visual display template of the testing result, and accordingly, the testing apparatus 400 may further include a visualization module 470, where the visualization module 470 may be configured to generate a visual testing result by using the testing report data and the visual display template of the testing result after generating the testing report data, and accordingly, the sending module 440 may be specifically configured to send the visual testing result.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the receiving module 410, the application package obtaining module 420, the testing module 430, the sending module 440, the creating module 450, the state obtaining module 460, and the visualization module 470 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the receiving module 410, the application package obtaining module 420, the testing module 430, the sending module 440, the creating module 450, the state obtaining module 460, and the visualizing module 470 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the receiving module 410, the application package obtaining module 420, the testing module 430, the sending module 440, the creating module 450, the state obtaining module 460 and the visualization module 470 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
FIG. 5 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 5 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 5, a computer system 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include onboard memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the system 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the programs may also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, system 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The system 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 505 as necessary. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 611. The computer program, when executed by the processor 501, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: 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), 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 the present disclosure, 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. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (16)

1. A test method is applied to a test server, the test server is in communication connection with at least one test device and can remotely control the at least one test device, an STF test platform and a simulated manual click tool are built on the basis of an STF mobile phone management framework in the test server, and the method comprises the following steps:
receiving a first request instruction, wherein the first request instruction comprises test application information, and the test application information is used for determining a test application package;
responding to the received first request instruction, and acquiring a test application package according to the test application information, wherein the test application package comprises a test application installation package;
testing the at least one piece of test equipment by using the test application package based on a preset test mode at least by using a simulated manual click tool to obtain a test result; and
sending the test result;
the test server stores at least one corresponding relation between a test application package and application package information, wherein the application package information comprises any one or more of the following: package name information of the application package, version information of the application package, user information of the application package, package workflow information or encryption information of the package name;
the obtaining of the test application package according to the test application information includes:
obtaining the test application package according to the test application information and the corresponding relation between the at least one test application package and the application package information; and
and updating the application package information.
2. The testing method of claim 1, further comprising:
after receiving the uploaded test application package, establishing a corresponding relation between the uploaded test application package and application package information.
3. The test method of claim 1, wherein the predetermined test pattern comprises any one or more of: installation testing, start testing, uninstall testing, overlay installation testing, login testing, uninstall testing, statistical start-up hours, stress testing, delay testing, or exception testing.
4. A test method according to claim 1, wherein the simulated manual click tool is a monkey tool.
5. The testing method of claim 4, further comprising:
before the test application packet is used for testing in the at least one test device, acquiring the device state of the at least one test device, wherein the device state comprises an occupied state and an empty state; and
the testing in the at least one test device using the test application package comprises testing in at least one test device in an empty state using the test application package.
6. The testing method of claim 5, wherein said using the test application package to test in at least one test device in an idle state comprises:
receiving a second request instruction, wherein the second request instruction comprises test equipment information requesting an idle state;
sending test equipment information in an idle state in response to receiving the second request instruction;
receiving a third request instruction, wherein the third request instruction comprises test equipment information of an unoccupied state requested to be occupied;
in response to receiving the third request instruction, calling an occupation interface of the STF mobile phone management framework to occupy the test equipment corresponding to the test equipment information in the vacant state requested to be occupied, and updating the equipment state of the test equipment corresponding to the test equipment information in the vacant state requested to be occupied after the occupation is successful; and
and testing the test equipment corresponding to the test equipment information in the vacant state occupied by the request by using the test application packet.
7. The test method according to claim 6, wherein the using the test application package to test the test device corresponding to the test device information in the vacant state requested to be occupied comprises:
the method comprises the following steps of collecting and storing operation data generated in a test process based on a preset test mode, wherein the operation data comprises one or more of the following data: the method comprises the following steps of (1) enabling a device unique code, starting test time, starting header time, whether starting is successful, data generated when a monkey tool is executed, memory information of the test device, CPU information of the test device, network traffic information, installation information, the test device and installation package information, an installation package icon, a name of a test application package, sdk versions, a brand of the test device, and an IP and a port which are remotely connected with the test device; and
and generating test report data of various preset dimensions from the operation data in a json string analysis mode.
8. The test method according to claim 7, wherein a test result visual display template is stored in the test server;
the method further comprises the following steps:
after the test report data are generated, generating a visual test result by using the test report data and the visual test result display template; and
the sending the test result comprises sending the visual test result.
9. A testing device is in communication connection with at least one piece of testing equipment, the testing device can remotely control the at least one piece of testing equipment, an STF testing platform and a simulated manual click tool are built on the basis of an STF mobile phone management framework, and the testing device comprises:
the device comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a first request instruction, the first request instruction comprises test application information, and the test application information is used for determining a test application packet;
the application package obtaining module is used for responding to the received first request instruction and obtaining a test application package according to the test application information, wherein the test application package comprises a test application installation package;
the testing module is used for testing the at least one piece of testing equipment by using the testing application package at least by utilizing a simulated manual clicking tool based on a preset testing mode to obtain a testing result; and
the sending module is used for sending the test result;
the testing device stores at least one corresponding relation between a testing application package and application package information, wherein the application package information comprises any one or more of the following information: package name information of the application package, version information of the application package, user information of the application package, package workflow information or encryption information of the package name;
the application package obtaining module comprises:
the acquisition unit is used for acquiring the test application package according to the test application information and the corresponding relation between the at least one test application package and the application package information; and
and the updating unit is used for updating the application package information.
10. The test device of claim 9, further comprising:
and the creating module is used for creating the corresponding relation between the uploaded test application package and the application package information after receiving the uploaded test application package.
11. The test device of claim 9, further comprising:
a state obtaining module, configured to obtain a device state of the at least one test device before the test application package is used to perform a test in the at least one test device, where the device state includes an occupied state and an empty state; and
the test module is specifically configured to perform a test in at least one test device in an idle state using the test application package.
12. The test device of claim 11, wherein the test module comprises:
the first receiving unit is used for receiving a second request instruction, and the second request instruction comprises test equipment information requesting an idle state;
the sending unit is used for responding to the received second request instruction and sending the test equipment information in the idle state;
the second receiving unit is used for receiving a third request instruction, and the third request instruction comprises test equipment information of an unoccupied state requested to be occupied;
the occupation unit is used for responding to the received third request instruction, calling an occupation interface of the STF mobile phone management frame to occupy the test equipment corresponding to the test equipment information in the vacant state requested to be occupied, and updating the equipment state of the test equipment corresponding to the test equipment information in the vacant state requested to be occupied after the occupation is successful; and
and the test unit is used for testing the test equipment corresponding to the test equipment information of the vacant state occupied by the request by using the test application packet.
13. The test device of claim 12, wherein the test unit comprises:
the data acquisition subunit is used for acquiring and storing operation data generated in the test process based on a preset test mode, wherein the operation data comprises any one or more of the following data: the method comprises the following steps of (1) enabling a device unique code, starting test time, starting header time, whether starting is successful, data generated when a monkey tool is executed, memory information of the test device, CPU information of the test device, network traffic information, installation information, the test device and installation package information, an installation package icon, a name of a test application package, sdk versions, a brand of the test device, and an IP and a port which are remotely connected with the test device; and
and the analysis subunit is used for generating the test report data of various preset dimensions from the running data in a json string analysis mode.
14. The testing device of claim 13, wherein a visual display template of testing results is stored in the testing device;
the test device also comprises a visualization module which is used for generating a visualization test result by utilizing the test report data and the test result visualization display template after the test report data is generated; and
the sending module is specifically configured to send the visual test result.
15. A computer system, comprising:
one or more processors;
storage means for storing executable instructions which, when executed by the processor, implement a test method according to any one of claims 1 to 8.
16. A computer readable storage medium having stored thereon executable instructions which when executed by a processor implement a test method according to any one of claims 1 to 8.
CN201811057022.6A 2018-09-11 2018-09-11 Test method, test device, computer system, and computer medium Active CN109302522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811057022.6A CN109302522B (en) 2018-09-11 2018-09-11 Test method, test device, computer system, and computer medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811057022.6A CN109302522B (en) 2018-09-11 2018-09-11 Test method, test device, computer system, and computer medium

Publications (2)

Publication Number Publication Date
CN109302522A CN109302522A (en) 2019-02-01
CN109302522B true CN109302522B (en) 2020-09-01

Family

ID=65166540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811057022.6A Active CN109302522B (en) 2018-09-11 2018-09-11 Test method, test device, computer system, and computer medium

Country Status (1)

Country Link
CN (1) CN109302522B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112260883A (en) * 2020-09-17 2021-01-22 航天行云科技有限公司 Satellite test report generation method, device, equipment and storage medium
CN112988582A (en) * 2021-03-15 2021-06-18 中化现代农业有限公司 Application program testing method and device and storage medium
CN113377413A (en) * 2021-04-29 2021-09-10 先进操作系统创新中心(天津)有限公司 Software batch adaptation method based on kylin desktop operating system
CN113781718A (en) * 2021-09-14 2021-12-10 中国银行股份有限公司 ATM (automatic teller machine) testing method and device, storage medium and electronic equipment
CN114328272B (en) * 2022-03-02 2022-06-21 北京新氧科技有限公司 Application testing method, device and system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685323A (en) * 2012-04-21 2012-09-19 北京迈凯互动网络科技有限公司 Mobile device testing method and system
CN102708050A (en) * 2012-04-21 2012-10-03 北京迈凯互动网络科技有限公司 Method and system for testing mobile application
CN104679659A (en) * 2015-03-24 2015-06-03 小米科技有限责任公司 Testing method and testing device of application program as well as electronic equipment
CN105302727A (en) * 2015-11-17 2016-02-03 小米科技有限责任公司 Testing method, device and system
CN106201858A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 The test system of application program and control method thereof and device in mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978258B (en) * 2014-04-01 2018-03-23 中国银联股份有限公司 Automatic software test method and system
CN104331373A (en) * 2014-11-28 2015-02-04 上海斐讯数据通信技术有限公司 Monkey test system and method
US10854110B2 (en) * 2017-03-03 2020-12-01 Microsoft Technology Licensing, Llc Automated real time interpreter service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685323A (en) * 2012-04-21 2012-09-19 北京迈凯互动网络科技有限公司 Mobile device testing method and system
CN102708050A (en) * 2012-04-21 2012-10-03 北京迈凯互动网络科技有限公司 Method and system for testing mobile application
CN104679659A (en) * 2015-03-24 2015-06-03 小米科技有限责任公司 Testing method and testing device of application program as well as electronic equipment
CN106201858A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 The test system of application program and control method thereof and device in mobile terminal
CN105302727A (en) * 2015-11-17 2016-02-03 小米科技有限责任公司 Testing method, device and system

Also Published As

Publication number Publication date
CN109302522A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
US10372600B2 (en) Systems and methods for automated web performance testing for cloud apps in use-case scenarios
CN105094783B (en) method and device for testing stability of android application
CN107688530B (en) Software testing method and device
CN105787364B (en) Automatic testing method, device and system for tasks
US20150370691A1 (en) System testing of software programs executing on modular frameworks
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
CN107659455B (en) Method, storage medium, device and system for Mock data of iOS (internet operating system) end
CN111290941A (en) Method and device for testing multiple interfaces, computing equipment and medium
CN112019404A (en) Method and device for automatically testing FC-AE-1553 communication protocol chip
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN113986753A (en) Interface test method, device, equipment and storage medium
CN105339974B (en) Analog sensor
CN113535567A (en) Software testing method, device, equipment and medium
CN111897724A (en) Automatic testing method and device suitable for cloud platform
US10942837B2 (en) Analyzing time-series data in an automated application testing system
CN112269744A (en) System abnormity testing method and device, computer equipment and storage medium
CN111352836A (en) Pressure testing method and related device
CN110347085A (en) Automatization test system, method, vehicle and computer-readable medium
Esipchuk et al. PTF-based test automation for Java applications on mobile phones
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN112988585A (en) PaaS platform test method, device, equipment and medium
CN114064484A (en) Interface testing method and device, electronic equipment and readable storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Beijing Daxing District, Beijing

Applicant after: Jingdong Digital Technology Holding Co., Ltd.

Address before: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing, 100176

Applicant before: Beijing Jingdong Financial Technology Holding Co., Ltd.

GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.