CN112948259A - Application testing method and device, electronic equipment and storage medium - Google Patents

Application testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112948259A
CN112948259A CN202110335257.2A CN202110335257A CN112948259A CN 112948259 A CN112948259 A CN 112948259A CN 202110335257 A CN202110335257 A CN 202110335257A CN 112948259 A CN112948259 A CN 112948259A
Authority
CN
China
Prior art keywords
test
tested
application
test case
executing
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
CN202110335257.2A
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.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
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 Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202110335257.2A priority Critical patent/CN112948259A/en
Publication of CN112948259A publication Critical patent/CN112948259A/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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

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)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides an application testing method and device, electronic equipment and a storage medium, and belongs to the technical field of software testing. Firstly, obtaining a test case selected by a user, wherein the test case is used for indicating the test operation corresponding to the test case to be performed on an application to be tested; then, determining a target APK corresponding to a test case based on a preset corresponding relation between the test case and the APK, wherein the target APK is pre-installed on the mobile equipment where the application to be tested is located, and the target APK is used for executing test operation corresponding to the test case according to the indication of the test case; and finally, executing the test operation corresponding to the test case on the application to be tested by using the target APK. Through the application, the PC end does not need to be connected during testing, the connector of the mobile equipment cannot be damaged, and the testing cost is reduced.

Description

Application testing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of software testing technologies, and in particular, to an application testing method and apparatus, an electronic device, and a storage medium.
Background
Along with the development of mobile internet, mobile intelligent equipment is more and more popular, wherein the mobile intelligent equipment based on the Android operating system occupies the half-wall river mountain of the mobile intelligent equipment market, the application based on the Android operating system is more and more, and the testing process of the application is indispensable in order to ensure the stable operation of the application in the Android mobile intelligent equipment. At present, most of the applications on the mobile device are tested by using the Python script, the Python script needs to run depending on the Python running environment established by the PC end, and the mobile device and the PC end need to be connected during testing, so that the applications on the mobile device are tested by using the Python script and occupy the PC end, and the required testing cost is high.
Disclosure of Invention
An object of the embodiments of the present application is to provide an application testing method and apparatus, an electronic device, and a storage medium, so as to solve the problem that testing an application on a mobile device using a Python script occupies a PC terminal and requires a higher testing cost. The specific technical scheme is as follows:
in a first aspect, the present application provides an application testing method, including:
the method comprises the steps of obtaining a test case selected by a user, wherein the test case is used for indicating to-be-tested application to carry out test operation corresponding to the test case;
determining a target APK corresponding to a test case based on a preset corresponding relation between the test case and the APK, wherein the target APK is pre-installed on a mobile device where the application to be tested is located, and the target APK is used for executing test operation corresponding to the test case according to the indication of the test case;
and executing the test operation corresponding to the test case on the application to be tested by utilizing the target APK.
Optionally, the application to be tested includes at least one element to be tested, and the target APK includes: the test system comprises an identification field of an element to be tested and test operation information of at least one element to be tested;
the executing, by using the target APK, the test operation corresponding to the test case on the application to be tested includes:
searching an element to be tested corresponding to the identification field in the target APK in the application to be tested;
and testing the elements to be tested according to the test operation information.
Optionally, the test operation information includes a test frequency and/or a test duration corresponding to the element to be tested, and an execution action;
the testing the element to be tested according to the testing operation information comprises the following steps:
and executing the executing action corresponding to the element to be tested according to the testing times and/or the testing duration corresponding to the element to be tested.
Optionally, the method further includes:
judging whether an abnormal event is detected in the process of executing the test operation;
if no abnormal event is detected in the process of executing the test operation, recording a test result obtained by executing the test operation;
if an abnormal event is detected in the process of executing the test operation, a preset mode is used for feeding back a test abnormal message.
Optionally, the feeding back the test exception message by using the preset mode includes:
acquiring preset communication information of operation and maintenance personnel for receiving the test abnormal message;
and sending the test abnormal message to the operation and maintenance personnel according to the communication information.
Optionally, the feeding back the test exception message by using the preset mode includes:
and displaying the test exception message on the mobile equipment where the application to be tested is located.
Optionally, the method further includes:
displaying a UI interface, wherein the UI interface comprises at least one button, and each button corresponds to one test case;
detecting whether a click operation is received on any button;
and if the fact that the clicking operation is received on any button is detected, determining that the test case corresponding to the clicked button is the test case selected by the user.
In a second aspect, there is provided an application testing apparatus, the apparatus comprising:
the system comprises an acquisition module, a test case generation module and a test execution module, wherein the acquisition module is used for acquiring a test case selected by a user, and the test case is used for indicating to carry out test operation corresponding to the test case on an application to be tested;
the determining module is used for determining a target APK corresponding to a test case based on a preset corresponding relation between the test case and the APK, the target APK is pre-installed on the mobile equipment where the application to be tested is located, and the target APK is used for executing test operation corresponding to the test case according to the indication of the test case;
and the execution module is used for executing the test operation corresponding to the test case on the application to be tested by utilizing the target APK.
Optionally, the application to be tested includes at least one element to be tested, and the target APK includes: the test system comprises an identification field of an element to be tested and test operation information of at least one element to be tested;
the execution module includes:
the element to be tested searching module is used for searching an element to be tested corresponding to the identification field in the target APK in the application to be tested;
and the element to be tested testing module is used for testing the element to be tested according to the testing operation information.
Optionally, the test operation information includes a test frequency and/or a test duration corresponding to the element to be tested, and an execution action;
the element to be tested test module comprises:
and the testing submodule is used for executing the execution action corresponding to the element to be tested on the element to be tested according to the testing times and/or the testing duration corresponding to the element to be tested.
Optionally, the apparatus further comprises:
the judging module is used for judging whether an abnormal event is detected in the process of executing the test operation;
the recording module is used for recording a test result obtained by executing the test operation if no abnormal event is detected in the process of executing the test operation;
and the feedback module is used for feeding back the test abnormal message by using a preset mode if the abnormal event is detected in the process of executing the test operation.
Optionally, the feedback module includes:
the communication information acquisition module is used for acquiring preset communication information of operation and maintenance personnel for receiving the test abnormal message;
and the sending module is used for sending the test abnormal message to the operation and maintenance personnel according to the communication information.
Optionally, the feedback module includes:
and the display module is used for displaying the test abnormal message on the mobile equipment where the application to be tested is located.
Optionally, the apparatus further comprises:
the UI interface display module is used for displaying a UI interface, the UI interface comprises at least one button, and each button corresponds to one test case;
the detection module is used for detecting whether click operation is received on any button;
and the determining module is used for determining that the test case corresponding to the clicked button is the test case selected by the user if the fact that the clicking operation is received on any button is detected.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of the first aspect when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the method steps of any of the first aspects.
In a fifth aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the application testing methods described above.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
the embodiment of the application provides an application testing method, an application testing device, electronic equipment and a storage medium, and the application testing method comprises the steps of firstly, obtaining a test case selected by a user, wherein the test case is used for indicating to carry out test operation corresponding to the test case on an application to be tested; then, determining a target APK corresponding to a test case based on a preset corresponding relation between the test case and the APK, wherein the target APK is pre-installed on the mobile equipment where the application to be tested is located, and the target APK is used for executing test operation corresponding to the test case according to the indication of the test case; and finally, executing the test operation corresponding to the test case on the application to be tested by using the target APK.
Through this application, APK installs on the mobile device that the application place is awaited measuring, can be based on the operational environment operation that the mobile device provided, so, when utilizing APK test application of awaiting measuring, change test environment into the removal end by the PC end, change into the data connection who removes end itself by the physical connection of removing end and PC end, need not to connect the PC end during the test, therefore, during the test application, need not the plug, connect the operation, reduce the interactive operation among the test process, save a test link, can not cause the damage to the connector of mobile device, reduce the test cost.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of an application testing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an application testing method according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of an application testing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Because the application on the mobile device is tested by using the Python script at present, the operation of the Python script needs to depend on the Python operation environment established by the PC end, and the mobile device and the PC end need to be connected during testing, therefore, the application on the mobile device tested by using the Python script occupies the PC end, the required testing cost is high, and the Python script can be applied to the mobile device.
An application testing method provided in the embodiments of the present application will be described in detail below with reference to specific embodiments, as shown in fig. 1, the specific steps are as follows:
s101, obtaining a test case selected by a user, wherein the test case is used for indicating to carry out test operation corresponding to the test case on an application to be tested.
In the embodiment of the application, the test case is used for instructing the application to be tested to perform the test operation corresponding to the test case, and before the application is tested, the test case selected by the user needs to be obtained.
S102, determining a target APK corresponding to a test case based on a preset corresponding relation between the test case and the APK, wherein the target APK is pre-installed on a mobile device where the application to be tested is located, and the target APK is used for executing test operation corresponding to the test case according to the indication of the test case.
In the embodiment of the application, the target APK is pre-installed on the mobile device where the application to be tested is located, and the target APK is used for executing the test operation corresponding to the test case according to the instruction of the test case. The corresponding relation between the test case and the APK is preset in the mobile equipment, and after the test case selected by the user is obtained, the target APK corresponding to the test case can be determined.
S103, executing the test operation corresponding to the test case on the application to be tested by using the target APK.
In this embodiment of the application, after determining the target APK, the mobile device may execute a test operation corresponding to the test case on the application to be tested by using the target APK, so as to complete a test on the application to be tested.
In the embodiment of the application, the APK is installed on the mobile device where the application to be tested is located, the operation environment operation that can provide based on the mobile device, therefore, when the application to be tested is tested by utilizing the APK, the test environment is changed into the mobile end from the PC end, the physical connection of the mobile end and the PC end is changed into the data connection of the mobile end, the PC end does not need to be connected during the test, therefore, during the test application, the plugging and pulling are not needed, the connection operation is reduced, the interactive operation in the test process is reduced, a test link is omitted, the connector of the mobile device cannot be damaged, and the test cost is reduced.
In another embodiment of the present application, the application to be tested includes at least one element to be tested, and the target APK includes: the test system comprises an identification field of an element to be tested and test operation information of at least one element to be tested; the S103 may include the following steps:
step one, searching an element to be tested corresponding to the identification field in the target APK in the application to be tested.
In the embodiment of the application, the identification field included in the target APK can identify the element to be tested, and during testing, the APK searches the element to be tested corresponding to the identification field in the target APK in the application to be tested based on the uiautomator framework.
And step two, testing the elements to be tested according to the test operation information.
In the embodiment of the application, after the element to be tested is found, the element to be tested can be automatically tested according to the test operation information set in the target APK, manual testing is not needed, and labor is saved.
In another embodiment of the present application, the test operation information includes a test time and/or a test duration corresponding to an element to be tested, and an execution action; the S103 may include the following steps:
and executing the executing action corresponding to the element to be tested according to the testing times and/or the testing duration corresponding to the element to be tested.
In the embodiment of the application, the execution action may be clicking, dragging, text inputting, and the like, the target APK is preset with the test times and/or test duration and the execution action corresponding to the element to be tested, and the execution action corresponding to the element to be tested is executed on the element to be tested according to the test times and/or test duration corresponding to the element to be tested.
Illustratively, the target APK includes an identification field of an element a to be tested, a 100-minute click action on the element a to be tested, and an identification field of an element B to be tested, and 80 drag actions on the element B to be tested, the identification field of the element a to be tested is firstly used for searching the element a to be tested, then the 100-minute click action is executed on the element a to be tested, then the identification field of the element B to be tested is used for searching the element B to be tested, finally the 80 drag actions are executed on the element B to be tested, and after the execution is finished, the test is finished.
In the embodiment of the application, the execution action corresponding to the element to be tested can be automatically executed on the element to be tested according to the preset test times and/or test duration corresponding to the element to be tested. In the test process, the test times and/or the test duration do not need to be monitored by manpower, and actions can be automatically executed, so that the labor cost is saved.
In yet another embodiment of the present application, the method may further comprise the steps of:
s201, judging whether an abnormal event is detected in the process of executing the test operation.
In the embodiment of the application, an execution standard is preset in the target APK, and an abnormal event refers to an event which does not meet the execution standard in the test process. For example, it is preset that 100 times of clicking actions are performed on the element a to be tested, and the clicking actions are stopped when 80 times of clicking actions are performed, at which time it is determined that an abnormal event is detected in the process of performing the testing operation.
S202, if no abnormal event is detected in the process of executing the test operation, recording a test result obtained by executing the test operation.
In the embodiment of the present application, the test result refers to: and after the test data is obtained through the test operation, comparing the test data with preset reference data to obtain a test result, and if no abnormal event is detected in the process of executing the test operation, recording the test result obtained by executing the test operation.
In another implementation manner of the embodiment of the present application, after the test result is obtained, the test result is displayed, so that the operation and maintenance personnel can know the test condition in time.
S203, if an abnormal event is detected in the process of executing the test operation, feeding back a test abnormal message by using a preset mode.
In the embodiment of the application, if an abnormal event is detected in the process of executing the test operation, the test abnormal message is fed back by using a preset mode.
In the embodiment of the application, when the abnormal event is detected in the process of executing the test operation, the test abnormal message can be fed back, so that the operation and maintenance personnel can know the condition of the abnormal event in the test process through the fed-back abnormal message.
In another embodiment of the present application, the S203 may include the following steps:
step one, acquiring preset communication information of operation and maintenance personnel for receiving the test abnormal message.
In this embodiment, the communication information may be a mailbox account, a short message number, or an account of another application that can communicate. And when an abnormal event is detected in the process of executing the test operation, acquiring preset communication information of operation and maintenance personnel for receiving the test abnormal message.
And step two, sending the test abnormal message to the operation and maintenance personnel according to the communication information.
In the embodiment of the application, after the communication information is acquired, the test exception message is sent to the operation and maintenance personnel according to the communication information.
In the embodiment of the application, if the operation and maintenance personnel are not located in the test site where the mobile device is located, the operation and maintenance personnel send the test abnormal message according to the preset communication information of the operation and maintenance personnel for receiving the test abnormal message, so that the operation and maintenance personnel can know the abnormal event in the test process in time.
In another embodiment of the present application, the S203 may include the following steps:
and displaying the test exception message on the mobile equipment where the application to be tested is located.
In the embodiment of the application, when an abnormal event is detected in the process of executing the test operation, a test abnormal message is displayed on the mobile device where the application to be tested is located. The test exception message may be displayed on the mobile device in the form of a pop-up window message or played in the form of a sound.
In the embodiment of the application, if the operation and maintenance personnel detect the abnormal test message in the test site where the mobile device is located, the abnormal test message can be directly displayed on the mobile device without sending messages to other devices, and the feedback is timely and efficient.
In another embodiment of the present application, the S203 may include the following steps:
step one, displaying a UI interface, wherein the UI interface comprises at least one button, and each button corresponds to one test case.
In the embodiment of the application, a UI (user interface) can be preset, the UI comprises at least one button, each button corresponds to one test case, and the UI is displayed before testing.
And step two, detecting whether a click operation is received on any button.
In the embodiment of the application, whether a user selects a test case is judged by detecting whether a click operation is received on any button.
And step three, if the fact that the clicking operation is received on any button is detected, determining the test case corresponding to the clicked button as the test case selected by the user.
In the embodiment of the application, if it is detected that a click operation is received on any button, it is determined that a user selects a test case, and it is determined that the test case corresponding to the clicked button is the test case selected by the user.
According to the scheme, the user can click the button on the UI interface to select the test case corresponding to the button, and the user can conveniently select the test case by displaying the UI interface.
In the embodiment of the application, the APK is installed on the mobile device where the application to be tested is located, the operation environment operation that can provide based on the mobile device, therefore, when the application to be tested is tested by utilizing the APK, the test environment is changed into the mobile end from the PC end, the physical connection of the mobile end and the PC end is changed into the data connection of the mobile end, the PC end does not need to be connected during the test, therefore, during the test application, the plugging and pulling are not needed, the connection operation is reduced, the interactive operation in the test process is reduced, a test link is omitted, the connector of the mobile device cannot be damaged, and the test cost is reduced.
Based on the same technical concept, an application testing apparatus is further provided in the embodiments of the present application, as shown in fig. 3, the apparatus includes:
an obtaining module 301, configured to obtain a test case selected by a user, where the test case is used to instruct an application to be tested to perform a test operation corresponding to the test case;
a determining module 302, configured to determine a target APK corresponding to a preset test case based on a corresponding relationship between the test case and the APK, where the target APK is pre-installed on a mobile device where the application to be tested is located, and the target APK is used to execute a test operation corresponding to the test case according to an instruction of the test case;
an executing module 303, configured to execute, by using the target APK, a test operation corresponding to the test case on the application to be tested.
Optionally, the application to be tested includes at least one element to be tested, and the target APK includes: the test system comprises an identification field of an element to be tested and test operation information of at least one element to be tested;
the execution module includes:
the element to be tested searching module is used for searching an element to be tested corresponding to the identification field in the target APK in the application to be tested;
and the element to be tested testing module is used for testing the element to be tested according to the testing operation information.
Optionally, the test operation information includes a test frequency and/or a test duration corresponding to the element to be tested, and an execution action;
the element to be tested test module comprises:
and the testing submodule is used for executing the execution action corresponding to the element to be tested on the element to be tested according to the testing times and/or the testing duration corresponding to the element to be tested.
Optionally, the apparatus further comprises:
the judging module is used for judging whether an abnormal event is detected in the process of executing the test operation;
the recording module is used for recording a test result obtained by executing the test operation if no abnormal event is detected in the process of executing the test operation;
and the feedback module is used for feeding back the test abnormal message by using a preset mode if the abnormal event is detected in the process of executing the test operation.
Optionally, the feedback module includes:
the communication information acquisition module is used for acquiring preset communication information of operation and maintenance personnel for receiving the test abnormal message;
and the sending module is used for sending the test abnormal message to the operation and maintenance personnel according to the communication information.
Optionally, the feedback module includes:
and the display module is used for displaying the test abnormal message on the mobile equipment where the application to be tested is located.
Optionally, the apparatus further comprises:
the UI interface display module is used for displaying a UI interface, the UI interface comprises at least one button, and each button corresponds to one test case;
the detection module is used for detecting whether click operation is received on any button;
and the determining module is used for determining that the test case corresponding to the clicked button is the test case selected by the user if the fact that the clicking operation is received on any button is detected.
In the embodiment of the application, the APK is installed on the mobile device where the application to be tested is located, the operation environment operation that can provide based on the mobile device, therefore, when the application to be tested is tested by utilizing the APK, the test environment is changed into the mobile end from the PC end, the physical connection of the mobile end and the PC end is changed into the data connection of the mobile end, the PC end does not need to be connected during the test, therefore, during the test application, the plugging and pulling are not needed, the connection operation is reduced, the interactive operation in the test process is reduced, a test link is omitted, the connector of the mobile device cannot be damaged, and the test cost is reduced.
As shown in fig. 4, the embodiment of the present application provides an electronic device, which includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, where the processor 111, the communication interface 112, and the memory 113 complete mutual communication through the communication bus 114,
a memory 113 for storing a computer program;
in an embodiment of the present application, when the processor 111 is configured to execute the program stored in the memory 113, the method for testing an application provided in any one of the foregoing method embodiments includes:
the method comprises the steps of obtaining a test case selected by a user, wherein the test case is used for indicating to-be-tested application to carry out test operation corresponding to the test case;
determining a target APK corresponding to a test case based on a preset corresponding relation between the test case and the APK, wherein the target APK is pre-installed on a mobile device where the application to be tested is located, and the target APK is used for executing test operation corresponding to the test case according to the indication of the test case;
and executing the test operation corresponding to the test case on the application to be tested by utilizing the target APK.
Optionally, the application to be tested includes at least one element to be tested, and the target APK includes: the test system comprises an identification field of an element to be tested and test operation information of at least one element to be tested;
the executing, by using the target APK, the test operation corresponding to the test case on the application to be tested includes:
searching an element to be tested corresponding to the identification field in the target APK in the application to be tested;
and testing the elements to be tested according to the test operation information.
Optionally, the test operation information includes a test frequency and/or a test duration corresponding to the element to be tested, and an execution action;
the testing the element to be tested according to the testing operation information comprises the following steps:
and executing the executing action corresponding to the element to be tested according to the testing times and/or the testing duration corresponding to the element to be tested.
Optionally, the method further includes:
judging whether an abnormal event is detected in the process of executing the test operation;
if no abnormal event is detected in the process of executing the test operation, recording a test result obtained by executing the test operation;
if an abnormal event is detected in the process of executing the test operation, a preset mode is used for feeding back a test abnormal message.
Optionally, the feeding back the test exception message by using the preset mode includes:
acquiring preset communication information of operation and maintenance personnel for receiving the test abnormal message;
and sending the test abnormal message to the operation and maintenance personnel according to the communication information.
Optionally, the feeding back the test exception message by using the preset mode includes:
and displaying the test exception message on the mobile equipment where the application to be tested is located.
Optionally, the method further includes:
displaying a UI interface, wherein the UI interface comprises at least one button, and each button corresponds to one test case;
detecting whether a click operation is received on any button;
and if the fact that the clicking operation is received on any button is detected, determining that the test case corresponding to the clicked button is the test case selected by the user.
The present application also provides a computer readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the application testing method provided in any one of the foregoing method embodiments.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An application testing method, the method comprising:
the method comprises the steps of obtaining a test case selected by a user, wherein the test case is used for indicating to-be-tested application to carry out test operation corresponding to the test case;
determining a target APK corresponding to a test case based on a preset corresponding relation between the test case and the APK, wherein the target APK is pre-installed on a mobile device where the application to be tested is located, and the target APK is used for executing test operation corresponding to the test case according to the indication of the test case;
and executing the test operation corresponding to the test case on the application to be tested by utilizing the target APK.
2. The method of claim 1, wherein the application to be tested comprises at least one element to be tested, and the target APK comprises: the test system comprises an identification field of an element to be tested and test operation information of at least one element to be tested;
the executing, by using the target APK, the test operation corresponding to the test case on the application to be tested includes:
searching an element to be tested corresponding to the identification field in the target APK in the application to be tested;
and testing the elements to be tested according to the test operation information.
3. The method of claim 2, wherein the test operation information includes a test number and/or a test duration corresponding to an element to be tested, and an execution action;
the testing the element to be tested according to the testing operation information comprises the following steps:
and executing the executing action corresponding to the element to be tested according to the testing times and/or the testing duration corresponding to the element to be tested.
4. The method of claim 1, further comprising:
judging whether an abnormal event is detected in the process of executing the test operation;
if no abnormal event is detected in the process of executing the test operation, recording a test result obtained by executing the test operation;
if an abnormal event is detected in the process of executing the test operation, a preset mode is used for feeding back a test abnormal message.
5. The method according to claim 4, wherein the feeding back the test exception message by using the preset mode comprises:
acquiring preset communication information of operation and maintenance personnel for receiving the test abnormal message;
and sending the test abnormal message to the operation and maintenance personnel according to the communication information.
6. The method according to claim 4, wherein the feeding back the test exception message by using the preset mode comprises:
and displaying the test exception message on the mobile equipment where the application to be tested is located.
7. The method of claim 1, further comprising:
displaying a UI interface, wherein the UI interface comprises at least one button, and each button corresponds to one test case;
detecting whether a click operation is received on any button;
and if the fact that the clicking operation is received on any button is detected, determining that the test case corresponding to the clicked button is the test case selected by the user.
8. An application testing apparatus, the apparatus comprising:
the system comprises an acquisition module, a test case generation module and a test execution module, wherein the acquisition module is used for acquiring a test case selected by a user, and the test case is used for indicating to carry out test operation corresponding to the test case on an application to be tested;
the determining module is used for determining a target APK corresponding to a test case based on a preset corresponding relation between the test case and the APK, the target APK is pre-installed on the mobile equipment where the application to be tested is located, and the target APK is used for executing test operation corresponding to the test case according to the indication of the test case;
and the execution module is used for executing the test operation corresponding to the test case on the application to be tested by utilizing the target APK.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the application testing method of any one of claims 1 to 7 when executing a program stored on a memory.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the application testing method according to any one of claims 1 to 7.
CN202110335257.2A 2021-03-29 2021-03-29 Application testing method and device, electronic equipment and storage medium Pending CN112948259A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110335257.2A CN112948259A (en) 2021-03-29 2021-03-29 Application testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110335257.2A CN112948259A (en) 2021-03-29 2021-03-29 Application testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112948259A true CN112948259A (en) 2021-06-11

Family

ID=76227317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110335257.2A Pending CN112948259A (en) 2021-03-29 2021-03-29 Application testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112948259A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377671A (en) * 2021-06-29 2021-09-10 山东派盟网络科技有限公司 Group control method, device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102949A (en) * 2017-06-30 2017-08-29 上海木爷机器人技术有限公司 Application program off-line test method and instrument
CN110851362A (en) * 2019-11-11 2020-02-28 龙尚科技(上海)有限公司 Communication module testing method, system, equipment and storage medium
CN111352844A (en) * 2020-03-04 2020-06-30 腾讯科技(深圳)有限公司 Test method and related device
CN111897740A (en) * 2020-08-24 2020-11-06 北京字节跳动网络技术有限公司 User interface testing method and device, electronic equipment and computer readable medium
US20210056012A1 (en) * 2019-08-23 2021-02-25 Jpmorgan Chase Bank, N.A. System and method for implementing a test optimization module
CN112416747A (en) * 2020-01-21 2021-02-26 上海哔哩哔哩科技有限公司 Test case execution method, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102949A (en) * 2017-06-30 2017-08-29 上海木爷机器人技术有限公司 Application program off-line test method and instrument
US20210056012A1 (en) * 2019-08-23 2021-02-25 Jpmorgan Chase Bank, N.A. System and method for implementing a test optimization module
CN110851362A (en) * 2019-11-11 2020-02-28 龙尚科技(上海)有限公司 Communication module testing method, system, equipment and storage medium
CN112416747A (en) * 2020-01-21 2021-02-26 上海哔哩哔哩科技有限公司 Test case execution method, device, equipment and medium
CN111352844A (en) * 2020-03-04 2020-06-30 腾讯科技(深圳)有限公司 Test method and related device
CN111897740A (en) * 2020-08-24 2020-11-06 北京字节跳动网络技术有限公司 User interface testing method and device, electronic equipment and computer readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王栋 等: "《航天型号可编程逻辑器件软件工程》", 中国宇航出版社, pages: 269 - 272 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377671A (en) * 2021-06-29 2021-09-10 山东派盟网络科技有限公司 Group control method, device and equipment

Similar Documents

Publication Publication Date Title
CN110708346B (en) Information processing system and method
CN107273297B (en) Method and device for generating test cases
CN112148887A (en) Equipment fault diagnosis method and device, storage medium and electronic equipment
CN111104315A (en) Test script generation method and device and computer readable storage medium
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN111143150A (en) Method and system for testing PCBA (printed circuit board assembly), testing equipment and micro-control unit
CN108009085B (en) Channel package testing method
CN110806965A (en) Automatic test method, device, equipment and medium
CN110889116B (en) Advertisement interception method and device and electronic equipment
CN112115051A (en) Page traversal detection method, device and equipment for application and readable storage medium
CN107967207B (en) Method and device for testing user interface interaction function
CN109800119A (en) A kind of product function test method and device
CN108519935B (en) Board card testing method and device, readable storage medium and computer equipment
CN112882933A (en) Script recording method, device, equipment and storage medium
CN112948259A (en) Application testing method and device, electronic equipment and storage medium
CN104320793A (en) Mobile phone short message automated test method and system
CN112543478B (en) WiFi module automatic test method and device, computer equipment and storage medium
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
CN110674045B (en) Information tracking detection method and device, electronic equipment and storage medium
CN112817883A (en) Method, device and system for adapting interface platform and computer readable storage medium
CN112583617A (en) Fault determination method, server, control terminal and storage medium
CN103998712A (en) Systems and methods to facilitate a request for oilfield services using a data transfer protocol
CN109522174A (en) Control adb enabled method, apparatus, terminal and storage medium
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN111274143B (en) Buried point test method, buried point test device, buried point test equipment and storage medium

Legal Events

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