CN113138925A - Function test method and device of application program, computer equipment and storage medium - Google Patents
Function test method and device of application program, computer equipment and storage medium Download PDFInfo
- Publication number
- CN113138925A CN113138925A CN202110442584.8A CN202110442584A CN113138925A CN 113138925 A CN113138925 A CN 113138925A CN 202110442584 A CN202110442584 A CN 202110442584A CN 113138925 A CN113138925 A CN 113138925A
- Authority
- CN
- China
- Prior art keywords
- test
- application program
- operation instruction
- preset operation
- tested
- 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
Links
- 238000010998 test method Methods 0.000 title description 6
- 238000012360 testing method Methods 0.000 claims abstract description 265
- 238000000034 method Methods 0.000 claims abstract description 40
- 230000006870 function Effects 0.000 claims description 109
- 238000004590 computer program Methods 0.000 claims description 29
- 238000010586 diagram Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003252 repetitive effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 241000282693 Cercopithecidae Species 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000011990 functional testing Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
- G06F11/3612—Software analysis for verifying properties of programs by runtime analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (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 provides a method and a device for testing the function of an application program, a computer device and a storage medium, wherein the method comprises the following steps: acquiring test information of an application program to be tested; the test information comprises position coordinates of the target control on the page of the application program to be tested and a preset operation instruction for realizing the application function of the target control; then, controlling the execution of a preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data. According to the application program testing method and device, repeated testing operation is automatically executed on the application program to be tested through the computing device, manual intervention is not needed, the testing result can be automatically obtained, and the method and device are rapid and accurate.
Description
Technical Field
The invention relates to the field of terminals, in particular to a method and a device for testing functions of an application program, computer equipment and a storage medium.
Background
With the continuous update of new technologies, various applications can be run on the intelligent terminal, so that the functions of the intelligent terminal are gradually diversified, and with the increase of the number of the applications, the potential abnormal problems of the intelligent terminal are increased, so that testers need to measure the applications in time and feed the measured applications back to developers for solution.
At present, a common test mode is to let a tester manually and repeatedly perform specific operations on some application programs, for example, taking testing a camera function of a mobile phone as an example, the tester needs to repeatedly perform a photographing operation for many times or repeatedly switch a camera mode for many times to test the camera function, and such a test mode makes a test task of the tester heavy and needs to perform many repetitive and tedious test operations.
Disclosure of Invention
The object of the present invention includes, for example, providing a method, apparatus, device, system, and storage medium for functional testing of an application program, which can alleviate the task of testing by a tester and prevent the tester from performing many repetitive and tedious testing operations.
The embodiment of the application provides a function testing method of an application program, which comprises the following steps:
acquiring test information of an application program to be tested; the test information comprises position coordinates of a target control on a page of an application program to be tested and a preset operation instruction for realizing an application function of the target control;
controlling the execution of the preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction;
and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data.
In one embodiment, obtaining test information of an application under test includes:
displaying a control interface; the control interface is provided with a function selection area and a test frequency configuration area corresponding to the application program to be tested;
responding to the operation aiming at the function selection area, and determining the target control corresponding to the selected function;
responding to the operation of configuring the area aiming at the test times, and determining the preset test times;
and generating the test information according to the position coordinate corresponding to the target control, the preset operation instruction and the preset test times.
In one embodiment, controlling the execution of the preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction includes:
responding to the operation aiming at the test starting identifier in the control interface, controlling the execution of the preset operation instruction at the position coordinate, and collecting the test data corresponding to the execution of the preset operation instruction.
In one embodiment, before obtaining the test information of the application program to be tested, the method further includes:
carrying out control analysis on the page of the application program to be tested to generate an information set corresponding to each control; the information set comprises the position coordinates and the application functions of each control;
and configuring the preset operation instruction for each control according to the application function.
In one embodiment, the method further comprises:
acquiring a device identifier of a tested terminal;
and generating a control interface corresponding to the tested terminal according to the equipment identifier.
In one embodiment, the control interface further includes a terminal selection area, and acquiring a device identifier of the target device under test includes:
and responding to the operation of one equipment identifier in the terminal selection area, and generating the control interface of the tested terminal corresponding to the equipment identifier.
The embodiment of the application provides a function testing device of an application program, which comprises:
the acquisition module is used for acquiring the test information of the application program to be tested; the test information comprises position coordinates of a target control on a page of an application program to be tested and a preset operation instruction for realizing an application function of the target control;
the test module is used for controlling the execution of the preset operation instruction at the position coordinate and acquiring test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data.
In one embodiment, the obtaining module is specifically configured to:
displaying a control interface; the control interface is provided with a function selection area and a test frequency configuration area corresponding to the application program to be tested;
responding to the operation aiming at the function selection area, and determining the target control corresponding to the selected function;
responding to the operation of configuring the area aiming at the test times, and determining the preset test times;
and generating the test information according to the position coordinate corresponding to the target control, the preset operation instruction and the preset test times.
The embodiment of the application provides computer equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the steps of the function test method of the application program provided by any embodiment of the application.
The embodiment of the application provides a storage medium, on which a computer program is stored, and the computer program realizes the steps of the function testing method of the application program provided in any embodiment of the application program when being executed by a processor.
According to the method, the device, the computer equipment and the storage medium for testing the functions of the application program, the test information of the application program to be tested is firstly acquired; the test information comprises position coordinates of a target control on a page of an application program to be tested and a preset operation instruction for realizing an application function of the target control; then controlling the execution of the preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data. The difference from the prior art is that the prior art enables a tester to manually and repeatedly perform specific operations on some application programs, and the testing mode makes the testing task of the tester aggravated and needs to perform a plurality of repeated and boring testing operations. According to the application, manual operation is corresponding to the program command in the computing equipment, repeated testing operation is automatically executed on the application program to be tested through the computing equipment, manual intervention is not needed, the testing result can be automatically obtained, and the method is rapid and accurate.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a diagram illustrating an exemplary scenario of a method for functional testing of an application;
FIG. 2 is a flowchart illustrating a method for functional testing of an application program according to an embodiment;
FIG. 3 is a flowchart illustrating an implementation of step S23 in one embodiment;
FIG. 4 is a schematic illustration of a control interface in one embodiment;
FIG. 5 is a flowchart illustrating a method for testing the functionality of an application according to another embodiment;
FIG. 6 is a flowchart illustrating step S23 according to another embodiment;
FIG. 7 is a schematic view of a control interface in another embodiment;
FIG. 8 is a block diagram showing a functional test apparatus for an application program according to an embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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 invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. indicate an orientation or a positional relationship based on that shown in the drawings or that the product of the present invention is used as it is, this is only for convenience of description and simplification of the description, and it does not indicate or imply that the device or the element referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present invention.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
With the continuous update of new technologies, users have more and more requirements on intelligent terminals, and the functions of the intelligent terminals are more and more powerful, for example, for camera applications of smart phones, not only are night view functions and slow motion functions equipped, but also the number of cameras is increased from the original one to the existing ones, and meanwhile, specific functions such as wide angle, depth of field, micro distance and the like are also equipped for the cameras, so that the multifunctional intelligent terminals meet the diversified requirements of the users.
However, as the functions of the intelligent terminal are diversified, the development of the intelligent terminal is more and more complex, and the probability of the occurrence of an anomaly in the development process is higher and higher, so that a tester needs to perform a function test on each application program of the intelligent terminal at any time and feed back a test result to the developer, so that the tester can optimize the application program.
Currently, a common test mode is monkey test for a class of systems (e.g., android system), which is to perform a test event continuously, run each function of an application program randomly, test the stability of the application program initially, and then manually and repeatedly perform a specific operation on some application programs by a tester, for example, taking the test of a camera function of a mobile phone as an example, the tester needs to perform a photographing operation repeatedly for many times or switch a camera mode repeatedly for many times to test the camera function, and this test mode makes the test task of the tester heavy and tedious and many repeated test operations.
In order to solve the above technical problem, the present invention provides a method for testing functions of an application program, which may be applied to an application environment shown in fig. 1, referring to fig. 1, where fig. 1 is an application scenario diagram of a method for testing functions of an application program in an embodiment, and the application environment may include a terminal 11 and a computer device 12. The terminal 11 and the computer device 12 may be connected by a data line. Acquiring test information of any application program to be tested in the terminal 120 through the computer device 12; and outputting a preset operation instruction of preset test times according to the position coordinates of the target control contained in the test information on the page of the application program to be tested, and finally generating a test result according to the acquired data. The terminal 11 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
In an embodiment, as shown in fig. 2, fig. 2 is a schematic flow chart of a method for testing functions of an application program in an embodiment, and this embodiment is mainly illustrated by applying the method to the computer device 12 in fig. 1, where the method includes:
and S23, acquiring the test information of the application program to be tested.
The test information may include a position coordinate of the target control on an interface (or a page) of the application program to be tested and a preset operation instruction for the target control to implement the application function. For example, the application program to be tested may be a camera application, a video application, a game application, and the like, the target control may be a button, a pull-down menu, a pull-down frame, and the like on an interface (or a page) where the terminal runs the application program to be tested, the position coordinates may be positions of control elements such as the button, the pull-down menu, the pull-down frame, and the like on the page, and the specific application function may be implemented by controlling the target control to perform an operation, for example, taking the camera application as an example, the target control may be a photographing button, a video recording identifier, and the position coordinates may be coordinates of the photographing button, for example, a position located in the middle of the bottom end of the page.
In some possible implementation manners, after the computer device 12 is connected to the terminal 11 to be tested, the computer device 12 may identify a control element of the mobile phone camera interface by using a preset data processing library, and acquire information of a target control as test information. For example, the uiautomator2 library of python, acquires control information by identifying control elements on the interface of the camera application using the control grabbing function of the uiautomator 2.
And S24, controlling the execution of the preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction.
The preset operation instruction may be an operation instruction predefined by a user according to an application function implemented by each control. For example, two operation actions of "slide" and "click" may be defined to implement the touch screen function, and the touch screen operation of a human hand is simulated through the two operation actions, for example, to implement the video recording function, a preset operation instruction is defined as "slide 1 times left + click", and then, for example, the camera application implements the photographing function, and a preset operation instruction corresponding to the photographing key is defined as "click", so that after the position coordinate of the photographing key is obtained, a command of clicking the screen is continuously output at the position coordinate point, and the purpose of continuously photographing is achieved.
In some possible implementation manners, after the computer device 12 obtains the test information, according to a preset operation instruction corresponding to the target control in the test information, the preset operation instruction is executed at the position coordinate of the target control, and test data after the instruction is executed each time is collected.
And S25, when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data.
It can be understood that, after the computer device 12 determines that the number of times of executing the preset operation instruction reaches the preset test number, the output of the preset operation instruction is stopped, at this time, it indicates that multiple test sample data have been collected, a test result can be generated according to the test data, for example, a test photographing function is tested, the preset test number is 30 times, after the computer device 12 acquires the position coordinates of the photographing key, a command of clicking the screen by the position coordinates is continuously output, and when a command of clicking the screen by 30 times is output, the command is equivalent to automatically repeatedly photographing 30 images, so that the purpose of avoiding that a tester needs to perform many repeated and tedious test operations is achieved.
In one embodiment, an implementation flowchart of obtaining test information of an application to be tested is given below, referring to fig. 3, fig. 3 is a flowchart illustrating an implementation manner of step S23 in an embodiment, and step S23 may include:
and S232, displaying a control interface.
The computer device 12 may use the tkater library of python to create a control interface in the computer device 12 for the tester to use and issue commands for testing functions. Referring to fig. 4, fig. 4 is a schematic diagram of a control interface in an embodiment, where the control interface has a function selection area and a test frequency configuration area corresponding to an application program to be tested, and further includes a start identifier for starting a test procedure, where the function selection area may include options of each basic operation of the application program to be tested, such as a photographing function, a mode switching function, and a video recording function. The tester can select any at least one function in the function selection area, the computer device 12 can execute a test flow of the function according to the selection of the tester, the test frequency configuration area can set the frequency of specified operation, and the tester can enable the computer device to obtain the test frequency through input modes such as manual input and voice input.
And S233, responding to the operation aiming at the function selection area, and determining the target control corresponding to the selected function.
For example, with reference to fig. 4, when the tester performs a selection operation in the function selection area of the control interface, for example, selects the identifier corresponding to the function 2 by touching or clicking, and the computer device 12 receives the operation instruction, determines the target control corresponding to the selected function, for example, selects the photographing function, and then the target control corresponding to the photographing function is the photographing key.
And S234, responding to the operation of configuring the area according to the test times, and determining the preset test times.
For example, with continued reference to fig. 4, a tester may enter a number in a test times configuration area of the control interface, or a voice processing module may be configured in the test times configuration area, and the tester may make the voice processing module of the computer device 12 obtain the test number by speaking the number into the test times configuration area.
And S235, generating test information according to the position coordinate corresponding to the target control, the preset operation instruction and the preset test times.
In one embodiment, in combination with the schematic diagram of the control interface shown in fig. 4, an implementation manner of step S23 is given below, that is, in response to an operation on a test start identifier in the control interface, the preset operation instruction is controlled to be executed at the position coordinate, and test data corresponding to the execution of the preset operation instruction is collected.
In one embodiment, before obtaining the test information of the application program to be tested, a preset operation instruction corresponding to each function may be executed for the application program to be tested in advance, an implementation manner is given below, referring to fig. 5, where fig. 5 is a schematic flow diagram of a function testing method of the application program in another embodiment, and the method further includes:
and S21, performing control analysis on the page of the application program to be tested, and generating an information set corresponding to each control.
The information set includes the position coordinates and the application function of each control.
And S22, configuring a preset operation instruction for each control according to the application function.
For example, to implement the video recording function, the preset operation instruction is defined as "slide left 1 times + click", and for example, to implement the photographing function, the preset operation instruction corresponding to the photographing key is defined as "click", and the like. It should be noted that the preset operation instruction configured as above is consistent with the user manually operating the control to implement a certain function, and the purpose of the preset operation instruction is to convert the manual operation into the automatic operation.
In one embodiment, the method may further implement a function of testing multiple terminals simultaneously, please refer to fig. 6, where fig. 6 is a schematic flow chart of step S23 in another embodiment, and the method further includes:
and S230, acquiring the equipment identification of the tested terminal.
And S231, generating a control interface corresponding to the tested terminal according to the equipment identifier.
In one embodiment, in combination with the schematic diagram of the control interface shown in fig. 4, an implementation manner of step S203 is given below, that is, in response to an operation on one of the device identifiers in the terminal selection area, the control interface of the tested terminal corresponding to the device identifier is generated, so that an effect of simultaneously testing multiple terminals is achieved.
For convenience of understanding, please refer to fig. 7, fig. 7 is a schematic diagram of a control interface in another embodiment, where "AAAA", "BBBB", and "CCCC" respectively correspond to device identifiers of a terminal, and the device identifiers may be a serial number, a model, an MAC address, and the like of the terminal, as can be seen from fig. 7, the control interface may further include a terminal selection area, a tester may select any one of the terminal identifiers in the terminal selection area of the control interface, and the computer device 12 may implement a test procedure on the selected terminal after receiving a selection operation instruction, thereby achieving an effect of simultaneously testing a plurality of terminals.
In the method for testing the function of the application program, provided by the embodiment of the invention, the test information of the application program to be tested is firstly acquired; the test information comprises position coordinates of a target control on a page of an application program to be tested and a preset operation instruction for realizing an application function of the target control; then controlling the execution of the preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data. The difference from the prior art is that the prior art enables a tester to manually and repeatedly perform specific operations on some application programs, and the testing mode makes the testing task of the tester aggravated and needs to perform a plurality of repeated and boring testing operations. According to the application, manual operation is corresponding to the program command in the computing equipment, repeated testing operation is automatically executed on the application program to be tested through the computing equipment, manual intervention is not needed, the testing result can be automatically obtained, and the method is rapid and accurate.
It should be understood that although the various steps in the flow charts of fig. 2-7 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. 2-7 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.
In an embodiment, as shown in fig. 8, fig. 8 is a block diagram of a functional testing apparatus of an application program in an embodiment, and an embodiment of the present invention further provides a functional testing apparatus 30 of an application program, including: an acquisition module 31 and a test module 32.
An obtaining module 31, configured to obtain test information of an application program to be tested; the test information comprises position coordinates of a target control on a page of an application program to be tested and a preset operation instruction for realizing an application function of the target control;
the test module 32 is configured to control the execution of the preset operation instruction at the position coordinate, and acquire test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data.
In one embodiment, the obtaining module 31 is specifically configured to: displaying a control interface; the control interface is provided with a function selection area and a test frequency configuration area corresponding to the application program to be tested; responding to the operation aiming at the function selection area, and determining the target control corresponding to the selected function; responding to the operation of configuring the area aiming at the test times, and determining the preset test times; and generating the test information according to the position coordinate corresponding to the target control, the preset operation instruction and the preset test times.
In one embodiment, the test module 32 is specifically configured to: responding to the operation aiming at the test starting identifier in the control interface, controlling the execution of the preset operation instruction at the position coordinate, and collecting the test data corresponding to the execution of the preset operation instruction.
In one embodiment, the function testing apparatus 30 of the application program may further include an analysis module and a configuration module, where the analysis module is configured to perform control analysis on the page of the application program to be tested, and generate an information set corresponding to each control; the information set comprises the position coordinates and the application functions of each control; and the configuration module is used for configuring the preset operation instruction for each control according to the application function.
In one embodiment, the function testing apparatus 30 of the application program may further include a generating module, an obtaining module 31, and further configured to obtain the device identifier of the terminal to be tested; and the generating module is used for generating a control interface corresponding to the tested terminal according to the equipment identifier.
In one embodiment, the test module 32 is further specifically configured to: and responding to the operation of one equipment identifier in the terminal selection area, and generating the control interface of the tested terminal corresponding to the equipment identifier.
In the function testing device for an application program provided by the embodiment of the invention, the acquisition module is used for acquiring the test information of the application program to be tested; the test information comprises position coordinates of the target control on the page of the application program to be tested and a preset operation instruction for realizing the application function of the target control; the test module is used for controlling the execution of the preset operation instruction at the position coordinate and acquiring test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data. The difference from the prior art is that the prior art enables a tester to manually and repeatedly perform specific operations on some application programs, and the testing mode makes the testing task of the tester aggravated and needs to perform a plurality of repeated and boring testing operations. According to the application, manual operation is corresponding to the program command in the computing equipment, repeated testing operation is automatically executed on the application program to be tested through the computing equipment, manual intervention is not needed, the testing result can be automatically obtained, and the method is rapid and accurate.
For the specific definition of the functional testing device 30 of the application program, reference may be made to the above definition of the functional testing device method of the application program, and details are not described herein again. The respective modules in the functional testing device 30 of the application program can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device 12 is provided, please refer to fig. 9, and fig. 9 is an internal structure diagram of the computer device in one embodiment. The computer device 12 includes a memory 121, a processor 122, and a communication interface 123. The memory 121, processor 122 and communication interface 123 are electrically connected to each other directly or indirectly to enable data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 121 is used to store programs or data. The memory may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an erasable read only memory (EPROM), an electrically erasable read only memory (EEPROM), and the like. The memory 121 provides an environment for the operating system and the computer program in the nonvolatile storage medium to run. The computer program is executed by the processor 122 to implement any of the methods for testing the functionality of an application. The display screen of the computer device 13 may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device 13 may be a touch layer covered on the display screen, a key, a trackball or a touch pad arranged on a casing of the computer device, or an external keyboard, a touch pad or a mouse, etc.
The processor 122 is used to read/write data or programs stored in the memory and to provide computing and control capabilities.
The communication interface 123 is used for establishing a communication connection between the server and another communication terminal via the network, and for transceiving data via the network. Specifically, the communication interface of the computer device 12 is used for performing wired or wireless communication with an external terminal, and the wireless communication may be implemented through WIFI, an operator network, Near Field Communication (NFC), or other technologies.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It will be appreciated that in one embodiment, the invention provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring test information of an application program to be tested; the test information comprises position coordinates of the target control on the page of the application program to be tested and a preset operation instruction for realizing the application function of the target control;
controlling the execution of a preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction;
and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: displaying a control interface; the control interface is provided with a function selection area and a test frequency configuration area corresponding to the application program to be tested; responding to the operation aiming at the function selection area, and determining a target control corresponding to the selected function; responding to the operation of configuring the area aiming at the test times, and determining the preset test times; and generating test information according to the position coordinate corresponding to the target control, the preset operation instruction and the preset test times.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and responding to the operation aiming at the test starting identifier in the control interface, controlling the execution of the preset operation instruction at the position coordinate, and collecting the test data corresponding to the execution of the preset operation instruction.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of carrying out control analysis on a page of an application program to be tested to generate an information set corresponding to each control; the information set comprises the position coordinates and the application functions of each control; and configuring a preset operation instruction for each control according to the application function.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a device identifier of a tested terminal; and generating a control interface corresponding to the tested terminal according to the equipment identifier.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and responding to the operation aiming at one equipment identifier in the terminal selection area, and generating a control interface of the tested terminal corresponding to the equipment identifier.
The computer equipment provided by the embodiment of the invention is used for acquiring the test information of the application program to be tested; the test information comprises position coordinates of the target control on the page of the application program to be tested and a preset operation instruction for realizing the application function of the target control; the test data acquisition module is also used for controlling the execution of the preset operation instruction at the position coordinate and acquiring the test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data. The difference from the prior art is that the prior art enables a tester to manually and repeatedly perform specific operations on some application programs, and the testing mode makes the testing task of the tester aggravated and needs to perform a plurality of repeated and boring testing operations. According to the application, manual operation is corresponding to the program command in the computing equipment, repeated testing operation is automatically executed on the application program to be tested through the computing equipment, manual intervention is not needed, the testing result can be automatically obtained, and the method is rapid and accurate.
In one embodiment, the function testing apparatus 30 of the application program provided in the present application may be implemented in a form of a computer program, and the computer program may be run on a computer device as shown in fig. 9. The memory of the computer device may store various program modules constituting the function testing apparatus 30 of the application program, such as the acquisition module and the testing module shown in fig. 8. The computer program constituted by the respective program modules causes the processor to execute the steps in the function test method of the application program of the respective embodiments of the present application described in the present specification.
In one embodiment, the present invention further provides a storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the following steps: acquiring test information of an application program to be tested; the test information comprises position coordinates of the target control on the page of the application program to be tested and a preset operation instruction for realizing the application function of the target control; controlling the execution of a preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data.
In one embodiment, the computer program when executed by the processor further performs the steps of: displaying a control interface; the control interface is provided with a function selection area and a test frequency configuration area corresponding to the application program to be tested; responding to the operation aiming at the function selection area, and determining a target control corresponding to the selected function; responding to the operation of configuring the area aiming at the test times, and determining the preset test times; and generating test information according to the position coordinate corresponding to the target control, the preset operation instruction and the preset test times.
In one embodiment, the computer program when executed by the processor further performs the steps of: and responding to the operation aiming at the test starting identifier in the control interface, controlling the execution of the preset operation instruction at the position coordinate, and collecting the test data corresponding to the execution of the preset operation instruction.
In one embodiment, the computer program when executed by the processor further performs the steps of: the method comprises the steps of carrying out control analysis on a page of an application program to be tested to generate an information set corresponding to each control; the information set comprises the position coordinates and the application functions of each control; and configuring a preset operation instruction for each control according to the application function.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a device identifier of a tested terminal; and generating a control interface corresponding to the tested terminal according to the equipment identifier.
In one embodiment, the computer program when executed by the processor further performs the steps of: and responding to the operation aiming at one equipment identifier in the terminal selection area, and generating a control interface of the tested terminal corresponding to the equipment identifier.
An embodiment of the present invention provides a storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement: acquiring test information of an application program to be tested; the test information comprises position coordinates of the target control on the page of the application program to be tested and a preset operation instruction for realizing the application function of the target control; the test data acquisition module is also used for controlling the execution of the preset operation instruction at the position coordinate and acquiring the test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data. The difference from the prior art is that the prior art enables a tester to manually and repeatedly perform specific operations on some application programs, and the testing mode makes the testing task of the tester aggravated and needs to perform a plurality of repeated and boring testing operations. According to the application, manual operation is corresponding to the program command in the computing equipment, repeated testing operation is automatically executed on the application program to be tested through the computing equipment, manual intervention is not needed, the testing result can be automatically obtained, and the method is rapid and accurate.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A method for functional testing of an application, the method comprising:
acquiring test information of an application program to be tested; the test information comprises position coordinates of a target control on a page of an application program to be tested and a preset operation instruction for realizing an application function of the target control;
controlling the execution of the preset operation instruction at the position coordinate, and collecting test data corresponding to the execution of the preset operation instruction;
and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data.
2. The method for testing the functions of the application program according to claim 1, wherein the obtaining of the test information of the application program to be tested comprises:
displaying a control interface; the control interface is provided with a function selection area and a test frequency configuration area corresponding to the application program to be tested;
responding to the operation aiming at the function selection area, and determining the target control corresponding to the selected function;
responding to the operation of configuring the area aiming at the test times, and determining the preset test times;
and generating the test information according to the position coordinate corresponding to the target control, the preset operation instruction and the preset test times.
3. The method for testing the function of the application program according to claim 2, wherein the step of controlling the execution of the preset operation command at the position coordinate and collecting the test data corresponding to the execution of the preset operation command comprises:
responding to the operation aiming at the test starting identifier in the control interface, controlling the execution of the preset operation instruction at the position coordinate, and collecting the test data corresponding to the execution of the preset operation instruction.
4. The method for testing the functions of the application program according to claim 1, further comprising, before obtaining the test information of the application program to be tested:
carrying out control analysis on the page of the application program to be tested to generate an information set corresponding to each control; the information set comprises the position coordinates and the application functions of each control;
and configuring the preset operation instruction for each control according to the application function.
5. The method for testing the functionality of an application according to claim 2, further comprising:
acquiring a device identifier of a tested terminal;
and generating a control interface corresponding to the tested terminal according to the equipment identifier.
6. The method for testing the functions of the application program according to claim 5, wherein the control interface further comprises a terminal selection area for obtaining the device identifier of the target device under test, and the method comprises the following steps:
and responding to the operation of one equipment identifier in the terminal selection area, and generating the control interface of the tested terminal corresponding to the equipment identifier.
7. An apparatus for testing a function of an application program, comprising:
the acquisition module is used for acquiring the test information of the application program to be tested; the test information comprises position coordinates of a target control on a page of an application program to be tested and a preset operation instruction for realizing an application function of the target control;
the test module is used for controlling the execution of the preset operation instruction at the position coordinate and acquiring test data corresponding to the execution of the preset operation instruction; and when the execution times of the preset operation instruction are consistent with the preset test times, stopping executing the preset operation instruction, and generating a test result according to all the test data.
8. The device for testing the functionality of an application according to claim 7, wherein the obtaining module is specifically configured to:
displaying a control interface; the control interface is provided with a function selection area and a test frequency configuration area corresponding to the application program to be tested;
responding to the operation aiming at the function selection area, and determining the target control corresponding to the selected function;
responding to the operation of configuring the area aiming at the test times, and determining the preset test times;
and generating the test information according to the position coordinate corresponding to the target control, the preset operation instruction and the preset test times.
9. A computer device, comprising: comprising a processor and a memory, said memory storing a computer program executable by said processor, said processor being capable of executing said computer program to implement the method of functional testing of an application program as claimed in any one of claims 1 to 6.
10. A storage medium on which a computer program is stored, which computer program, when being executed by a processor, carries out a method for functional testing of an application program according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110442584.8A CN113138925A (en) | 2021-04-23 | 2021-04-23 | Function test method and device of application program, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110442584.8A CN113138925A (en) | 2021-04-23 | 2021-04-23 | Function test method and device of application program, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113138925A true CN113138925A (en) | 2021-07-20 |
Family
ID=76812459
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110442584.8A Pending CN113138925A (en) | 2021-04-23 | 2021-04-23 | Function test method and device of application program, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113138925A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113656322A (en) * | 2021-08-26 | 2021-11-16 | 阿里巴巴(中国)有限公司 | Data processing method and device, electronic equipment and computer storage medium |
CN113849356A (en) * | 2021-09-07 | 2021-12-28 | 深圳Tcl新技术有限公司 | Equipment testing method and device, electronic equipment and storage medium |
CN114036073A (en) * | 2022-01-07 | 2022-02-11 | 荣耀终端有限公司 | Test method and test device for terminal equipment |
CN114721968A (en) * | 2022-06-02 | 2022-07-08 | 龙旗电子(惠州)有限公司 | Test method, test device and storage medium |
CN114978360A (en) * | 2022-05-10 | 2022-08-30 | 紫光计算机科技有限公司 | Automatic testing method and device for communication equipment, electronic equipment and storage medium |
CN115357519A (en) * | 2022-10-20 | 2022-11-18 | 中科方德软件有限公司 | Test method, device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150339215A1 (en) * | 2013-07-02 | 2015-11-26 | Tencent Technology (Shenzhen) Company Limited | Systems and Methods for Testing Terminal Applications |
WO2017121400A1 (en) * | 2016-01-16 | 2017-07-20 | 平安科技(深圳)有限公司 | Method, system and device for testing and readable storage medium |
CN107357727A (en) * | 2017-07-04 | 2017-11-17 | 广州君海网络科技有限公司 | APP testing results method, apparatus, readable storage medium storing program for executing and computer equipment |
CN110879777A (en) * | 2019-10-12 | 2020-03-13 | 平安普惠企业管理有限公司 | Control testing method and device for application interface, computer equipment and storage medium |
CN111414309A (en) * | 2020-03-27 | 2020-07-14 | 武汉联影医疗科技有限公司 | Automatic test method of application program, computer equipment and storage medium |
-
2021
- 2021-04-23 CN CN202110442584.8A patent/CN113138925A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150339215A1 (en) * | 2013-07-02 | 2015-11-26 | Tencent Technology (Shenzhen) Company Limited | Systems and Methods for Testing Terminal Applications |
WO2017121400A1 (en) * | 2016-01-16 | 2017-07-20 | 平安科技(深圳)有限公司 | Method, system and device for testing and readable storage medium |
CN107357727A (en) * | 2017-07-04 | 2017-11-17 | 广州君海网络科技有限公司 | APP testing results method, apparatus, readable storage medium storing program for executing and computer equipment |
CN110879777A (en) * | 2019-10-12 | 2020-03-13 | 平安普惠企业管理有限公司 | Control testing method and device for application interface, computer equipment and storage medium |
CN111414309A (en) * | 2020-03-27 | 2020-07-14 | 武汉联影医疗科技有限公司 | Automatic test method of application program, computer equipment and storage medium |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113656322A (en) * | 2021-08-26 | 2021-11-16 | 阿里巴巴(中国)有限公司 | Data processing method and device, electronic equipment and computer storage medium |
CN113656322B (en) * | 2021-08-26 | 2023-10-10 | 阿里巴巴(中国)有限公司 | Data processing method, device, electronic equipment and computer storage medium |
CN113849356A (en) * | 2021-09-07 | 2021-12-28 | 深圳Tcl新技术有限公司 | Equipment testing method and device, electronic equipment and storage medium |
CN113849356B (en) * | 2021-09-07 | 2024-04-30 | 深圳Tcl新技术有限公司 | Equipment testing method and device, electronic equipment and storage medium |
CN114036073A (en) * | 2022-01-07 | 2022-02-11 | 荣耀终端有限公司 | Test method and test device for terminal equipment |
CN114978360A (en) * | 2022-05-10 | 2022-08-30 | 紫光计算机科技有限公司 | Automatic testing method and device for communication equipment, electronic equipment and storage medium |
CN114721968A (en) * | 2022-06-02 | 2022-07-08 | 龙旗电子(惠州)有限公司 | Test method, test device and storage medium |
CN115357519A (en) * | 2022-10-20 | 2022-11-18 | 中科方德软件有限公司 | Test method, device, equipment and medium |
CN115357519B (en) * | 2022-10-20 | 2022-12-16 | 中科方德软件有限公司 | Test method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113138925A (en) | Function test method and device of application program, computer equipment and storage medium | |
US10963131B2 (en) | Electronic device and method for displaying history of executed application thereof | |
CN108463832B (en) | Electronic device and process execution method based on hardware diagnosis result | |
CN108804302B (en) | Remote testing method, system and related equipment | |
CN107943683B (en) | Test script generation method and device, electronic equipment and storage medium | |
US9280451B2 (en) | Testing device | |
CN110168487B (en) | Touch control method and device | |
CN105117337B (en) | Using adjustment method, client and debugging platform | |
KR20190021141A (en) | Electronic device for controlling multi-window and method for operating thereof | |
CN106504777B (en) | A kind of processing method and mobile terminal of recording data | |
CN108463799B (en) | Flexible display of electronic device and operation method thereof | |
CN106126424B (en) | A kind of visual automated testing method of script, device and mobile terminal | |
CN113593071A (en) | Inspection method, inspection device, inspection system, computer equipment and storage medium | |
CN110320378B (en) | Method, apparatus, device and computer readable storage medium for applying for a quality control test | |
WO2018121582A1 (en) | Script generation method and device | |
CN116265972B (en) | Power consumption display method of mobile device and mobile device | |
CN107153495B (en) | Method and device for establishing service link between network elements | |
CN107533566A (en) | Method, portable electric appts and the graphic user interface retrieved to the content of picture | |
CN108984097B (en) | Touch operation method and device, storage medium and electronic equipment | |
WO2019019158A1 (en) | Method and device for operating application | |
US10908645B2 (en) | Method for controlling screen output and electronic device supporting same | |
CN106991180B (en) | A kind of document display method and mobile terminal | |
CN112383661B (en) | Mobile terminal automatic test method and device, electronic equipment and storage medium | |
CN110262864B (en) | Application processing method and device, storage medium and terminal | |
CN113282472B (en) | Performance test method and device |
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 |