CN112306849A - Application program testing method and system, intelligent terminal and storage medium - Google Patents

Application program testing method and system, intelligent terminal and storage medium Download PDF

Info

Publication number
CN112306849A
CN112306849A CN201910704086.9A CN201910704086A CN112306849A CN 112306849 A CN112306849 A CN 112306849A CN 201910704086 A CN201910704086 A CN 201910704086A CN 112306849 A CN112306849 A CN 112306849A
Authority
CN
China
Prior art keywords
application program
tested
test
application
running
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
CN201910704086.9A
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.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Priority to CN201910704086.9A priority Critical patent/CN112306849A/en
Publication of CN112306849A publication Critical patent/CN112306849A/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
    • 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

Landscapes

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

Abstract

The invention discloses an application program testing method, an application program testing system, an intelligent terminal and a storage medium, wherein the application program testing method comprises the following steps: acquiring a trigger application program test instruction, determining an application program to be tested according to the trigger application program test instruction, and acquiring test data corresponding to the application program to be tested; running the test data to test the application program to be tested; when the abnormal termination of the process of the application program to be tested is detected, the running information of the application program is obtained and sent to a cloud end, and a prompt file which is generated by the cloud end according to the running information and used for prompting the abnormal termination of the process is received. The method and the device for monitoring the progress of the application program to be tested have the advantages that the corresponding test data is configured for the application program to be tested, the progress of the application program to be tested is monitored, prompt can be timely carried out when the progress of the application program to be tested is abnormally terminated, and the application program with low release quality is avoided.

Description

Application program testing method and system, intelligent terminal and storage medium
Technical Field
The invention relates to the field of application program testing, in particular to an application program testing method, an application program testing system, an intelligent terminal and a storage medium.
Background
Testing a new application before it is released is a necessary step. Most of the current application tests are functional tests, that is, running the application to be tested and testing whether the application can complete a certain function. The defects of the application program testing method are as follows: sometimes, when a certain process of the application program is abnormally terminated, active prompting cannot be carried out, so that the process abnormal termination problem is not found in time.
For example, in the running process of the application program, if the pushing is completed earlier, it is determined that the pushing function of the application program is normal, but after the pushing function test is completed, the pushing service process is abnormally terminated due to the influence of other processes of the application program, and the client does not test the pushing service function again, so that the information of the abnormal termination of the pushing service process cannot be given in time. Therefore, developers do not know that the push service process is abnormally terminated or cannot normally provide the push service function due to any reason, and the finally issued application program product has the hidden trouble that the push service cannot be normally provided.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide an application program testing method, system, intelligent terminal and storage medium, aiming at solving the problem that the abnormal termination problem of the application program cannot be discovered because the abnormal termination problem of the process cannot be timely reminded when the application program is tested in the prior art.
In a first aspect, an embodiment of the present invention provides an application program testing method, where the method includes:
acquiring a trigger application program test instruction, determining an application program to be tested according to the trigger application program test instruction, and acquiring test data corresponding to the application program to be tested;
running the test data to test the application program to be tested;
when the abnormal termination of the process of the application program to be tested is detected, the running information of the application program to be tested is obtained and sent to a cloud end, and a prompt file which is generated by the cloud end according to the running information and used for prompting the abnormal termination of the process is received.
The application program testing method includes the steps of determining an application program to be tested according to the trigger application program testing instruction, and acquiring testing data corresponding to the application program to be tested specifically:
acquiring the package name of the application program to be tested;
accessing a test data interface and sending a test data acquisition instruction to the cloud, wherein the test data acquisition instruction comprises a package name of the application program to be tested;
and receiving the test data corresponding to the package name of the application program to be tested, which is fed back by the cloud.
The application program testing method includes the following specific steps:
receiving a test task, and reading an application program list to be tested in the test task;
and acquiring the package name of the application program to be tested according to the arrangement sequence of the application programs to be tested in the application program list to be tested.
The application program testing method comprises the step of arranging the to-be-tested application programs in the to-be-tested application program list according to the creation time, the testing priority and the running priority of the to-be-tested application programs.
The application program testing method, wherein the test data comprises: the system comprises an automation script used for controlling the automatic running of the application program to be tested and a detection script used for detecting the running condition of the application program to be tested.
The application program testing method, wherein the running of the test data to test the application program to be tested specifically comprises:
running the automation script, and controlling the application program to be tested to automatically run according to the automation script;
and running the detection script, and detecting the running condition of the application program to be tested in real time through the detection script.
The application program testing method includes the following specific steps of:
and obtaining log information of the application program to be tested before the process is abnormally terminated, activity information of the application program to be tested before the process is abnormally terminated and operation information of the automation script before the process of the application program to be tested is abnormally terminated.
The application program testing method comprises the following steps of after the running information of the process of the application program to be tested is obtained and sent to a cloud terminal:
restarting the application program to be tested;
and running the automation script and the detection script to test the application program to be tested and detecting the running condition of the application program to be tested in real time.
In a second aspect, an embodiment of the present invention provides an application test system, where the application test system includes:
the test data acquisition module is used for acquiring test data corresponding to the application program to be tested through a pre-configured test data interface when a test task exists;
the test module is used for running the test data and testing the application to be tested;
and the prompting module is used for acquiring the running information of the application program to be tested and sending the running information to a cloud end when the abnormal termination of the process of the application program to be tested is detected, and receiving a prompting file which is generated by the cloud end according to the running information and is used for prompting the abnormal termination of the process.
In a third aspect, an embodiment of the present invention further provides an intelligent terminal, where the intelligent terminal includes: a processor, a storage medium communicatively coupled to the processor, the storage medium adapted to store a plurality of instructions; the processor is adapted to invoke instructions in the storage medium to perform an application testing method implementing any of the above.
In a fourth aspect, the present invention further provides a storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement any one of the application program testing methods described above.
The invention has the technical effects that: according to the application program testing method provided by the invention, the testing condition of the application program to be tested is detected in real time by configuring the detection script for the application program to be tested, prompt can be timely carried out when the process of the application program to be tested is abnormally terminated, and by acquiring the running information before the process is abnormally terminated, data support for analyzing and improving the application program is provided for developers, so that the application program with low release quality is avoided.
Drawings
FIG. 1 is a flowchart of a first embodiment of a method for testing an application according to the present invention;
fig. 2 is a detailed flowchart of a step S100 of a first embodiment of an application testing method provided in the present invention;
FIG. 3 is a flowchart of step S110 of a first embodiment of a method for testing an application program according to the present invention;
fig. 4 is a functional schematic diagram of an intelligent terminal provided by the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The application program testing method provided by the invention can be applied to a terminal. The terminal may be, but is not limited to, various personal computers, notebook computers, mobile phones, tablet computers, vehicle-mounted computers, and portable wearable devices. The terminal of the invention adopts a multi-core processor. The processor of the terminal may be at least one of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Video Processing Unit (VPU), and the like.
The invention provides an application program testing method, aiming at solving the problem that when an application program is tested in the prior art, when a certain process of the application program is abnormally terminated, active prompt cannot be carried out, so that the abnormal termination problem of the process cannot be found in time.
Referring to fig. 1, fig. 1 is a first preferred embodiment of an application program testing method according to the present invention.
In one embodiment, the application program testing method includes four steps:
s100, acquiring a trigger application program test instruction, and acquiring an application program to be tested and test data corresponding to the application program to be tested according to the trigger application program test instruction.
In specific implementation, before this step, a test data interface needs to be configured in advance and test data corresponding to the application program to be tested needs to be configured in advance, and the test client can access the test data interface to obtain the test data. Those skilled in the art can understand that the test data may be pre-configured in the cloud or configured in the storage space of the test client itself, that is, the test client may obtain the test data configured in the cloud by accessing the test data interface, or obtain the test data configured in the test client by accessing the test data interface.
In view of the fact that in practical application, the number of application programs to be tested is large, and a plurality of test clients are often required to execute test tasks at the same time, the test data are preferably configured in the cloud, so that each test client can be connected with the cloud by accessing one test data interface to acquire the test data pre-configured in the cloud without storing the test data into each test client respectively, and only the test data in the cloud need to be updated and maintained when the test data are updated and maintained, so that the efficiency of testing the application programs is improved.
The trigger application program test instruction can be sent by a developer manually clicking a trigger program icon on a test client, certainly, a total trigger program can also be configured at a cloud end, when the developer clicks the total trigger program configured at the cloud end, the total trigger program generates the trigger application program test instruction and sends the trigger application program test instruction to the test client, and the test client receives the trigger application program test instruction and automatically starts the trigger program. In this embodiment, after the testing client receives the trigger application testing instruction and runs the trigger program, a specific implementation manner of determining the application to be tested according to the trigger application testing instruction and acquiring the testing data corresponding to the application to be tested is shown in fig. 2.
As can be seen from fig. 2, the determining an application program to be tested according to the trigger application program test instruction and acquiring test data corresponding to the application program to be tested specifically includes:
and step S110, acquiring the package name of the application program to be tested.
Specifically, the Package name of the application refers to the Package name of an application apk (Android Package), that is, the Package name of an installation Package of the application, and the application and the Package name of the application are in a one-to-one correspondence relationship, that is, each application corresponds to a unique Package name, and when the Package name of the application to be tested is obtained, the application to be tested is correspondingly determined.
An implementation manner of obtaining the package name of the application program to be tested in this embodiment is specifically shown in fig. 3.
As can be seen from fig. 3, the acquiring the package name of the application program to be tested specifically includes:
step S111, receiving a test task, and reading a list of to-be-tested application programs in the test task;
step S112, obtaining the package name of the application program to be tested according to the arrangement sequence of the application program to be tested in the application program list to be tested.
In specific implementation, after the test client runs the trigger program, the process of the trigger program exists in a system running process list of the test client, that is, when the trigger program is online, the test client can receive a test task, and at this time, the cloud issues the test task to the test client. In this embodiment, a test task database is pre-established, a plurality of test tasks are stored in the test task database, and the test task database is arranged at the cloud end, that is, when a trigger program of the test client end is on line, the cloud end issues the test tasks to the test client end. Certainly, in another embodiment, the test task database may also be arranged in a storage space of the test client itself, that is, the test client itself is provided with a storage area for storing the test task database, and after the trigger program is started, the test client acquires the test task from the storage area.
Similarly, under the condition that a plurality of test clients perform application program tests, in order to improve the efficiency of the application program tests, the test tasks are preferably stored in a test task database without establishing a test task database on each test client, namely, one test task database is configured at the cloud end, and when the test clients capable of receiving the test tasks exist, the cloud end sends the test tasks in the test task database to the corresponding test clients, so that the test task database only needs to be maintained at the cloud end, and the test task database on each test client does not need to be maintained separately. In other real-time examples, the test client may send a signal capable of receiving the test task to the cloud to trigger the cloud to send the test task to the test client, or the cloud may detect whether there is a test client that triggers the program online and send the test task to the test client.
Specifically, the test task comprises at least one application program to be tested, wherein the application program to be tested is stored in a list form, namely, the test task comprises a list of the application programs to be tested, and after receiving the test task, the test client can read the list of the application programs to be tested in the test task, and further obtain data information of the application programs to be tested in the list of the application programs to be tested, including an apk package, a package name and the like of the application programs.
In this embodiment, the test client obtains the package names of the to-be-tested applications according to the arrangement sequence of the to-be-tested applications in the to-be-tested application list, that is, which to-be-tested application is in front of the to-be-tested application in the to-be-tested application list, obtains the package name of the to-be-tested application first, that is, tests the to-be-tested application first. The sequence of the to-be-tested applications in the to-be-tested application list is determined by factors such as creation time, test priority, and operation priority of the to-be-tested applications, which are explained in detail below.
The creation time, that is, the creation time of the application program to be tested, identifies when the application program to be tested is created, and can sequence the application programs to be tested according to the sequence of the creation time.
The test priority identifies the importance of the application programs to be tested, and generally speaking, the application programs to be tested with high test priority are tested preferentially, that is, the application programs to be tested are sorted according to the test priority from high to low.
The method comprises the steps of running priority and identifying the running sequence of an application program to be tested, specifically, the application program is divided into a basic application program and an extended application program, the extended application program needs to be started to run under the environment that the basic application program is already running, and the running priority of the basic application program is higher than that of the extended application program, for example, a small program of a WeChat needs to be tested after the WeChat is already running. Of course, this is only an example, and as long as there are applications with dependency or interaction relationships among the applications to be tested, it is necessary to first perform testing on the applications with high running priority, that is, to sort the applications to be tested in the order of running priority from high to low.
The applications to be tested in the list of applications to be tested may be sorted according to one or more of creation time, test priority, and operation priority. When the sorting is performed according to a plurality of the creation time, the test priority and the operation priority, the sorting is performed according to the preferred sequence that the operation priority is greater than the test priority and greater than the creation time, that is, the operation priority is judged first, the operation priority which is higher than the test priority is arranged in front, the test priority is judged again when the operation priorities are the same, the test priority which is higher than the test priority is arranged in front, and the creation time is judged when the operation priorities and the test priorities are the same, and the creation time is arranged in front when the creation time is earlier than the creation time. Of course, these are just some examples of the present invention, and those skilled in the art can introduce other sorting factors and sorting logics to sort according to actual situations.
It should be noted that, in this embodiment, the package name of the application program to be tested is obtained according to the arrangement order of the application programs to be tested in the application program list to be tested, that is, the application programs to be tested are tested according to the arrangement order in the application program arrangement list to be tested, but it is not limited to performing the next test after one test of the application programs to be tested is completed, and the test of multiple application programs to be tested can be performed simultaneously under the condition that the computational resources of the test client are sufficient.
Turning now to fig. 2. Obtaining test data from the cloud through the test data interface in this embodiment specifically further includes:
step S120, accessing a test data interface, and sending a test data acquisition instruction to the cloud, wherein the test data acquisition instruction comprises a package name of the application program to be tested;
and step S130, receiving the test data corresponding to the package name of the application program to be tested and fed back by the cloud.
As described above, the test client may establish a connection with the cloud by accessing the test data interface. Therefore, after acquiring the package name of the application program to be tested, the testing client can send a testing data acquisition instruction including the package name of the application program to be tested to the cloud through the testing data interface. And after receiving the test data acquisition instruction, the cloud end searches for corresponding test data according to the package name of the application program to be tested, which is contained in the test data acquisition instruction.
Specifically, the test data includes: the system comprises an automation script for controlling the automatic running of the application program to be tested and a detection script for detecting the running condition of the application program to be tested. These two scripts are explained in detail below.
In the technical field, the operation instruction for operating the application program to be tested is recorded in the automation script, and the step of testing the application program is to run the application program once and simulate the process of actually using the application program by a user to test whether the application program can be normally used. Taking the WeChat as an example, when the application program to be tested is the WeChat, the automatic script records a click WeChat installation package instruction to realize the click of the WeChat installation package for installation, and records a click of WeChat icon instruction to realize the opening of the WeChat application interface, and the like. Compared with a manual testing method, the method obviously adopts the automatic script to control the automatic running of the application program to be tested, so that the automation degree of the application program testing can be greatly improved, the occupation of human resources caused by the manual testing is avoided, and the efficiency is far higher than that of the manual testing.
In the embodiment, the automation script is implemented by python (an interpreted scripting language) and appium (an automation test open source tool), but the invention is not limited thereto, and those skilled in the art may implement the automation script by other scripting languages, such as shell scripting language and the like.
As can be seen from the above description of the automation script, the automation script and the application program to be tested are in a one-to-one correspondence relationship, and it should be emphasized that, because the operation flows of different application programs to be tested are different, the automation scripts corresponding to different application programs to be tested are also different. As described above, the application programs and their package names are also in a one-to-one correspondence. In this embodiment, an identifier may be given to an automation script configured in advance at a cloud, where the identifier is a package name of an application program to be tested corresponding to the automation script. In this embodiment, the identification may be implemented by naming the automation script, that is, setting the file name of the automation script as the package name of the corresponding application program to be tested, so that when the cloud acquires the test data acquisition request containing the package name of the application program to be tested, the cloud may search for the automation script named as the package name of the application program to be tested, and send the automation script to the test client. In other embodiments, the identifier may also be implemented in other manners, for example, the package name of the corresponding application program to be tested is written in the first line of the instruction of the automation script, and when the cloud acquires the test data acquisition request containing the package name of the application program to be tested, the cloud may search for the automation script having the corresponding package name in the first line of the instruction, and send the automation script to the test client.
The above method for implementing the correspondence between the automation script and the application program to be tested through the package name is only a partial embodiment of the present invention, and a person skilled in the art may also establish the correspondence between the automation script and the application program to be tested according to other methods to implement sending the corresponding automation script according to the application program test request of the test client.
The detection script is a script for detecting the running condition of the application program to be tested, specifically, a plurality of processes exist during the running of the application program, and the detection script can monitor the running condition of the processes. In this embodiment, the detection script is implemented by a shell (a scripting language) language and an adb (android debug bridge) command, and certainly, like an automation script, the present invention is not limited to this implementation manner, and a person skilled in the art can completely select other scripting languages and debugging tools to implement the detection script for monitoring the running condition of the application program to be tested.
It should be noted that, in this embodiment, the detection script does not need to correspond to the application programs to be tested one to one, and one detection script can monitor a plurality of application programs to be tested, that is, the cloud end can only store one detection script, and when receiving a test data acquisition request of the test client, feed back the detection script to the test client. Certainly, for the case that a plurality of test clients exist, the cloud may copy the detection script and send the detection script to each terminal, or extract the instruction content in the detection script and feed the instruction content back to the test clients, and the test clients create a new detection script locally for testing the application program on the terminal according to the obtained instruction content in the detection script.
It should be understood that, although the detection script in this embodiment is not in a one-to-one correspondence relationship with the application to be tested, in other embodiments, it is not excluded that there is a special application to be tested, and for this case, a corresponding detection script may be newly created to better implement the monitoring service for a specific application.
In summary, according to the program testing method provided by the invention, the test data is acquired from the cloud terminal through the test data interface, and the test data corresponding to the application program to be tested is configured in the cloud terminal in advance, so that a plurality of test client terminals can acquire the required test data at the same time, and the efficiency of testing the application program is improved.
Referring back to fig. 1, in the first embodiment, after S100, the method further includes the steps of:
s200, running the test data and testing the application program to be tested;
as mentioned above, the test client has already obtained the test data corresponding to the application to be tested in step S100, including the automation script and the detection script, and the automation script can control the application to be tested to automatically run, and the detection script can detect the running condition of the application to be tested.
Therefore, after the test client receives the test data containing the automation script and the detection script, the automation script can be operated, and the application program to be tested is controlled to automatically operate according to the automation script to test the application program to be tested; and running the detection script, and detecting the running condition of the application program to be tested in real time through the monitoring script.
S300, when the abnormal termination of the process of the application program to be tested is detected, acquiring the running information of the application program to be tested and sending the running information to a cloud end, and receiving a prompt file which is generated by the cloud end according to the running information and used for prompting the abnormal termination of the process.
In this embodiment, detecting whether the process of the application program to be tested terminates abnormally is performed by a detection script, and specifically, the detection script may be implemented in various ways to monitor whether the process of the application program to be tested terminates abnormally. For example: the detection script acquires all process lists of running application programs to be tested in real time, compares the lists with the process list acquired at the last moment, acquires processes which are not on-line at the moment, and judges that the processes are abnormally terminated; or, the detection script accesses the automation script, obtains the operation information of the automation script, compares the operation information with the current application program process, and judges that the process is abnormally terminated when the current application program process is not matched with the operation information of the automatic call script. The method for detecting the abnormal termination of the process of the application program to be tested by the detection script in the present invention is not limited to the above example, and those skilled in the art may use other methods to implement the method.
And when the detection script detects that the process of the application program to be tested is abnormally terminated, the test client acquires the running information of the application program. Specifically, a command line for acquiring running information when a process terminates abnormally may be added to a detection script, and a test client acquires the running information by detecting the command line of the script; the test client may also obtain the running information through the trigger program that runs when starting the application detection, which is not specifically limited in the present invention. And the operation information mainly comprises: log (log) information of the application program to be tested before the process is abnormally terminated, activity (one of four android components) information of the application program to be tested before the process is abnormally terminated, and operation information of the automation script of the application program to be tested before the process is abnormally terminated, which are described in detail below.
In the log information of the application program to be tested before the process is abnormally terminated, the log information refers to log information, and in particular, in the embodiment, the log information refers to some log information generated by adding debugging codes or system debugging in terminal codes by an application program developer when the application program is operated, and the developer can locate the problem when the process of the application program is abnormally terminated according to the printed log information.
The activity information of the application program to be tested before the process is abnormally terminated is known by those skilled in the art, the activity is one of four android components, and a developer can confirm a current error page by checking the activity, that is, the page in which the process of the application program to be tested is abnormally terminated.
Before the process of the application program to be tested is abnormally terminated, the automation script performs what operation on the application program to be tested, such as which button is pressed, which connection is clicked, and the like.
As can be seen from the above description of the operation information, the method and the device mainly aim to obtain all information which is helpful for a developer to research when the process of the application program to be tested is abnormally terminated and is why the process is abnormally terminated and how to solve the problem of abnormal termination when the process is abnormally terminated when the process of the application program to be tested is detected to be abnormally terminated, so that the developer can improve the application program to be tested, and the issue of an application program product with hidden troubles is avoided. Therefore, the application program testing method provided by the invention is not limited to obtaining the three kinds of operation information, and any method which is beneficial for developers to analyze and improve the operation information of the application program to be tested is within the scope of the operation information of the invention.
In this embodiment, the test client sends the operation information to the cloud after acquiring the operation information, the cloud generates a prompt file for prompting the abnormal termination of the process after receiving the operation information, and the prompt file is sent to the test client, so that the test client can prompt developers according to the prompt file, and the developers can know that the process of the application to be tested is abnormally terminated.
Preferably, after receiving the operation information, the cloud end further sorts the operation information and generates an operation data file of the current application program to be tested. After receiving the prompt, the developer can operate the cloud to check the running data file to obtain the specific test error condition of the application program to be tested.
Of course, the cloud end can send the generated operation data file back to the test client end, and after the test client end carries out the prompt of test error, developers can check the operation data file at the cloud end and also can check the operation data file at the test client end.
And under the condition that a plurality of test clients are simultaneously tested, the running information of the application programs to be tested of all the test clients is respectively sent to the cloud end, and the running data files are respectively generated, so that developers can operate the cloud end to call the generated running data files to check the running data files, the specific conditions of all the application programs being tested can be known, the running data files do not need to be acquired by independently operating each test client, and the efficiency of the developers for acquiring the running information is improved.
It should be understood that although the various steps in the flowcharts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Preferably, in the first embodiment, after the obtaining the running information of the application program to be tested and sending the running information to the cloud, the method further includes the steps of:
restarting the application program to be tested;
and running the automation script and the detection script to test the application program to be tested and detecting the running condition of the application program to be tested in real time.
Specifically, after detecting that the process of the application program to be tested is abnormally terminated and the running information is sent to the cloud, the testing client restarts the application program to be tested, before restarting the application program to be tested, the process which is abnormally terminated can be ignored, the application program to be tested is restarted after the application program to be tested is completely run, or when detecting that the process is abnormally terminated, the application program to be tested is stopped from running, and the application program to be tested is restarted after the running information is obtained.
And after the test is restarted, the automation script and the detection script are operated again to continue testing the application program to be tested. The purpose of restarting the application program to be tested is mainly to confirm whether the abnormal termination of the process is misjudged by the detection script or not and is an accidental situation, and simultaneously confirm whether the application program to be tested can be actively repaired after restarting, namely, more information about the abnormal termination of the process of the application program to be tested is obtained, and the development personnel can conveniently improve the information.
And for the condition that the process is abnormally terminated after repeated restarting, for example, more than three times, stopping testing the application program to be tested, prompting a developer that the application program to be tested has problems, and testing after improvement.
As can be seen from the above embodiments, according to the application program testing method provided by the invention, the corresponding test data is configured for the application program to be tested at the cloud, so that not only can the multiple test clients automatically perform the application program test at the same time, but also the application program to be tested is monitored, the running information is recorded and a prompt file is generated for a developer to check when the process is abnormally terminated, and the prompt of the abnormal termination of the process is realized, so that the developer can timely master the problem of the abnormal termination of the process of the application program to be tested and obtain the corresponding analysis data, the developer can conveniently improve the application program to be tested, and the issue of the application program with the hidden danger of the abnormal termination of the process is avoided.
In another embodiment of the invention, an application testing system is also provided. Specifically, the application test system includes:
the test data acquisition module is used for acquiring test data corresponding to the application program to be tested through a pre-configured test data interface when a test task exists, and is specifically described above;
the test module is used for running the test data and testing the application to be tested, and the test data is specifically as described above;
the prompting module is configured to, when it is detected that the process of the application program to be tested is abnormally terminated, obtain operation information of the application program to be tested and send the operation information to a cloud, and receive a prompt file, which is generated by the cloud according to the operation information and used for prompting the abnormal termination of the process, as described above.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 4. The intelligent terminal comprises a processor, a memory, a network interface, a display screen and a temperature sensor which are connected through a system bus. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. The computer program is executed by a processor to implement an application testing method. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the intelligent terminal is arranged inside the intelligent terminal in advance and used for detecting the current operating temperature of internal equipment.
It will be understood by those skilled in the art that the block diagram shown in fig. 4 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have a different arrangement of components.
In one embodiment, an intelligent terminal is provided, which includes a memory and a processor, the memory stores a computer program, and the processor can realize at least the following steps when executing the computer program: acquiring a trigger application program test instruction, determining an application program to be tested according to the trigger application program test instruction, and acquiring test data corresponding to the application program to be tested;
running the test data to test the application program to be tested;
when the abnormal termination of the process of the application program to be tested is detected, the running information of the application program to be tested is obtained and sent to a cloud end, and a prompt file which is generated by the cloud end according to the running information and used for prompting the abnormal termination of the process is received.
In one embodiment, the processor when executing the computer program can further implement the following steps: acquiring the package name of the application program to be tested;
accessing a test data interface and sending a test data acquisition instruction to the cloud, wherein the test data acquisition instruction comprises a package name of the application program to be tested;
and receiving the test data corresponding to the package name of the application program to be tested, which is fed back by the cloud.
In one embodiment, the processor when executing the computer program can further implement the following steps: receiving a test task, and reading an application program list to be tested in the test task;
and acquiring the package name of the application program to be tested according to the arrangement sequence of the application programs to be tested in the application program list to be tested.
In one embodiment, the application program arrangement order in the application program list to be tested is arranged according to the creation time, the test priority and the running priority of the application program to be tested.
In one embodiment, the test data includes: the system comprises an automation script used for controlling the automatic running of the application program to be tested and a detection script used for detecting the running condition of the application program to be tested.
In one embodiment, the processor when executing the computer program can further implement the following steps: running the automation script, and controlling the application program to be tested to automatically run according to the automation script;
and running the detection script, and detecting the running condition of the application program to be tested in real time through the detection script.
In one embodiment, the processor when executing the computer program can further implement the following steps:
and obtaining log information of the application program to be tested before the process is abnormally terminated, activity information of the application program to be tested before the process is abnormally terminated and operation information of the automation script before the process of the application program to be tested is abnormally terminated.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the invention provides an application program testing method, an intelligent terminal and a storage medium, in which the application program testing method implements timely obtaining process abnormal termination information of an application program to be tested and generating a prompt file by configuring a detection script for the application program to be tested, so as to remind a developer to check the prompt file, facilitate the developer to improve the application program to be tested, and avoid issuing the application program with the hidden danger of process abnormal termination.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (10)

1. An application testing method, the method comprising:
acquiring a trigger application program test instruction, determining an application program to be tested according to the trigger application program test instruction, and acquiring test data corresponding to the application program to be tested;
running the test data to test the application program to be tested;
when the abnormal termination of the process of the application program to be tested is detected, the running information of the application program to be tested is obtained and sent to a cloud end, and a prompt file which is generated by the cloud end according to the running information and used for prompting the abnormal termination of the process is received.
2. The method for testing an application program according to claim 1, wherein the determining an application program to be tested according to the trigger application program test instruction and acquiring test data corresponding to the application program to be tested specifically comprises:
acquiring the package name of the application program to be tested;
accessing a test data interface and sending a test data acquisition instruction to the cloud, wherein the test data acquisition instruction comprises a package name of the application program to be tested;
and receiving the test data corresponding to the package name of the application program to be tested, which is fed back by the cloud.
3. The method for testing an application program according to claim 2, wherein the obtaining of the package name of the application program to be tested specifically comprises:
receiving a test task, and reading an application program list to be tested in the test task;
and acquiring the package name of the application program to be tested according to the arrangement sequence of the application programs to be tested in the application program list to be tested.
4. The application testing method of claim 3, wherein the application arrangement order in the list of applications to be tested is arranged according to the creation time, the test priority and the operation priority of the applications to be tested.
5. The application testing method of claim 1, wherein the test data comprises: the system comprises an automation script used for controlling the automatic running of the application program to be tested and a detection script used for detecting the running condition of the application program to be tested.
6. The method for testing an application program according to claim 5, wherein the running the test data to test the application program to be tested specifically comprises:
running the automation script, and controlling the application program to be tested to automatically run according to the automation script;
and running the detection script, and detecting the running condition of the application program to be tested in real time through the detection script.
7. The method for testing an application program according to claim 6, wherein the acquiring the running information of the application program to be tested specifically comprises:
and obtaining log information of the application program to be tested before the process is abnormally terminated, activity information of the application program to be tested before the process is abnormally terminated and operation information of the automation script before the process of the application program to be tested is abnormally terminated.
8. An application testing system, comprising:
the test data acquisition module is used for acquiring test data corresponding to the application program to be tested through a pre-configured test data interface when a test task exists;
the test module is used for running the test data and testing the application to be tested;
and the prompting module is used for acquiring the running information of the application program to be tested and sending the running information to a cloud end when the abnormal termination of the process of the application program to be tested is detected, and receiving a prompting file which is generated by the cloud end according to the running information and is used for prompting the abnormal termination of the process.
9. An intelligent terminal, characterized in that, intelligent terminal includes: a processor, a storage medium communicatively coupled to the processor, the storage medium adapted to store a plurality of instructions; the processor is adapted to invoke instructions in the storage medium to perform an application testing method implementing any of the above claims 1-7.
10. A storage medium, wherein the computer-readable storage medium stores one or more programs, the one or more programs being executable by one or more processors to implement an application testing method as claimed in any one of claims 1 to 7.
CN201910704086.9A 2019-07-31 2019-07-31 Application program testing method and system, intelligent terminal and storage medium Pending CN112306849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910704086.9A CN112306849A (en) 2019-07-31 2019-07-31 Application program testing method and system, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910704086.9A CN112306849A (en) 2019-07-31 2019-07-31 Application program testing method and system, intelligent terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112306849A true CN112306849A (en) 2021-02-02

Family

ID=74486324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910704086.9A Pending CN112306849A (en) 2019-07-31 2019-07-31 Application program testing method and system, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112306849A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827257A (en) * 2022-05-10 2022-07-29 携程旅游网络技术(上海)有限公司 Method, device, equipment and medium for pushing application program of enterprise client

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302727A (en) * 2015-11-17 2016-02-03 小米科技有限责任公司 Testing method, device and system
CN105760301A (en) * 2016-02-24 2016-07-13 惠州Tcl移动通信有限公司 Automatic testing method and system based on Monkey command
CN106708705A (en) * 2015-07-15 2017-05-24 腾讯科技(深圳)有限公司 Terminal background process monitoring method and system
CN107273300A (en) * 2017-07-31 2017-10-20 北京云测信息技术有限公司 A kind of applied program testing method and device
CN107291623A (en) * 2017-07-31 2017-10-24 北京云测信息技术有限公司 A kind of applied program testing method and device
CN109766258A (en) * 2018-11-30 2019-05-17 北京奇艺世纪科技有限公司 A kind of performance test methods, device and computer readable storage medium
CN109828918A (en) * 2019-01-16 2019-05-31 深圳壹账通智能科技有限公司 Applied program testing method, device, computer equipment and storage medium
CN110069398A (en) * 2019-03-15 2019-07-30 平安普惠企业管理有限公司 Programmed pressure test control method, device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708705A (en) * 2015-07-15 2017-05-24 腾讯科技(深圳)有限公司 Terminal background process monitoring method and system
CN105302727A (en) * 2015-11-17 2016-02-03 小米科技有限责任公司 Testing method, device and system
CN105760301A (en) * 2016-02-24 2016-07-13 惠州Tcl移动通信有限公司 Automatic testing method and system based on Monkey command
CN107273300A (en) * 2017-07-31 2017-10-20 北京云测信息技术有限公司 A kind of applied program testing method and device
CN107291623A (en) * 2017-07-31 2017-10-24 北京云测信息技术有限公司 A kind of applied program testing method and device
CN109766258A (en) * 2018-11-30 2019-05-17 北京奇艺世纪科技有限公司 A kind of performance test methods, device and computer readable storage medium
CN109828918A (en) * 2019-01-16 2019-05-31 深圳壹账通智能科技有限公司 Applied program testing method, device, computer equipment and storage medium
CN110069398A (en) * 2019-03-15 2019-07-30 平安普惠企业管理有限公司 Programmed pressure test control method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827257A (en) * 2022-05-10 2022-07-29 携程旅游网络技术(上海)有限公司 Method, device, equipment and medium for pushing application program of enterprise client

Similar Documents

Publication Publication Date Title
CN107193750B (en) Script recording method and device
CN110069572B (en) HIVE task scheduling method, device, equipment and storage medium based on big data platform
CN109284269B (en) Abnormal log analysis method and device, storage medium and server
CN109344065B (en) Remote debugging method, debugging server and target machine
US9489292B2 (en) Devices and methods for acquiring abnormal information
US8954930B2 (en) System and method for reducing test effort by object risk analysis
WO2021218178A1 (en) Automatic report generation method, device, computer apparatus, and storage medium
CN108508874B (en) Method and device for monitoring equipment fault
CN111274154A (en) Automatic testing method, device, equipment and storage medium
CN113254323B (en) Online full link voltage measurement method and device and computer equipment
CN110502366B (en) Case execution method, device, equipment and computer readable storage medium
US10613969B2 (en) Code coverage module with testing function identifier
CN110063042A (en) A kind of response method and its terminal of database failure
CN112650676A (en) Software testing method, device, equipment and storage medium
CN114328243A (en) Abnormal operation data processing method, device, equipment and storage medium
CN110399209B (en) Data processing method, system, electronic device and storage medium
CN112416762B (en) API test method and device, equipment and computer readable storage medium
CN112306849A (en) Application program testing method and system, intelligent terminal and storage medium
CN112269697B (en) Equipment storage performance testing method, system and related device
CN112818411A (en) Data detection method and device
CN111414287A (en) Method, system and device for analyzing chip test result
CN112650674A (en) Method for remotely acquiring and debugging webpage log, computer equipment and storage medium
CN112558982B (en) Code detection method and device and computer equipment
CN111654553B (en) Middleware-based management and control operation method and device, computer equipment and medium
CN115757138A (en) Method and device for determining script abnormal reason, storage medium and electronic equipment

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