CN114706786A - Application program testing method, device, equipment and medium of mobile terminal - Google Patents

Application program testing method, device, equipment and medium of mobile terminal Download PDF

Info

Publication number
CN114706786A
CN114706786A CN202210435776.0A CN202210435776A CN114706786A CN 114706786 A CN114706786 A CN 114706786A CN 202210435776 A CN202210435776 A CN 202210435776A CN 114706786 A CN114706786 A CN 114706786A
Authority
CN
China
Prior art keywords
test
application program
target
server
target application
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.)
Pending
Application number
CN202210435776.0A
Other languages
Chinese (zh)
Inventor
张翔
秦瑶
刘养柱
黄绍丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Financial Leasing Co Ltd
Original Assignee
Ping An International Financial Leasing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Financial Leasing Co Ltd filed Critical Ping An International Financial Leasing Co Ltd
Priority to CN202210435776.0A priority Critical patent/CN114706786A/en
Publication of CN114706786A publication Critical patent/CN114706786A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

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

Abstract

The invention relates to the field of artificial intelligence, and discloses a method, a device, equipment and a medium for testing an application program of a mobile terminal, wherein the method comprises the following steps: the client respectively responds to click instructions of a current login user for the application program list and the test item list to acquire a target application program and a plurality of target test items; then, the target application program and each target test item are sent to a test server through a long connection communication link, and a test instruction fed back by the test server is received; then, executing the test instruction through a background processing module to obtain a test result; and finally, sending the test result to the test server through the long connection communication link, and receiving a test report fed back by the test server. According to the technical scheme of the embodiment, the test instructions corresponding to various types of test items are pre-configured in the test server, so that various types of performance tests of the application program can be realized on the mobile terminal, and the test flexibility of the application program can be improved.

Description

Application program testing method, device, equipment and medium of mobile terminal
Technical Field
The embodiment of the invention relates to the technical field of artificial intelligence, in particular to a method, a device, equipment and a medium for testing an application program of a mobile terminal.
Background
As the internet industry enters the mobile era, various products and projects have respective corresponding mobile clients, so that mobile client testing has become the most important testing mode in the testing field. The mobile client test mainly comprises a conventional page function test and a special function test.
Currently, in the existing mobile client test, for a mobile client with a low user quantity or for internal use, the mobile client is limited by reasons of tight scheduling, low expenditure, limited capability of a tester, and the like, and a special function test is usually not performed. For mobile clients with high user quantity, the special function test is usually implemented by a special function test tool established on a Personal Computer (PC). However, in some special scenarios, for example, when the user is at home or at work, due to lack of a PC or lack of a corresponding special function testing tool installed on the PC, it is difficult to implement a special function test for the mobile client, which reduces flexibility of the test.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for testing an application program of a mobile terminal, which can implement various types of performance tests on the application program at the mobile terminal, and can improve the testing flexibility of the application program.
In a first aspect, an embodiment of the present invention provides an application program testing method for a mobile terminal, which is applied to a test client in the mobile terminal, and includes:
responding to a click instruction of a current login user for the application program list, and acquiring a target application program; responding to a click instruction of a current login user for the test item list, and acquiring at least one target test item;
sending the target application program and each target test item to a test server through a long connection communication link between the test client and the test server, and receiving a test instruction fed back by the test server;
executing the test instruction fed back by the test server through a background processing module of the test client to obtain a test result corresponding to the target application program;
and sending the test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server, and receiving a test report generated by the test server according to the test result corresponding to the target application program.
In a second aspect, an embodiment of the present invention further provides an application program testing method for a mobile terminal, which is applied to a testing server, and includes:
when a target application program and at least one target test item sent by a test client are detected, obtaining a test instruction corresponding to the target application program according to the target application program and each target test item;
sending a test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server;
when a test result corresponding to the target application program sent by the test client is detected, generating a test report corresponding to the target application program according to the test result corresponding to the target application program;
and sending the test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server.
In a third aspect, an embodiment of the present invention further provides an application program testing apparatus for a mobile terminal, which is applied to a test client in the mobile terminal, and includes:
the target test item acquisition module is used for responding to a click instruction of a current login user for the application program list and acquiring a target application program; responding to a click instruction of a current login user for the test item list, and acquiring at least one target test item;
the test instruction receiving module is used for sending the target application program and each target test item to the test server through a long connection communication link between the test client and the test server and receiving a test instruction fed back by the test server;
the test result acquisition module is used for executing the test instruction fed back by the test server through the background processing module of the test client so as to acquire the test result corresponding to the target application program;
and the test report receiving module is used for sending the test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server and receiving the test report generated by the test server according to the test result corresponding to the target application program.
In a fourth aspect, an embodiment of the present invention further provides an apparatus for testing an application program of a mobile terminal, where the apparatus is applied to a test server, and the apparatus includes:
the test instruction acquisition module is used for acquiring a test instruction corresponding to a target application program according to the target application program and each target test item when the target application program and at least one target test item sent by a test client are detected;
the test instruction sending module is used for sending the test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server;
the test report generation module is used for generating a test report corresponding to the target application program according to the test result corresponding to the target application program when the test result corresponding to the target application program sent by the test client is detected;
and the test report sending module is used for sending the test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the application program testing method of the mobile terminal provided by any embodiment of the invention.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the storage medium stores a computer program, and when the program is executed by a processor, the computer program implements the method for testing an application program of a mobile terminal according to any embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, the client respectively responds to the click instructions of the current login user aiming at the application program list and the test item list to obtain a target application program and a plurality of target test items; then, sending the target application program and each target test item to a test server through a long connection communication link between the test client and the test server, and receiving a test instruction fed back by the test server; then, executing the test instruction through a background processing module of the test client to obtain a test result corresponding to the target application program; finally, sending the test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server, and receiving a test report generated by the test server according to the test result corresponding to the target application program; by pre-configuring the test instructions corresponding to various types of test items in the test server, various types of performance tests of the application program can be realized on the mobile terminal, and the test flexibility of the application program can be improved.
Drawings
Fig. 1 is a flowchart of an application testing method of a mobile terminal according to an embodiment of the present invention;
fig. 2A is a flowchart of an application testing method of a mobile terminal according to a second embodiment of the present invention;
fig. 2B is a schematic diagram of data interaction between the test client and the test server according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an application testing apparatus of a mobile terminal according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an application testing apparatus of a mobile terminal according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
The embodiment of the invention can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
Example one
Fig. 1 is a flowchart of an application testing method of a mobile terminal according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a case where an application is tested on a mobile terminal, and the method may be executed by a testing client in the mobile terminal, and may be generally integrated in an electronic device, and may typically be integrated in a mobile terminal device. As shown in fig. 1, the method specifically includes the following steps:
s110, responding to a click instruction of a current login user for the application program list, and acquiring a target application program; and responding to a click instruction of the current login user for the test item list, and acquiring at least one target test item.
In this embodiment, after detecting that the user successfully logs in, the test client may show a test interface of the application program to the currently logged-in user, where the test interface may include an application program selection control and a test item selection control. The current login user can obtain the application program list and the test item list by respectively clicking the application program selection control and the test item selection control.
The application program list may include all application programs installed on the mobile terminal by the test client, and may be displayed in the form of an interface drop-down box. In this embodiment, after the test client is successfully installed on the mobile terminal device, the test client may automatically detect the application program of the mobile terminal device to generate an application program list, and may obtain various types of authority information of each application program. Alternatively, when the number of applications is large, the applications may be scrolled and displayed in the application list. In this embodiment, the current login user may select an application program to be tested, i.e., a target application program, from the application program list.
The test item list may include a plurality of performance test items supported by the test client, for example, an application start performance test. In this embodiment, the currently logged-in user may click and select a test item to be tested, i.e. a target test item, in the test list. It will be appreciated that the currently logged-on user may select one or more test items at a time.
In this embodiment, when determining a corresponding target application program or target test item according to a click instruction of a current login user, the test client may obtain a screen click position of the current login user according to a click operation of the current login user, and determine the target application program or target test item selected by the current login user according to the screen click position and a screen display position of each application program in the application program list, or a screen display position of each test item in the test item list. Optionally, the currently logged-in user may perform a vertical touch sliding operation or a multiple-click touch operation on the test item list to select multiple target test items.
In an optional implementation manner of this embodiment, the obtaining at least one target test item in response to a click instruction of a current login user for a test item list may include: and responding to a click instruction of a current login user for a one-key test button in a test item list, and determining each test item in the test item list as a target test item to obtain at least one target test item.
In this embodiment, the test client may provide a one-touch test button at a preset position in the test item list, and when the test client detects a click instruction of a current login user on the one-touch test button, all test items in the test item list may be automatically determined as the target test item.
The advantages of the above arrangement are: when a user needs to test all test items of the target application program, the test can be realized only by clicking one key, and the test efficiency of the application program can be improved.
S120, sending the target application program and the target test items to the test server through a long connection communication link between the test client and the test server, and receiving a test instruction fed back by the test server.
The long connection communication link may be a long connection communication link based on a HyperText Transfer Protocol (HTTP), and once established, may implement transmission of a plurality of consecutive data packets during a holding period. In this embodiment, after detecting that the user successfully logs in, the test client may automatically establish a long connection communication link with the test server. Thus, after determining the target application and the plurality of target test items, the test client may send the target application and the target test items to the test server over a long connection communication link with the test server.
In this embodiment, the test server is configured with corresponding test instructions in advance for different applications and test items. Therefore, after receiving the target application program and the target test items sent by the test client, the test server can obtain the test instructions corresponding to the target test items, and then can feed back the test instructions corresponding to the target test items to the test client.
S130, executing the test instruction fed back by the test server through the background processing module of the test client to obtain the test result corresponding to the target application program.
The background processing module may be a functional module preset in the test client and used for processing a background task.
In this embodiment, after receiving the test instruction fed back by the test server, the test client may execute the test instruction in the background, so as to achieve that the current login user does not perceive the test execution process, and improve the use experience of the test client of the user. Further, after the test is finished, the test client may obtain a corresponding test result.
It is noted that, after the test client is successfully installed, the operating environment corresponding to the test instruction is automatically configured. Therefore, after the test client acquires the test instruction, the test client can directly run the test instruction to perform corresponding performance test on the target application program, and the test efficiency of the application program can be improved.
S140, sending the test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server, and receiving a test report generated by the test server according to the test result corresponding to the target application program.
Specifically, after obtaining the test result, the test client may send the test result to the test server through a long connection communication link between the test client and the test server. After receiving the test result corresponding to the target application program, the test server may generate a corresponding test report according to the test result. Further, the test server may send the test report to the test client, so as to display the test report to the current login user through the test client.
The device has the advantages that the device can realize the rapid verification of the performance, stability, safety and breakdown of the application program before the application program is on line, meanwhile, the construction of a test environment, the selection of a test tool and the like can be avoided, and the capability requirement on a tester can be reduced; by providing the one-key detection service, different special test scenes of various application programs are integrated. In addition, through one-key test and test report feedback, the time consumption for testing the application program can be reduced, the tested application program can be quickly verified and fed back, and the product quality of the tested application program can be ensured.
In another optional implementation manner of this embodiment, before acquiring the target application program in response to a click instruction of the current login user for the application program list, the method may further include: acquiring user login information input by a current access user in a user login page of the test client, responding to a click instruction of the current access user on a login button in the user login page, and sending the user login information to a test server; and when the login verification passing information corresponding to the current access user fed back by the test server is detected, establishing a long connection communication link between the test client and the test server.
In this embodiment, when detecting that the foreground operation starts, the test client may show a user login page to the current access user if it is determined that the current test client is in the non-login state. The current visiting user may enter user login information (e.g., login account number, login password, etc.) in a user login page and click a login button. When detecting the click instruction of the current access user to the login button, the test client can send the user login information to the test server.
Further, the test server performs user login verification according to the received user login information, and if the current access user is determined to successfully pass the user login verification, the test server feeds login verification passing information back to the test client. After receiving the login verification passing information fed back by the test server, the test client maintains the communication link with the test server in a long connection state so as to successfully establish the long connection communication link between the test client and the test server.
According to the technical scheme provided by the embodiment of the invention, the client respectively responds to the click instructions of the current login user aiming at the application program list and the test item list to obtain a target application program and a plurality of target test items; then, sending the target application program and each target test item to a test server through a long connection communication link between the test client and the test server, and receiving a test instruction fed back by the test server; then, executing the test instruction through a background processing module of the test client to obtain a test result corresponding to the target application program; finally, sending the test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server, and receiving a test report generated by the test server according to the test result corresponding to the target application program; by pre-configuring the test instructions corresponding to various types of test items in the test server, various types of performance tests of the application program can be realized on the mobile terminal, and the test flexibility of the application program can be improved.
Example two
Fig. 2A is a flowchart of an application testing method of a mobile terminal according to a second embodiment of the present invention, where the embodiment of the present invention is applicable to a case where an application is tested on a mobile terminal, and the method may be executed by a testing server, and may be generally integrated in an electronic device, and may typically be integrated in a server. As shown in fig. 2A, the method specifically includes the following steps:
s210, when a target application program and at least one target test item sent by a test client are detected, obtaining a test instruction corresponding to the target application program according to the target application program and each target test item.
Specifically, after receiving the target application program and each target test item, the test server may perform matching search in a local cache according to the target application program and each target test item, or obtain a test instruction corresponding to the target application program by calling a preset third-party framework.
In an optional implementation manner of this embodiment, acquiring, according to the target application program and the target test items, the test instruction corresponding to the target application program may include:
obtaining a test item type corresponding to each target test item, and screening the target test items according to the test item types corresponding to the target test items to obtain at least one first target test item with the test item type being a preset self-owned test item and at least one second target test item with the test item type providing the test item for a preset third party;
according to the target application program and each first target test item, acquiring a first test instruction corresponding to the target application program in a local cache; and according to the target application program and the second target test items, acquiring a second test instruction corresponding to the target application program by calling a preset third-party framework corresponding to the second target test items.
The type of the test item corresponding to the target test item may include a preset test item and a preset third party provided test item. Presetting self test items which can be realized by the test server, such as an application program summary data acquisition test, an application program starting performance test and the like; and presetting a test item provided by a third party, and providing the test item for a third party service, such as a security test, a weak network test and the like. In this embodiment, a third-party framework (open source test framework) corresponding to the third-party service may be preconfigured in the test server, so that the test client has a corresponding function test capability (for example, a 2G (2-Generation Wireless telephone technology, second-Generation mobile communication technology), a 3G, 4G network simulation test capability, or a WIFI (Wireless Fidelity, Wireless internet access) and mobile network handover test capability).
In this embodiment, after receiving the target application and the target test items sent by the test client, the test server may first divide all the target test items into a first target test item and a second target test item according to the test item type corresponding to each target test item. Then, for each first target test item, a first test instruction corresponding to the first target test item can be directly searched in a local cache; and for each second target test item, the corresponding preset third-party framework can be called to obtain the corresponding second test instruction. Finally, the test server can send the first test instruction and the second test instruction corresponding to the target application program to the test client together through the long connection communication link between the test server and the test client.
The target test item may include at least one of a mobile terminal overall performance test, a mobile terminal operation performance test, an application program summary data acquisition test, an application program starting performance test, a Monkey test, a recording playback test, a security test, a permission acquisition test, a weak network test, and a crash test.
The mobile terminal overall performance test, the mobile terminal operation performance test, the application program summary data acquisition test, the application program starting performance test, the Monkey test, the recording playback test, the permission acquisition test and the crash test are preset test items of the test server. And the safety test and the weak network test provide test items for a preset third party.
The overall performance test of the mobile terminal may include a test for hardware performance of the mobile terminal, such as a Central Processing Unit (CPU), a memory, a battery, a disk, a network, power consumption, and resolution; the mobile terminal running performance test refers to the test of actual performance when a mobile terminal (for example, a mobile phone) opens a plurality of other application programs; obtaining test of summary data of the application program, which can be obtaining test of data such as name, size and developer information of the application program package; the application program starting performance test can be an acquisition test of the starting time of the application program; the Monkey test can be a test for executing Monkey commands on an application program; recording playback test, which may include time-consuming test of calling interfaces, pages, and elements in the recording process through the recording playback function on the mobile terminal; the permission test can be an acquisition test of permission data of the application program; the Crash test may include executing a Monkey command at each playback step through recording and playback to acquire stability data, and recording information such as a Crash result, a log, an ANR (Application Not Responding), a Crash, and an Exception.
The safety test can be a test for the protection capability of the application program against illegal intrusion, and can be realized by carrying out secondary development on the existing safety-related open source test framework; and the weak network test can comprise the test of the normal operation capability of the application program under the weak network condition.
S220, sending the test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server.
Specifically, after obtaining the test instruction corresponding to the target application program, the test client may send the test instruction to the test client through the long connection communication link, so that the test client executes the test instruction, executes the corresponding function test on the target application program, and obtains the corresponding test result.
And S230, when the test result corresponding to the target application program sent by the test client is detected, generating a test report corresponding to the target application program according to the test result corresponding to the target application program.
S240, sending the test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server.
In this embodiment, when receiving a test result sent by a test client, a test server may generate a corresponding test report based on the test result; for example, according to a preset test report format, corresponding information may be extracted from the test result, and the extracted information is filled into a preset test report template, so as to obtain a test report corresponding to the target application program. Further, after generating the test report, the test server may send the test report to the test client through a long connection communication link with the test client. After receiving the test report, the test client can display the test report to the current login user in the form of a picture or a document.
According to the technical scheme provided by the embodiment of the invention, when a test server detects a target application program and a plurality of target test items sent by a test client, a test instruction corresponding to the target application program is obtained according to the target application program and each target test item; further sending a test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server; when a test result corresponding to a target application program sent by a test client is detected, generating a test report corresponding to the target application program according to the test result corresponding to the target application program; sending a test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server; by pre-configuring the test instructions corresponding to various types of test items in the test server, various types of performance tests of the application program can be realized on the mobile terminal, and the test flexibility of the application program can be improved.
In a specific implementation manner of this embodiment, data interaction between the test client and the test server may be as shown in fig. 2B. Specifically, the mobile terminal takes an android mobile phone as an example, and the android mobile phone is pre-installed with a test client and a tested application program. First, the test client starts to establish a communication link with the test server after detecting the login operation of the user, and successfully establishes a long connection communication link (a communication link based on the HTTP protocol) with the test server after detecting the successful login of the user. Then, when detecting a click instruction of the user on the application program list, the test client acquires a target application program which is selected by the user and needs to be tested, and when detecting a click instruction of the user on a one-key test button in the test item list, all test items in the test item list are determined as target test items.
Thereafter, the testing client may send the target application and the target test items to the testing server. After receiving the target application program and each target test item, the test server can directly acquire a corresponding ADB (Android Debug Bridge) instruction in a local cache for the target test item of which the test item type is a preset self-contained test item; and for the target test item of which the test item type provides the test item for the preset third party, the corresponding ADB instruction can be obtained by calling the pre-configured third party framework.
Further, after the test server successfully acquires the ADB instruction corresponding to the target application program, the ADB instruction is sent to the test client based on the HTTP protocol. And the test client requests the target application program by executing the received ADB instruction, so that the performance test of the target application program is realized, and a test result is obtained. And then, the test client side can send the test result corresponding to the target application program to the test server. The test server can generate a test report according to the received test result and send the test report to the preset database for storage and recording, or the test server can directly forward the test result to the preset database for storage and recording.
When the user needs to view the test result or the test report, the user can select to view the test result in the test client. After detecting the operation of the user, the test client may send a test result query request or a test report query request to the preset database, so as to obtain a corresponding test result or test report from the preset database, and display the test result or test report to the user.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an application testing apparatus of a mobile terminal according to a third embodiment of the present invention. As shown in fig. 3, the apparatus is applied to a test client in a mobile terminal, and includes: a target test item obtaining module 310, a test instruction receiving module 320, a test result obtaining module 330, and a test report receiving module 340. Wherein, the first and the second end of the pipe are connected with each other,
a target test item obtaining module 310, configured to obtain a target application program in response to a click instruction of a current login user for an application program list; responding to a click instruction of a current login user for the test item list, and acquiring at least one target test item;
a test instruction receiving module 320, configured to send the target application program and the target test items to the test server through a long connection communication link between the test client and the test server, and receive a test instruction fed back by the test server;
the test result obtaining module 330 is configured to execute the test instruction fed back by the test server through the background processing module of the test client, so as to obtain a test result corresponding to the target application program;
the test report receiving module 340 is configured to send the test result corresponding to the target application program to the test server through the long connection communication link between the test client and the test server, and receive a test report generated by the test server according to the test result corresponding to the target application program.
According to the technical scheme provided by the embodiment of the invention, the client respectively responds to the click instructions of the current login user aiming at the application program list and the test item list to obtain a target application program and a plurality of target test items; then, sending the target application program and each target test item to a test server through a long connection communication link between the test client and the test server, and receiving a test instruction fed back by the test server; then, executing the test instruction through a background processing module of the test client to obtain a test result corresponding to the target application program; finally, sending the test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server, and receiving a test report generated by the test server according to the test result corresponding to the target application program; by pre-configuring the test instructions corresponding to various types of test items in the test server, various types of performance tests of the application program can be realized on the mobile terminal, and the test flexibility of the application program can be improved.
Optionally, on the basis of the above technical solution, the apparatus for testing an application program of a mobile terminal further includes:
the user login information sending module is used for acquiring user login information input by a current access user in a user login page of the test client, responding to a click instruction of the current access user on a login button in the user login page, and sending the user login information to the test server;
and the long connection communication link establishing module is used for establishing a long connection communication link between the test client and the test server when login verification passing information corresponding to the current access user fed back by the test server is detected.
Optionally, on the basis of the foregoing technical solution, the target test item obtaining module 310 is specifically configured to determine, in response to a click instruction of a current login user for a one-key test button in the test item list, each test item in the test item list as a target test item, so as to obtain at least one target test item.
The device can execute the application program testing method of the mobile terminal provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the embodiments of the present invention, reference may be made to the method provided in the first embodiment of the present invention.
Example four
Fig. 4 is a schematic structural diagram of an application testing apparatus of a mobile terminal according to a fourth embodiment of the present invention. As shown in fig. 4, the apparatus is applied to a test server, and includes: a test instruction acquisition module 410, a test instruction sending module 420, a test report generation module 430 and a test report sending module 440. Wherein the content of the first and second substances,
a test instruction obtaining module 410, configured to, when a target application and at least one target test item sent by a test client are detected, obtain, according to the target application and the target test items, a test instruction corresponding to the target application;
a test instruction sending module 420, configured to send a test instruction corresponding to the target application to the test client through a long connection communication link between the test client and the test server;
a test report generating module 430, configured to, when a test result corresponding to the target application program sent by the test client is detected, generate a test report corresponding to the target application program according to the test result corresponding to the target application program;
a test report sending module 440, configured to send the test report corresponding to the target application to the test client through a long connection communication link between the test client and the test server.
According to the technical scheme provided by the embodiment of the invention, when a test server detects a target application program and a plurality of target test items sent by a test client, a test instruction corresponding to the target application program is obtained according to the target application program and each target test item; further sending a test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server; when a test result corresponding to a target application program sent by a test client is detected, generating a test report corresponding to the target application program according to the test result corresponding to the target application program; sending a test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server; by pre-configuring the test instructions corresponding to various types of test items in the test server, various types of performance tests of the application program can be realized on the mobile terminal, and the test flexibility of the application program can be improved.
Optionally, on the basis of the above technical solution, the test instruction obtaining module 410 includes:
the test item type acquisition unit is used for acquiring the test item type corresponding to each target test item, and screening the test item types in each target test item according to the test item type corresponding to each target test item to obtain at least one first target test item with the test item type being a preset test item, and at least one second target test item with the test item type providing the test item for a preset third party;
a first test instruction obtaining unit, configured to obtain, according to the target application program and each first target test item, a first test instruction corresponding to the target application program in a local cache;
and the second test instruction acquisition unit is used for acquiring a second test instruction corresponding to the target application program by calling a preset third-party framework corresponding to each second target test item according to the target application program and each second target test item.
Optionally, on the basis of the above technical solution, the target test item includes at least one of a mobile terminal overall performance test, a mobile terminal operation performance test, an application summary data acquisition test, an application start performance test, a Monkey test, a recording playback test, a security test, an authority acquisition test, a weak network test, and a crash test.
The device can execute the method for testing the application program of the mobile terminal provided by the second embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the embodiments of the present invention, reference may be made to the method provided in the second embodiment of the present invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention, as shown in fig. 5, the electronic device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of the processors 510 in the electronic device may be one or more, and one processor 510 is taken as an example in fig. 5; the processor 510, the memory 520, the input device 530 and the output device 540 in the electronic apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5. The memory 520 serves as a computer-readable storage medium, and may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to an application test method of a mobile terminal in any embodiment of the present invention (for example, the target test item obtaining module 310, the test instruction receiving module 320, the test result obtaining module 330, and the test report receiving module 340 in an application test apparatus of a mobile terminal, or the test instruction obtaining module 410, the test instruction transmitting module 420, the test report generating module 430, and the test report transmitting module 440). The processor 510 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 520, so as to implement any one of the above-mentioned application test methods of the mobile terminal. That is, the program when executed by the processor implements:
responding to a click instruction of a current login user for the application program list, and acquiring a target application program; responding to a click instruction of a current login user for the test item list, and acquiring at least one target test item;
sending the target application program and each target test item to a test server through a long connection communication link between the test client and the test server, and receiving a test instruction fed back by the test server;
executing the test instruction fed back by the test server through a background processing module of the test client to obtain a test result corresponding to the target application program;
sending a test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server, and receiving a test report generated by the test server according to the test result corresponding to the target application program;
or when a target application program and at least one target test item sent by a test client are detected, acquiring a test instruction corresponding to the target application program according to the target application program and each target test item;
sending a test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server;
when a test result corresponding to the target application program sent by the test client is detected, generating a test report corresponding to the target application program according to the test result corresponding to the target application program;
and sending the test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server.
The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 520 may further include memory located remotely from processor 510, which may be connected to an electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus, and may include a keyboard, a mouse, and the like. The output device 540 may include a display device such as a display screen.
Optionally, the electronic device may be a server, and the server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method according to any embodiment of the present invention. Of course, the embodiment of the present invention provides a computer-readable storage medium, which can perform related operations in an application testing method of a mobile terminal according to any embodiment of the present invention. That is, the program when executed by the processor implements:
responding to a click instruction of a current login user for the application program list, and acquiring a target application program; responding to a click instruction of a current login user for the test item list, and acquiring at least one target test item;
sending the target application program and each target test item to a test server through a long connection communication link between the test client and the test server, and receiving a test instruction fed back by the test server;
executing the test instruction fed back by the test server through a background processing module of the test client to obtain a test result corresponding to the target application program;
sending a test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server, and receiving a test report generated by the test server according to the test result corresponding to the target application program;
or when a target application program and at least one target test item sent by a test client are detected, acquiring a test instruction corresponding to the target application program according to the target application program and each target test item;
sending a test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server;
when a test result corresponding to the target application program sent by the test client is detected, generating a test report corresponding to the target application program according to the test result corresponding to the target application program;
and sending the test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the application test apparatus of the mobile terminal, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for testing an application program of a mobile terminal is characterized in that the method is applied to a test client in the mobile terminal and comprises the following steps:
responding to a click instruction of a current login user for the application program list, and acquiring a target application program; responding to a click instruction of a current login user for the test item list, and acquiring at least one target test item;
sending the target application program and each target test item to a test server through a long connection communication link between the test client and the test server, and receiving a test instruction fed back by the test server;
executing the test instruction fed back by the test server through a background processing module of the test client to obtain a test result corresponding to the target application program;
and sending the test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server, and receiving a test report generated by the test server according to the test result corresponding to the target application program.
2. The method of claim 1, before acquiring the target application in response to a click command of the current login user on the application list, further comprising:
acquiring user login information input by a current access user in a user login page of the test client, responding to a click instruction of the current access user on a login button in the user login page, and sending the user login information to a test server;
and when the login verification passing information corresponding to the current access user fed back by the test server is detected, establishing a long connection communication link between the test client and the test server.
3. The method of claim 1, wherein obtaining at least one target test item in response to a click command of a current login user on the test item list comprises:
and responding to a click instruction of a current login user for a one-key test button in a test item list, and determining each test item in the test item list as a target test item to obtain at least one target test item.
4. An application program testing method of a mobile terminal is applied to a testing server, and comprises the following steps:
when a target application program and at least one target test item sent by a test client are detected, obtaining a test instruction corresponding to the target application program according to the target application program and each target test item;
sending a test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server;
when a test result corresponding to the target application program sent by the test client is detected, generating a test report corresponding to the target application program according to the test result corresponding to the target application program;
and sending the test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server.
5. The method of claim 4, wherein obtaining the test instruction corresponding to the target application according to the target application and the target test items comprises:
obtaining a test item type corresponding to each target test item, and screening the target test items according to the test item type corresponding to each target test item to obtain at least one first target test item with the test item type being a preset test item, and at least one second target test item with the test item type providing the test item for a preset third party;
according to the target application program and each first target test item, acquiring a first test instruction corresponding to the target application program in a local cache;
and according to the target application program and the second target test items, acquiring a second test instruction corresponding to the target application program by calling a preset third-party framework corresponding to the second target test items.
6. The method of claim 4 or 5, wherein the target test item comprises at least one of a mobile terminal overall performance test, a mobile terminal operation performance test, an application summary data acquisition test, an application startup performance test, a Monkey test, a recording playback test, a security test, a permission acquisition test, a weak network test, and a crash test.
7. An application program testing device of a mobile terminal, which is applied to a testing client in the mobile terminal, comprises:
the target test item acquisition module is used for responding to a click instruction of a current login user for the application program list and acquiring a target application program; responding to a click instruction of a current login user for the test item list, and acquiring at least one target test item;
the test instruction receiving module is used for sending the target application program and each target test item to the test server through a long connection communication link between the test client and the test server and receiving a test instruction fed back by the test server;
the test result acquisition module is used for executing the test instruction fed back by the test server through the background processing module of the test client so as to acquire the test result corresponding to the target application program;
and the test report receiving module is used for sending the test result corresponding to the target application program to the test server through a long connection communication link between the test client and the test server and receiving the test report generated by the test server according to the test result corresponding to the target application program.
8. An application program testing device of a mobile terminal, which is applied to a testing server, comprises:
the test instruction acquisition module is used for acquiring a test instruction corresponding to a target application program according to the target application program and each target test item when the target application program and at least one target test item sent by a test client are detected;
the test instruction sending module is used for sending the test instruction corresponding to the target application program to the test client through a long connection communication link between the test client and the test server;
the test report generation module is used for generating a test report corresponding to the target application program according to the test result corresponding to the target application program when the test result corresponding to the target application program sent by the test client is detected;
and the test report sending module is used for sending the test report corresponding to the target application program to the test client through a long connection communication link between the test client and the test server.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more computer programs;
the one or more computer programs when executed by the one or more processors cause the one or more processors to implement the method of application testing for a mobile terminal as claimed in any of claims 1-3 or as claimed in any of claims 4-6 when the computer program is executed by the one or more processors.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for application testing of a mobile terminal according to any one of claims 1 to 3, or according to any one of claims 4 to 6.
CN202210435776.0A 2022-04-24 2022-04-24 Application program testing method, device, equipment and medium of mobile terminal Pending CN114706786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210435776.0A CN114706786A (en) 2022-04-24 2022-04-24 Application program testing method, device, equipment and medium of mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210435776.0A CN114706786A (en) 2022-04-24 2022-04-24 Application program testing method, device, equipment and medium of mobile terminal

Publications (1)

Publication Number Publication Date
CN114706786A true CN114706786A (en) 2022-07-05

Family

ID=82174414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210435776.0A Pending CN114706786A (en) 2022-04-24 2022-04-24 Application program testing method, device, equipment and medium of mobile terminal

Country Status (1)

Country Link
CN (1) CN114706786A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116659782A (en) * 2022-11-22 2023-08-29 荣耀终端有限公司 Motor testing method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116659782A (en) * 2022-11-22 2023-08-29 荣耀终端有限公司 Motor testing method and apparatus
CN116659782B (en) * 2022-11-22 2023-12-12 荣耀终端有限公司 Motor testing method and apparatus

Similar Documents

Publication Publication Date Title
CN109766262B (en) Interface data processing method, automatic testing method, device, equipment and medium
CN107665233B (en) Database data processing method and device, computer equipment and storage medium
CN108255730B (en) Software interface testing method, testing equipment, storage medium and device
CN111460356B (en) Automatic login method, device, medium and equipment
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN107528858B (en) Login method, device and equipment based on webpage and storage medium
CN111262759A (en) Internet of things platform testing method, device, equipment and storage medium
CN104410542A (en) Method and device for simulation test
CN107085549B (en) Method and device for generating fault information
CN109558199B (en) Information pushing method, device, equipment and storage medium
CN108984202B (en) Electronic resource sharing method and device and storage medium
CN107797721B (en) Interface information display method and device
US20200382382A1 (en) Method and system for detecting service quality of cdn system
JP2023504956A (en) Performance detection method, device, electronic device and computer readable medium
CN114706786A (en) Application program testing method, device, equipment and medium of mobile terminal
CN111045934A (en) Page analysis method, device, client, storage medium and electronic equipment
CN113360413A (en) Code testing method and device
CN111427710B (en) Communication method, device, equipment and storage medium of components in application program
CN112560025A (en) Interface permission detection method, device, medium and electronic equipment
CN112087455A (en) Method, system, equipment and medium for generating WAF site protection rule
CN111949537A (en) Interface test method, device, equipment and medium
CN111552643A (en) Multi-browser webpage access synchronization method and system
CN113590564B (en) Data storage method, device, electronic equipment and storage medium
CN113742408B (en) Protobuf protocol dynamic analysis-based data interaction method
CN115705284A (en) Automatic test system, method, equipment and 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