CN109840212B - Function test method, device and equipment of application program and readable storage medium - Google Patents

Function test method, device and equipment of application program and readable storage medium Download PDF

Info

Publication number
CN109840212B
CN109840212B CN201910122297.1A CN201910122297A CN109840212B CN 109840212 B CN109840212 B CN 109840212B CN 201910122297 A CN201910122297 A CN 201910122297A CN 109840212 B CN109840212 B CN 109840212B
Authority
CN
China
Prior art keywords
tested
functional
interface
function
application program
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.)
Active
Application number
CN201910122297.1A
Other languages
Chinese (zh)
Other versions
CN109840212A (en
Inventor
贾金莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910122297.1A priority Critical patent/CN109840212B/en
Publication of CN109840212A publication Critical patent/CN109840212A/en
Application granted granted Critical
Publication of CN109840212B publication Critical patent/CN109840212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Facsimiles In General (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method, a device and equipment for testing functions of an application program and a readable storage medium. The method comprises 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. The embodiment of the invention can automatically acquire the function interface, automatically acquire the function parameters and give the test report without the participation of users and testers, thereby saving the labor cost and improving the test speed.

Description

Function test method, device and equipment of application program and readable storage medium
Technical Field
Embodiments of the present invention relate 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 functionality of the application to improve the application quality, user volume and user stickiness.
Due to the fact that the internal implementation of the application program is complex and generally difficult to obtain, in most cases, the function test of the application program can be carried out only by adopting a black box test. 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, which are used for saving labor cost and improving testing speed.
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 function 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 are caused to implement the method for functional testing of an application program according to any of the embodiments.
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 public 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 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 drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting 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 in 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, notebook, desktop, palmtop, gaming, etc. devices. 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, 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, the functional parameters of the ball are stored in a database, and after the ball is tested, the functional parameters are read from the database to generate a test report; or generating a test report according to the extracted functional parameters in real time in the functional test process.
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, where 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 explained 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 broken 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, according to experience, the video playing speed may change every 3 minutes, the test 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
Figure BDA0001972342130000061
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 plurality of 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 can be tested for functionality simultaneously or in sequence. For the testing process of each application program, reference is made 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 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
Figure BDA0001972342130000071
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 public 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.
Furthermore, the method provided by the embodiment can test 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 test 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 function test 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, and determining a target area where the functional parameters are displayed; 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:
s210, acquiring a function interface to be tested 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 be present on the functional interface to be tested, for example, a time parameter may be present 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 by two alternative implementations.
A first alternative embodiment: and determining a target area where the function parameters are displayed on the functional interface to be tested according to the interface layout of the functional interface to be tested.
Because the interface layout of the function interface to be tested of different application programs, even the interface layout of the function interface to be tested of an application program of different versions, may be different, the interface layout of the function interface to be tested is obtained in advance. 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 function 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 area needs to be screened in advance, for example, the target area needs to be screened manually, or the target area 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 8230; interface 1 n)
→ target area coordinates: (X) Upper left corner 11,Y Upper left corner 11),(X Lower right corner 11,Y Lower right corner 11);
(X Upper left corner 12,Y Upper left corner 12),(X Lower right corner 12,Y Lower right corner 12);…
(X Upper left corner 1n,Y Upper left corner 1n),(X Lower right corner 1n,Y Lower right corner 1n)。
Application 2: (interface 21; interface 22; \8230; (interface 2 n)
→ target area coordinates: (X) Upper left corner 21,Y Upper left corner 21),(X Lower right corner 21,Y Lower right corner 21);
(X Upper left corner 22,Y Upper left corner 22),(X Lower right corner 22,Y Lower right corner 22);…
(X Upper left corner 2n,Y Upper left corner 2n),(X Lower right corner 2n,Y Lower right corner 2n)。
Application 3: (interface 31; interface 32; \8230; (interface 3 n))
→ target area coordinates: (X) Upper left corner 31,Y Upper left corner 31),(X Lower right corner 31,Y Lower right corner 31);
(X Upper left corner 32,Y Upper left corner 32),(X Lower right corner 32,Y Lower right corner 32);…
(X Upper left corner 3n,Y Upper left corner 3n),(X Lower right corner 3n,Y Lower right corner 3n)。
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.3MB/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 program 1: (download speed value 11; download speed value 12; 8230; download speed value 1 n);
application 2: (download speed value 21; download speed value 22; 8230; download speed value 2 n);
application 3: (download speed value 31; download speed value 32; 8230; 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 where 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 function interface to be tested of the application program by adopting a screenshot tool, thereby automatically acquiring the function interface to be tested 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 through 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, the screenshot tool is adopted, the function interface to be tested of the application program is intercepted according to the screenshot frequency, the interface under the running condition of various functions can be intercepted, valuable function 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 program;
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 by using an optical character recognition method on the functional interface to be tested, 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 functional interface to be tested according to the interface layout of the functional 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 a test report according to the extracted functional parameters, the generating module is specifically configured to: 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 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, a processor, or a 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 is executed by a processor to implement the method for testing the function of an application program according to any embodiment.
Computer storage media for embodiments of the present invention may take the form of 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 and 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 some detail by the above embodiments, the invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the invention, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. A method for testing the functionality of an application, for black box testing the functionality of the application by an electronic device, the method comprising:
the electronic equipment is connected with a terminal through a universal serial bus or a network port; the electronic equipment acquires the development authority of a terminal based on communication connection, acquires a to-be-tested function interface of an application program through the communication connection, and accesses various functions of the application program on the terminal;
extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method; the interface to be tested comprises a file downloading speed interface, a video playing interface and an electric quantity consumption interface; the functional parameters include at least one of: file downloading speed, video playing and electric quantity consumption;
calculating the function parameters, and generating a test report according to the calculation result; wherein the operation comprises: calculating an average value, a maximum value and a variance;
the acquiring of the to-be-tested function interface of the application program comprises the following steps of:
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;
the operation of the function parameters and the generation of a test report from the operation result include:
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.
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 functional interface to be tested according to the interface layout of the functional interface to be tested; alternatively, the first and second electrodes may be,
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 capturing the functional interface to be tested of the application program by adopting the screenshot tool comprises the following steps:
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 obtaining of the function interface to be tested of the application program further 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;
the operation of the function parameters and the generation of a test report from the operation result include:
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 obtaining of the function interface to be tested of the application program further comprises:
respectively acquiring a plurality of function interfaces to be tested of different versions in the process of testing functions of an application program of different versions;
the operation of the functional parameters and the generation of a test report from the operation result include:
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. A function testing apparatus for an application program, which is used for black box testing of a function of the application program by an electronic device, the apparatus comprising:
the acquisition module is used for being connected with a terminal through a universal serial bus through the electronic equipment or being connected through a network port; the electronic equipment acquires the development authority of the terminal based on communication connection, acquires a to-be-tested function interface of an application program through the communication connection, and accesses various functions of the application program on the terminal;
the extraction module is used for extracting functional parameters on the functional interface to be tested by adopting an optical character recognition method; the function interface to be tested comprises a file downloading speed interface, a video playing interface and an electric quantity consumption interface; the functional parameters include at least one of: file downloading speed, video playing and electric quantity consumption;
the generating module is used for calculating the functional parameters and generating a test report according to the calculation result; wherein the operation comprises: calculating an average value, a maximum value and a variance;
the obtaining module, when obtaining the function interface to be tested of the application program, is specifically configured to: 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;
the generating module is specifically configured to, when performing an operation on the functional parameter and generating a test report from an operation result: 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 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-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for functional testing of an application program as claimed in any one of claims 1 to 7.
CN201910122297.1A 2019-02-19 2019-02-19 Function test method, device and equipment of application program and readable storage medium Active CN109840212B (en)

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 CN109840212A (en) 2019-06-04
CN109840212B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN116578438B (en) * 2023-07-13 2023-09-08 建信金融科技有限责任公司 Automatic detection method and device suitable for aging transformation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN108829556A (en) * 2018-06-27 2018-11-16 中国建设银行股份有限公司 A kind of automated testing method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957773B (en) * 2011-08-29 2016-03-02 比亚迪股份有限公司 A kind of cell phone software method of testing and system
US9355016B2 (en) * 2014-03-05 2016-05-31 Microsoft Technology Licensing, Llc Automated regression testing for software applications
US9424167B2 (en) * 2014-05-21 2016-08-23 Cgi Technologies And Solutions Inc. Automated testing of an application system
EP3365790A1 (en) * 2015-10-19 2018-08-29 Leaptest A/S Method, apparatus and system for task automation of computer operations based on visual flowchart script design 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
CN108845930B (en) * 2018-05-23 2022-12-30 深圳市腾讯网络信息技术有限公司 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
CN109189677B (en) * 2018-08-21 2022-02-08 北京云测信息技术有限公司 Test method and device for updating state of variable value
CN109189682B (en) * 2018-08-27 2022-03-22 北京云测信息技术有限公司 Script recording method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN108829556A (en) * 2018-06-27 2018-11-16 中国建设银行股份有限公司 A kind of automated testing method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GPS导航软件的一种功能自动化测试框架;郭盈 等;《计算机工程与应用》;20110321;第47卷(第9期);第69-71页 *
QTP自动化测试框架的企业级应用;俞戴龙;《中国优秀硕士学位论文全文数据库 信息科技辑》;20110315(第3期);I138-209 *
Studying the Effectiveness of Application Performance Management (APM) Tools for Detecting Performance Regressions for Web Applications: An Experience Report;Tarek M. Ahmed 等;《2016 IEEE/ACM 13th Working Conference on Mining Software Repositories》;20170126;第1-12页 *

Also Published As

Publication number Publication date
CN109840212A (en) 2019-06-04

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
CN107040535B (en) Method, device and system for monitoring login of mobile application channel and storage medium
CN110705651A (en) Method, device, equipment and medium for testing video identification accuracy
CN111428373A (en) Product assembly quality detection method, device, equipment and storage medium
CN110320378B (en) Method, apparatus, device and computer readable storage medium for applying for a quality control test
CN107193747B (en) Code testing method and device and computer equipment
CN110597704B (en) Pressure test method, device, server and medium for application program
CN112559341A (en) Picture testing method, device, equipment and storage medium
CN110826646A (en) Robot vision testing method and device, storage medium and terminal equipment
CN111949509A (en) Application software response time testing method, device, equipment and storage medium
CN112308069A (en) Click test method, device, equipment and storage medium for software interface
CN110248235B (en) Software teaching method, device, terminal equipment and medium
CN112129227B (en) Method, device, equipment and medium for scanning printed circuit board
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN114238048B (en) Automatic testing method and system for Web front-end performance
CN111127223A (en) Insurance product testing method and device and storage medium
CN115052037A (en) Client detection method, device, storage medium and equipment
CN115062571A (en) Dynamic selection method, system, equipment and computer readable storage medium for data area of integrated circuit device
CN114355175A (en) Chip performance evaluation method and device, storage medium and computer equipment
CN111061625A (en) Automatic testing method and device applied to out-of-order password keyboard
CN112559340A (en) Picture testing method, device, equipment and storage medium
CN110968519A (en) Game testing method, device, server and storage medium
CN112188192A (en) Code stream adaptability test method, system, computer equipment and storage medium
CN111552634A (en) Method and device for testing front-end system and storage medium

Legal Events

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