CN109840212A - Function test method, device, equipment and the readable storage medium storing program for executing of application program - Google Patents
Function test method, device, equipment and the readable storage medium storing program for executing of application program Download PDFInfo
- Publication number
- CN109840212A CN109840212A CN201910122297.1A CN201910122297A CN109840212A CN 109840212 A CN109840212 A CN 109840212A CN 201910122297 A CN201910122297 A CN 201910122297A CN 109840212 A CN109840212 A CN 109840212A
- Authority
- CN
- China
- Prior art keywords
- tested
- function
- functional
- application program
- interface
- 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.)
- Granted
Links
- 238000010998 test method Methods 0.000 title abstract description 4
- 238000012360 testing method Methods 0.000 claims abstract description 94
- 238000000034 method Methods 0.000 claims abstract description 80
- 238000012015 optical character recognition Methods 0.000 claims abstract description 27
- 238000000605 extraction Methods 0.000 claims abstract description 11
- 230000006870 function Effects 0.000 claims description 142
- 238000011990 functional testing Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000002860 competitive effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000036961 partial effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Facsimiles In General (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention discloses a kind of function test method of application program, device, equipment and readable storage medium storing program for executing.Wherein, method includes: the function interface to be tested for obtaining application program;On the function interface to be tested, using optical character recognition method, abstraction function parameter;According to the functional parameter of extraction, test report is generated.The embodiment of the present invention can obtain function interface automatically, and obtain functional parameter automatically, and provide test report, participate in without user and tester, save human cost, improve test speed.
Description
Technical Field
The present invention relates to computer technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for testing functions of an application program.
Background
With the development of mobile network and applications installed in mobile terminals, many users have different requirements for applications, such as the requirement for downloading speed and the requirement for playing video. Based on this, it is necessary to test the functions of the application to improve the application quality, increase the user volume and user stickiness.
Due to the fact that the internal implementation of the application program is complex and generally difficult to obtain, the application program can be only subjected to function testing by adopting black box testing in most cases. In the black box test process, a user who needs an application program participates in the numerous tests, and a tester is required to extract and analyze test results.
The existing application program testing method needs higher participation of users and higher labor cost of testers, reduces the testing speed and improves the labor cost.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for testing functions of an application program and a readable storage medium, so that the labor cost is saved, and the testing speed is increased.
In a first aspect, an embodiment of the present invention provides a method for testing a function of an application program, including:
acquiring a to-be-tested function interface of an application program;
extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method;
and generating a test report according to the extracted functional parameters.
In a second aspect, an embodiment of the present invention further provides a device for testing functions of an application program, including:
the acquisition module is used for acquiring a to-be-tested functional interface of the application program;
the extraction module is used for extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method;
and the generating module is used for generating a test report according to the extracted functional parameters.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for testing the function of the application program according to any embodiment.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the function testing method for the application program according to any embodiment.
In the embodiment of the invention, the function interface to be tested of the application program is automatically obtained, and the user of the application program is not required to participate in mass testing; by adopting an optical character recognition method to extract functional parameters on the functional interface to be tested, the functional parameters are automatically extracted without the need of extracting and analyzing a test report by a tester; and generating a test report according to the extracted functional parameters, thereby realizing the automatic output of the test report. Therefore, the method provided by the embodiment reduces the participation degree of users and testers, reduces the labor cost and improves the testing speed.
Drawings
Fig. 1a is a flowchart of a method for testing functions of an application according to an embodiment of the present invention;
fig. 1b is a line graph of functional parameters changing with time during a process of performing a functional test on the same application according to an embodiment of the present invention;
fig. 2a is a flowchart of a method for testing the function of an application according to a second embodiment of the present invention;
FIG. 2b is a schematic diagram of a target area according to a second embodiment of the present invention;
FIG. 2c is a schematic diagram of an interface layout according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for testing the function of an application according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a functional testing apparatus for an application according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1a is a flowchart of a method for testing functions of an application according to an embodiment of the present invention, where the embodiment is applicable to a case where black box testing is performed on functions of an application, and the method may be performed by a device for testing functions of an application, where the device may be formed by hardware and/or software and is generally integrated in an electronic device. With reference to fig. 1a, the method provided by the embodiment of the present invention specifically includes the following operations:
and S110, acquiring a to-be-tested function interface of the application program.
In this embodiment, the application program to be tested runs on the terminal, and a functional interface to be tested is generated on the terminal. Terminals include, but are not limited to, cellular phones, notebooks, desktop computers, palmtop computers, gaming devices, and the like. The interface to be tested is an interface including function parameters, such as a file download speed interface, a video playing interface, an electric quantity consumption interface and the like, generated during or after the terminal realizes the function to be tested. The function interface to be tested can be generally displayed on the terminal for the user to check.
The electronic device is communicatively connected to the terminal, for example, the electronic device is connected to the terminal through a Universal Serial Bus (USB), or through a network port. Optionally, the electronic device obtains the development permission of the terminal based on the communication connection, and further obtains the to-be-tested function interface of the application program through the communication connection. In a specific application scenario, a tester connects the terminal to the electronic device in a communication manner, starts an application program to be tested on the terminal, and starts functions to be tested, such as downloading a file and playing a video. After the electronic device is connected to the terminal, a terminal assistant (e.g., a cell phone assistant) obtains the development right of the terminal, and accesses various functions of the application program on the terminal. And when the terminal displays the function interface to be tested, acquiring the function interface to be tested.
Of course, the electronic device may also be configured with a camera, and the camera captures the function interface to be tested displayed by the terminal without being in communication connection with the terminal.
And S120, extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method.
And after the electronic equipment acquires the function interface to be tested, extracting the function parameters.
In this embodiment, an Optical Character Recognition (OCR) method is applied to the field of functional testing of an application program, and specifically, an OCR method is adopted to extract functional parameters on a functional interface to be tested. The principle of the OCR method lies in that the picture is converted, so that the graph in the picture is continuously stored, and the data in the table and the characters in the picture are uniformly changed into computer characters when the table exists, so that the storage quantity of the picture data is reduced, the recognized characters can be reused and analyzed, and the labor and time for keyboard input can be saved. Based on the method, the parameters in the picture, namely the functional parameters to be tested, are read from the picture of the functional interface to be tested.
And S130, generating a test report according to the extracted functional parameters.
Optionally, firstly, storing the functional parameters of the ball in a database, and after the ball is tested, reading the functional parameters from the database to generate a test report; or generating a test report according to the extracted functional parameters in real time in the process of functional test.
Optionally, the extracted functional parameters are directly used to generate a test report, or after the functional parameters are operated, the operation result is used to generate a test report, and the operation includes, but is not limited to, calculating an average value, a maximum value, a variance, and the like.
The method provided by the embodiment is described in detail through three application scenarios.
The application scenario for testing the same application program is as follows: respectively acquiring a plurality of functional interfaces to be tested at different moments in the process of performing functional test on the same application program; extracting functional parameters on a plurality of functional interfaces to be tested by adopting an optical character recognition method respectively; and drawing a comparison graph and/or a table of the function parameters changing along with time according to the function parameters respectively extracted from the plurality of function interfaces to be tested.
The same application program is an application program with the same name and the same version. Functional parameters at different moments are extracted by acquiring functional interfaces to be tested at different moments and extracting functional parameters from the functional interfaces respectively; and further drawing a comparison graph and/or a table of the function parameters changing along with time, wherein the comparison graph comprises a curve graph, a line graph, a bar graph and the like. Fig. 1b shows a line graph of the functional parameter (download speed) over time during the functional test of the same application.
Optionally, the obtaining frequency of the interface of the function to be tested is set according to the test period of the function to be tested or the running time of the function to be tested. For example, the function to be tested is video playing, the video playing speed may change every 3 minutes according to experience, the testing period is 3 minutes, and then the obtaining frequency of the interface of the function to be tested is 1 time/3 minutes. For another example, if the running time of the video playing is 60 minutes, the interval is fixed within the running time range, and if the running time is 10 minutes, the obtaining frequency of the functional interface to be tested is set to be 1 time/10 minutes.
An application scenario for testing an application program of different versions: respectively acquiring a plurality of functional interfaces to be tested of different versions in the process of performing functional test on application programs of different versions; extracting functional parameters on a plurality of functional interfaces to be tested by adopting an optical character recognition method respectively; and drawing comparison graphs and/or tables of the function parameters under different versions according to the function parameters extracted from the plurality of function interfaces to be tested.
The application programs of different versions are the application programs of the same name and different versions. The application programs of different versions can run on the same terminal or respectively run on different terminals; an application program of different versions can be tested simultaneously or sequentially. For the testing process of each version of the application program, refer to the application scenario for testing the same application program, and details are not described here.
The method comprises the steps of extracting functional parameters of different versions by acquiring a plurality of functional interfaces to be tested of different versions and extracting the functional parameters from the functional interfaces respectively; and further drawing a comparison graph and/or a table of the functional parameters under different versions, wherein the comparison graph comprises a graph, a line graph, a bar graph and the like. Table 1 shows tables of function parameters under different versions in the process of performing function test on an application program of different versions.
TABLE 1
The application scenario for performing functional tests on different application programs is as follows: respectively acquiring a plurality of functional interfaces to be tested of different application programs in the process of performing functional test on the different application programs; extracting functional parameters on a plurality of functional interfaces to be tested by adopting an optical character recognition method respectively; and drawing comparison graphs and/or tables of the functional parameters under different application programs according to the functional parameters extracted from the functional interfaces to be tested.
The different application programs are application programs with different names, and can run on the same terminal or run on different terminals respectively; different applications may be functionally tested simultaneously or sequentially. For the test process of each application program, reference is made to the above application scenario for testing the same application program, and details are not described here.
The method comprises the steps of extracting functional parameters of different application programs by acquiring a plurality of functional interfaces to be tested of the different application programs and extracting the functional parameters from the functional interfaces respectively; and further drawing a comparison graph and/or a table of the functional parameters under different application programs, wherein the comparison graph comprises a graph, a line graph, a bar graph and the like. Table 2 shows a table of functional parameters under different applications in the process of performing functional tests on different applications.
TABLE 2
In the embodiment of the invention, the function interface to be tested of the application program is automatically obtained, and the user of the application program is not required to participate in mass testing; by adopting an optical character recognition method to extract the functional parameters on the functional interface to be tested, the functional parameters are automatically extracted without the need of extracting and analyzing a test report by a tester; and the test report is generated according to the extracted functional parameters, so that the automatic output of the test report is realized. Therefore, the method provided by the embodiment reduces the participation degree of users and testers, reduces the labor cost and improves the testing speed.
Further, the method provided by the embodiment can be used for testing functions of the same application program at different moments, functions of application programs of different versions and functions of different application programs, so that the method provided by the embodiment is applied to various testing scenes, dynamic continuous observation of functional parameters along with time and dynamic iterative observation of functions of application programs of different versions are realized, iterative effects are measured, and function comparison observation among competitive products is carried out, so that the function testing conditions in different application scenes are quickly and accurately obtained.
Example two
The present embodiment is further optimized based on various optional implementation manners of the above embodiment. Optionally, optimizing the extracted functional parameters on the functional interface to be tested by adopting an optical character recognition method to determine a target area in which the functional parameters are displayed on the functional interface to be tested; and in the target area, extracting the functional parameters by adopting an optical character recognition method so as to improve the accuracy of extracting the functional parameters. Fig. 2a is a flowchart of a method for testing functions of an application according to a second embodiment of the present invention, and as shown in fig. 2a, the method according to the second embodiment includes the following operations:
and S210, acquiring a to-be-tested function interface of the application program.
And S220, determining a target area where the function parameters are displayed on the function interface to be tested.
Other interference parameters may exist on the functional interface to be tested, for example, a time parameter may exist on the download speed interface. In order to improve the accuracy of extracting the functional parameters and eliminate the interference of other parameters, a partial area, namely a target area, in which the functional parameters are displayed and other parameters are removed is determined. The number of the target areas on the functional interface to be tested is at least one. Fig. 2b is a schematic diagram of a target area according to a second embodiment of the present invention.
The present embodiment determines the target area through two alternative implementations.
A first alternative embodiment: and determining a target area in which the function parameters are displayed on the functional interface to be tested according to the interface layout of the functional interface to be tested.
The interface layout of the function interface to be tested is obtained in advance because the interface layouts of the function interface to be tested of different application programs, even the interface layouts of the function interface to be tested of the application programs of different versions, are possibly different. Fig. 2c is a schematic diagram of an interface layout according to a second embodiment of the present invention, where the interface layout includes: interface content and the respective areas in which the interface content is displayed. The interface content display shown in fig. 2c includes a time region, a search region, and a download speed region in regions, each of which is represented by a bold rectangular frame.
Then, according to the interface layout, determining a target area where the functional parameters are displayed, specifically coordinates corresponding to the target area, for example, coordinates of the upper left corner and the lower right corner of the target area; or the lower left and upper right coordinates of the target area.
Second alternative embodiment: acquiring pixel coordinates which are extracted by a pixel coordinate extraction tool and correspond to the target area; and determining the target area where the functional parameters are displayed according to the pixel coordinates corresponding to the target area.
In this embodiment, the target region needs to be screened in advance, for example, the target region needs to be screened manually, or the target region needs to be determined according to the interface layout. Then, the pixel coordinates corresponding to the target area, such as the upper left corner coordinate and the lower right corner coordinate of the target area, are extracted by the pixel coordinate extraction tool, as shown in fig. 2 b.
In an application scenario, performing function test on 3 different application programs, respectively obtaining n functional interfaces to be tested (hereinafter referred to as interfaces for short) of each application program, and determining n target areas from the n functional interfaces to be tested, wherein a data storage format is as follows:
application 1: (interface 11; interface 12; …; interface 1n)
→ target area coordinates: (X)Upper left corner11,YUpper left corner11),(XLower right corner11,YLower right corner11);
(XUpper left corner12,YUpper left corner12),(XLower right corner12,YLower right corner12);…
(XUpper left corner1n,YUpper left corner1n),(XLower right corner1n,YLower right corner1n)。
Application 2: (interface 21; interface 22; …; interface 2n)
→ target area coordinates: (X)Upper left corner21,YUpper left corner21),(XLower right corner21,YLower right corner21);
(XUpper left corner22,YUpper left corner22),(XLower right corner22,YLower right corner22);…
(XUpper left corner2n,YUpper left corner2n),(XLower right corner2n,YLower right corner2n)。
Application 3: (interface 31; interface 32; …; interface 3n)
→ target area coordinates: (X)Upper left corner31,YUpper left corner31),(XLower right corner31,YLower right corner31);
(XUpper left corner32,YUpper left corner32),(XLower right corner32,YLower right corner32);…
(XUpper left corner3n,YUpper left corner3n),(XLower right corner3n,YLower right corner3n)。
And S230, extracting functional parameters in the target area by adopting an optical character recognition method.
As shown in fig. 2b, in the download speed area, an optical character recognition method is used to extract a download speed value of 2.3 MB/s. Next, in the application scenario of performing the function test on the 3 different application programs, the data storage format of the download speed value is as follows:
application 1: (download speed value 11; download speed value 12; …; download speed value 1 n);
application 2: (download speed value 21; download speed value 22; …; download speed value 2 n);
application 3: (download speed value 31; download speed value 32; …; download speed value 3 n).
And S240, generating a test report according to the extracted functional parameters.
In the embodiment of the invention, the functional parameters are extracted by adopting an optical character recognition method in the target area, and the range of the extracted parameters is narrowed to the target area, thereby being beneficial to improving the accuracy of parameter extraction.
Further, according to the interface layout of the function interface to be tested, determining a target area in which the function parameters on the function interface to be tested are displayed; or acquiring pixel coordinates which are extracted by a pixel coordinate extraction tool and correspond to the target area; and according to the pixel coordinates corresponding to the target area, the target area where the functional parameters are displayed is determined, so that the position of the target area is automatically obtained, the accuracy and the automation degree of parameter extraction are further improved, the labor cost is reduced, and the testing speed is improved.
EXAMPLE III
Fig. 3 is a flowchart of a method for testing functions of an application according to a third embodiment of the present invention. The embodiment of the invention carries out operation refinement on the basis of the technical scheme of each embodiment. Optionally, the operation of acquiring a to-be-tested function interface of the application program is refined into that a screenshot tool is determined according to the running platform of the application program; and intercepting the to-be-tested function interface of the application program by adopting a screenshot tool, so that the to-be-tested function interface is automatically obtained based on the screenshot tool. With reference to fig. 3, the method provided by this embodiment includes the following operations:
and S310, determining a screenshot tool according to the running platform of the application program.
The operation platform of the application program comprises but is not limited to android, IOS, Windows and the like, and the screenshot tool needs to be matched with the operation platform, so that screenshot can be successfully performed according to the screenshot tool.
In an application scene, a terminal is in communication connection with electronic equipment, the electronic equipment acquires the development permission of the terminal based on the communication connection, accesses various functions of an application program on the terminal, and starts a screenshot tool corresponding to an operation platform of the application program. And then, finding the position of the function interface to be tested, and intercepting the function interface to be tested by a screenshot tool.
S320, setting the screenshot frequency of the screenshot tool according to the test period of the function to be tested or the running time of the function to be tested.
The screenshot frequency of the screenshot tool can be automatically set in advance. For example, the function to be tested is video playing, according to experience, the video playing speed may change every 3 minutes, the test period is 3 minutes, and then the screenshot frequency of the screenshot tool is 1/3 minutes. For another example, if the running time of the video playing is 60 minutes, the fixed time interval is set within the running time range, and the screenshot frequency of the screenshot tool is set to 1/10 minutes, assuming that the time interval is 10 minutes.
Of course, the tester may also set the screenshot frequency by self according to the test requirement, but the invention is not limited thereto.
It is noted that S320 may be performed before S310, or S310 may be performed thereafter.
And S330, adopting a screenshot tool to intercept the to-be-tested function interface of the application program according to screenshot frequency.
And S340, extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method.
And S350, generating a test report according to the extracted functional parameters.
In the embodiment, the screenshot frequency of the screenshot tool is set according to the test period of the function to be tested or the running time of the function to be tested, and the screenshot tool is adopted to intercept the interface of the function to be tested of the application program according to the screenshot frequency, so that the interface under the running condition of various functions can be intercepted, valuable functional parameters can be extracted, and the function test can be carried out comprehensively and scientifically.
Example four
Fig. 4 is a schematic structural diagram of a function testing apparatus for an application according to a fourth embodiment of the present invention, where the embodiment of the present invention is applied to a case of performing a black box test on a function of an application, and with reference to fig. 4, the function testing apparatus for an application includes:
an obtaining module 410, configured to obtain a to-be-tested function interface of an application;
the extraction module 420 is used for extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method;
and a generating module 430, configured to generate a test report according to the extracted functional parameters.
In the embodiment of the invention, the function interface to be tested of the application program is automatically obtained, and the user of the application program is not required to participate in mass testing; by adopting an optical character recognition method to extract the functional parameters on the functional interface to be tested, the functional parameters are automatically extracted without the need of extracting and analyzing a test report by a tester; and the test report is generated according to the extracted functional parameters, so that the automatic output of the test report is realized. Therefore, the method provided by the embodiment reduces the participation degree of users and testers, reduces the labor cost and improves the testing speed.
Optionally, the extracting module 420 is configured to, when extracting the functional parameter on the functional interface to be tested by using an optical character recognition method, specifically: determining a target area where the function parameters are displayed on a function interface to be tested; and in the target area, extracting functional parameters by adopting an optical character recognition method.
Optionally, when the extracting module 420 determines the target area where the function parameter is displayed on the function interface to be tested, it is specifically configured to: determining a target area where the function parameters are displayed on the function interface to be tested according to the interface layout of the function interface to be tested; or acquiring pixel coordinates which are extracted by a pixel coordinate extraction tool and correspond to the target area; and determining the target area where the functional parameters are displayed according to the pixel coordinates corresponding to the target area.
Optionally, when the obtaining module 410 obtains the function interface to be tested of the application program, it is specifically configured to: determining a screenshot tool according to an operation platform of an application program; and intercepting a to-be-tested function interface of the application program by adopting a screenshot tool.
Optionally, the apparatus further includes a setting module, configured to set a screenshot frequency of the screenshot tool according to a test period of the function to be tested or an operation duration of the function to be tested before the screenshot tool is used to intercept the function interface to be tested of the application program; the obtaining module 410 is specifically configured to, when capturing the to-be-tested function interface of the application program by using a screenshot tool: and adopting a screenshot tool to intercept the to-be-tested function interface of the application program according to screenshot frequency.
Optionally, when the obtaining module 410 obtains the function interface to be tested of the application program, it is specifically configured to: in the process of performing function test on the same application program, a plurality of function interfaces to be tested at different moments are respectively obtained. When the generating module 430 generates the test report according to the extracted functional parameters, it is specifically configured to: and drawing a comparison graph and/or a table of the function parameters changing along with time according to the function parameters respectively extracted from the plurality of function interfaces to be tested.
Optionally, when the obtaining module 410 obtains the function interface to be tested of the application program, it is specifically configured to: in the process of performing function test on an application program with different versions, a plurality of function interfaces to be tested with different versions are respectively obtained. When the generating module 430 generates the test report according to the extracted functional parameters, it is specifically configured to: and drawing comparison graphs and/or tables of the function parameters under different versions according to the function parameters extracted from the plurality of function interfaces to be tested.
Optionally, when the obtaining module 410 obtains the function interface to be tested of the application program, it is specifically configured to: in the process of performing function test on different application programs, a plurality of function interfaces to be tested of the different application programs are respectively obtained. When the generating module 430 generates the test report according to the extracted functional parameters, it is specifically configured to: and drawing comparison graphs and/or tables of the functional parameters under different application programs according to the functional parameters extracted from the functional interfaces to be tested.
The function testing device for the application program provided by the embodiment of the invention can execute the function testing method for the application program provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 5, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by the electronic device and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, camera, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing a functional test method of an application program provided by an embodiment of the present invention.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the function test method of the application program according to any embodiment.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (11)
1. A method for testing the function of an application program is characterized by comprising the following steps:
acquiring a to-be-tested function interface of an application program;
extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method;
and generating a test report according to the extracted functional parameters.
2. The method of claim 1, wherein the extracting functional parameters on the interface to be tested by using an optical character recognition method comprises:
determining a target area where the function parameters are displayed on the interface to be tested;
and extracting functional parameters in the target area by adopting an optical character recognition method.
3. The method of claim 2, wherein the determining a target area on the interface to be tested where the function parameter is displayed comprises:
determining a target area where the function parameters are displayed on the function interface to be tested according to the interface layout of the function interface to be tested; or,
acquiring pixel coordinates which are extracted by a pixel coordinate extraction tool and correspond to the target area; and determining the target area where the functional parameters are displayed according to the pixel coordinates corresponding to the target area.
4. The method of claim 1, wherein the obtaining of the function interface to be tested of the application program comprises:
determining a screenshot tool according to the running platform of the application program;
and intercepting a to-be-tested function interface of the application program by adopting the screenshot tool.
5. The method of claim 4, before intercepting the functional interface to be tested of the application program by using the screenshot tool, further comprising:
setting the screenshot frequency of the screenshot tool according to the test period of the function to be tested or the running time of the function to be tested;
the method for intercepting the to-be-tested function interface of the application program by adopting the screenshot tool comprises the following steps of:
and adopting a screenshot tool to intercept the to-be-tested function interface of the application program according to screenshot frequency.
6. The method according to any one of claims 1 to 5, wherein the acquiring a function interface to be tested of the application program comprises:
respectively acquiring a plurality of functional interfaces to be tested at different moments in the process of performing functional test on the same application program;
generating a test report according to the extracted functional parameters, including:
and drawing a comparison graph and/or a table of the function parameters changing along with time according to the function parameters respectively extracted from the plurality of function interfaces to be tested.
7. The method according to any one of claims 1 to 5, wherein the acquiring a function interface to be tested of the application program comprises:
respectively acquiring a plurality of functional interfaces to be tested of different versions in the process of performing functional test on application programs of different versions;
generating a test report according to the extracted functional parameters, including:
and drawing comparison graphs and/or tables of the function parameters under different versions according to the function parameters extracted from the plurality of function interfaces to be tested.
8. The method according to any one of claims 1 to 5, wherein the acquiring a function interface to be tested of the application program comprises:
respectively acquiring a plurality of functional interfaces to be tested of different application programs in the process of performing functional test on the different application programs;
generating a test report according to the extracted functional parameters, including:
and drawing comparison graphs and/or tables of the functional parameters under different application programs according to the functional parameters extracted from the plurality of functional interfaces to be tested.
9. An apparatus for testing a function of an application program, comprising:
the acquisition module is used for acquiring a to-be-tested functional interface of the application program;
the extraction module is used for extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method;
and the generating module is used for generating a test report according to the extracted functional parameters.
10. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of functional testing of an application program as claimed in any of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for functional testing of an application program as claimed in any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910122297.1A CN109840212B (en) | 2019-02-19 | 2019-02-19 | Function test method, device and equipment of application program and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910122297.1A CN109840212B (en) | 2019-02-19 | 2019-02-19 | Function test method, device and equipment of application program and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109840212A true CN109840212A (en) | 2019-06-04 |
CN109840212B CN109840212B (en) | 2022-11-11 |
Family
ID=66884689
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910122297.1A Active CN109840212B (en) | 2019-02-19 | 2019-02-19 | Function test method, device and equipment of application program and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109840212B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111078569A (en) * | 2019-12-20 | 2020-04-28 | 腾讯科技(深圳)有限公司 | Method and device for testing optical character recognition application and storage medium |
CN112559340A (en) * | 2020-12-09 | 2021-03-26 | 上海米哈游天命科技有限公司 | Picture testing method, device, equipment and storage medium |
CN116578438A (en) * | 2023-07-13 | 2023-08-11 | 建信金融科技有限责任公司 | Automatic detection method and device suitable for aging transformation |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102957773A (en) * | 2011-08-29 | 2013-03-06 | 比亚迪股份有限公司 | Mobile phone software testing method and mobile phone software testing system |
US20150254165A1 (en) * | 2014-03-05 | 2015-09-10 | Concurix Corporation | Automated Regression Testing for Software Applications |
US20150339213A1 (en) * | 2014-05-21 | 2015-11-26 | Cgi Technologies And Solutions Inc. | Automated testing of an application system |
CN105260301A (en) * | 2015-09-24 | 2016-01-20 | 努比亚技术有限公司 | Visual effect comparison test device of user interfaces and realization method of visual effect comparison test device of user interfaces |
CN108614775A (en) * | 2018-05-03 | 2018-10-02 | 深圳Tcl新技术有限公司 | Automated testing method, device, terminal device and computer readable storage medium |
US20180300225A1 (en) * | 2015-10-19 | 2018-10-18 | Leapwork A/S | Method, apparatus and system for task automation of computer operations based on ui control and image/text recognition |
CN108763066A (en) * | 2018-05-15 | 2018-11-06 | 南京璇玑信息技术有限公司 | A kind of natural language test script edit methods of word slot design and test machine people |
CN108829556A (en) * | 2018-06-27 | 2018-11-16 | 中国建设银行股份有限公司 | A kind of automated testing method and device |
CN108845930A (en) * | 2018-05-23 | 2018-11-20 | 深圳市腾讯网络信息技术有限公司 | Interface operation test method and device, storage medium and electronic device |
CN108920380A (en) * | 2018-07-20 | 2018-11-30 | 百度在线网络技术(北京)有限公司 | Test method, device, server, equipment and the storage medium of the software compatibility |
CN109189682A (en) * | 2018-08-27 | 2019-01-11 | 广州云测信息技术有限公司 | A kind of script method for recording and device |
CN109189677A (en) * | 2018-08-21 | 2019-01-11 | 广州云测信息技术有限公司 | A kind of test method and device for variable value more new state |
-
2019
- 2019-02-19 CN CN201910122297.1A patent/CN109840212B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102957773A (en) * | 2011-08-29 | 2013-03-06 | 比亚迪股份有限公司 | Mobile phone software testing method and mobile phone software testing system |
US20150254165A1 (en) * | 2014-03-05 | 2015-09-10 | Concurix Corporation | Automated Regression Testing for Software Applications |
US20150339213A1 (en) * | 2014-05-21 | 2015-11-26 | Cgi Technologies And Solutions Inc. | Automated testing of an application system |
CN105260301A (en) * | 2015-09-24 | 2016-01-20 | 努比亚技术有限公司 | Visual effect comparison test device of user interfaces and realization method of visual effect comparison test device of user interfaces |
US20180300225A1 (en) * | 2015-10-19 | 2018-10-18 | Leapwork A/S | Method, apparatus and system for task automation of computer operations based on ui control and image/text recognition |
CN108614775A (en) * | 2018-05-03 | 2018-10-02 | 深圳Tcl新技术有限公司 | Automated testing method, device, terminal device and computer readable storage medium |
CN108763066A (en) * | 2018-05-15 | 2018-11-06 | 南京璇玑信息技术有限公司 | A kind of natural language test script edit methods of word slot design and test machine people |
CN108845930A (en) * | 2018-05-23 | 2018-11-20 | 深圳市腾讯网络信息技术有限公司 | Interface operation test method and device, storage medium and electronic device |
CN108829556A (en) * | 2018-06-27 | 2018-11-16 | 中国建设银行股份有限公司 | A kind of automated testing method and device |
CN108920380A (en) * | 2018-07-20 | 2018-11-30 | 百度在线网络技术(北京)有限公司 | Test method, device, server, equipment and the storage medium of the software compatibility |
CN109189677A (en) * | 2018-08-21 | 2019-01-11 | 广州云测信息技术有限公司 | A kind of test method and device for variable value more new state |
CN109189682A (en) * | 2018-08-27 | 2019-01-11 | 广州云测信息技术有限公司 | A kind of script method for recording and device |
Non-Patent Citations (3)
Title |
---|
TAREK M. AHMED 等: "Studying the Effectiveness of Application Performance Management (APM) Tools for Detecting Performance Regressions for Web Applications: An Experience Report", 《2016 IEEE/ACM 13TH WORKING CONFERENCE ON MINING SOFTWARE REPOSITORIES》 * |
俞戴龙: "QTP自动化测试框架的企业级应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
郭盈 等: "GPS导航软件的一种功能自动化测试框架", 《计算机工程与应用》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111078569A (en) * | 2019-12-20 | 2020-04-28 | 腾讯科技(深圳)有限公司 | Method and device for testing optical character recognition application and storage medium |
CN111078569B (en) * | 2019-12-20 | 2022-01-18 | 腾讯科技(深圳)有限公司 | Method and device for testing optical character recognition application and storage medium |
CN112559340A (en) * | 2020-12-09 | 2021-03-26 | 上海米哈游天命科技有限公司 | Picture testing method, device, equipment and storage medium |
CN116578438A (en) * | 2023-07-13 | 2023-08-11 | 建信金融科技有限责任公司 | Automatic detection method and device suitable for aging transformation |
CN116578438B (en) * | 2023-07-13 | 2023-09-08 | 建信金融科技有限责任公司 | Automatic detection method and device suitable for aging transformation |
Also Published As
Publication number | Publication date |
---|---|
CN109840212B (en) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107025174B (en) | Method, device and readable storage medium for user interface anomaly test of equipment | |
CN109840212B (en) | Function test method, device and equipment of application program and readable storage medium | |
CN110705651A (en) | Method, device, equipment and medium for testing video identification accuracy | |
CN107040535B (en) | Method, device and system for monitoring login of mobile application channel and storage medium | |
CN112559341A (en) | Picture testing method, device, equipment and storage medium | |
CN110597704A (en) | Application program pressure testing method, device, server and medium | |
CN107193747B (en) | Code testing method and device and computer equipment | |
CN110248235B (en) | Software teaching method, device, terminal equipment and medium | |
CN107071553B (en) | Method, device and computer readable storage medium for modifying video and voice | |
CN111949510B (en) | Test processing method, device, electronic equipment and readable storage medium | |
CN110362470B (en) | Test data collection method and device, electronic equipment and storage medium | |
CN115022201B (en) | Data processing function test method, device, equipment and storage medium | |
CN111127223A (en) | Insurance product testing method and device and storage medium | |
CN110827261A (en) | Image quality detection method and device, storage medium and electronic equipment | |
CN114355175A (en) | Chip performance evaluation method and device, storage medium and computer equipment | |
CN111552634A (en) | Method and device for testing front-end system and storage medium | |
CN111061625A (en) | Automatic testing method and device applied to out-of-order password keyboard | |
CN112559340A (en) | Picture testing method, device, equipment and storage medium | |
CN113342628B (en) | Automatic acquisition method and device based on mobile terminal APP performance data | |
CN112966671A (en) | Contract detection method and device, electronic equipment and storage medium | |
CN111124862A (en) | Intelligent equipment performance testing method and device and intelligent equipment | |
Chu et al. | Automated GUI testing for android news applications | |
CN115484200B (en) | Buried point testing method, buried point testing device, server, storage medium and buried point testing system | |
US9846607B2 (en) | Method and system for associating crash reports with end user analytics | |
CN114328242B (en) | Form testing method and device, electronic equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |