CN115114141A - Method, device and equipment for testing performance of application program and storage medium - Google Patents

Method, device and equipment for testing performance of application program and storage medium Download PDF

Info

Publication number
CN115114141A
CN115114141A CN202110292285.0A CN202110292285A CN115114141A CN 115114141 A CN115114141 A CN 115114141A CN 202110292285 A CN202110292285 A CN 202110292285A CN 115114141 A CN115114141 A CN 115114141A
Authority
CN
China
Prior art keywords
performance
application program
test
tested
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110292285.0A
Other languages
Chinese (zh)
Inventor
蒋政胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110292285.0A priority Critical patent/CN115114141A/en
Publication of CN115114141A publication Critical patent/CN115114141A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

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

Abstract

The invention relates to the technical field of performance test, in particular to a method, a device, equipment and a storage medium for testing the performance of an application program, wherein the method comprises the following steps: determining an application program to be tested and a performance test scene, wherein the performance test scene comprises at least one target operation; calling an interface provided by a performance testing tool, and controlling the application program to be tested to execute the at least one target operation in at least one target testing device; calling an interface provided by a performance monitoring tool to acquire performance data of the at least one target test device; and analyzing and processing the performance data to obtain a performance test result of the application program to be tested when the application program to be tested runs in the performance test scene. The performance testing method of the application program can realize automatic performance testing without manual attention, can acquire performance data in time, improves the stability and the testing efficiency of the performance testing, and can reduce the testing cost required by the performance testing.

Description

Method, device and equipment for testing performance of application program and storage medium
Technical Field
The present invention relates to the field of performance testing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for testing performance of an application.
Background
In the application program development process, performance testing is an essential link, and the purpose of the performance testing is to detect whether the developed application program can normally run on the current mainstream or all terminal devices. The performance test can not only reflect the performance and compatibility problems of the application program on the terminal equipment with different configurations, but also guide the development of the program code by analyzing the performance test data of the application program and discover some program code defects which cannot be discovered from the performance.
In the prior art, for multiple terminals (such as an android terminal and an iOS terminal), multiple scenes (such as a home page sliding scene, a live broadcast room scene, and an app starting scene), multiple mobile phones (such as mobile phones of different versions and different manufacturers), testers need to perform manual tests respectively for mobile phones of different configurations and different scenes, a performance monitoring tool (such as a performance dog) is used for collecting performance data, after the tests are completed, the performance data needs to be manually uploaded to a performance monitoring tool background, and then the performance data is checked in the performance monitoring tool.
However, the testing method needs manual participation, has low automation degree, cannot realize the simultaneous automatic testing of a plurality of tested devices, and is time-consuming and labor-consuming because one-time performance testing needs to test the performance of mobile phones (such as a high-end machine, a middle-end machine and a low-end machine) with different configurations, the testing efficiency is lower, and the testing cost is higher; moreover, due to the number of mobile phones with different configurations, testers can only complete performance tests on a few specific types of mobile phones, which may cause inaccurate performance test results of application programs; in addition, performance data display depends on a display page provided by a tool side, performance data is inconvenient to view, the performance display page cannot be customized, and use experience is poor.
Disclosure of Invention
In view of the foregoing problems in the prior art, an object of the present invention is to provide a method, an apparatus, a device, and a storage medium for testing performance of an application program, which can implement an automatic performance test and improve stability and efficiency of the performance test.
In order to solve the above problem, the present invention provides a method for testing performance of an application program, including:
determining an application program to be tested and a performance test scene, wherein the performance test scene comprises at least one target operation;
calling an interface provided by a performance testing tool, and controlling the application program to be tested to execute the at least one target operation in at least one target testing device;
calling an interface provided by a performance monitoring tool to acquire performance data of the at least one target test device;
and analyzing and processing the performance data to obtain a performance test result of the application program to be tested when the application program to be tested runs in the performance test scene.
Another aspect of the present invention provides an apparatus for testing performance of an application, including:
the device comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining an application program to be tested and a performance test scene, and the performance test scene comprises at least one target operation;
the performance testing module is used for calling an interface provided by a performance testing tool and controlling the application program to be tested to execute the at least one target operation in at least one target testing device;
the first acquisition module is used for calling an interface provided by a performance monitoring tool and acquiring the performance data of the at least one target test device;
and the first processing module is used for analyzing and processing the performance data to obtain a performance test result of the application program to be tested when the application program to be tested runs in the performance test scene.
Another aspect of the present invention provides an electronic device, including a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by the processor and executed to implement the performance testing method for an application program as described above.
Another aspect of the present invention provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the performance testing method for an application program as described above.
Another aspect of the invention provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the performance testing method of the application program.
Due to the technical scheme, the invention has the following beneficial effects:
according to the performance testing method of the application program, the APP is controlled to trigger the performance testing scene by calling the interface provided by the performance testing tool, the performance data of each target testing device in the testing process are automatically collected and reported by calling the interface provided by the performance monitoring tool, finally, the obtained performance data are automatically analyzed to obtain the testing result, the whole performance testing process is automatically carried out, manual attention is not needed, various clicking sliding of a control is not needed to obtain the performance data, the performance data can be obtained in time, the stability of automatically obtaining the performance data is improved, the stability and the testing efficiency of the performance testing are improved, and the testing cost required by the performance testing can be reduced.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description of the embodiment or the prior art will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a schematic diagram of an interface for a performance dog provided in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram of an implementation environment provided by an embodiment of the invention;
FIG. 3 is a flowchart of a method for testing the performance of an application according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a performance test scenario provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of a data table storing performance data provided by one embodiment of the present invention;
FIG. 6A is a graphical illustration of the results of a test of the stuck-at problem provided by one embodiment of the present invention;
fig. 6B is a schematic diagram illustrating a test result of memory usage according to an embodiment of the present invention;
FIG. 6C is a diagram illustrating test results of CPU utilization according to an embodiment of the present invention;
FIG. 7 is a flowchart of a method for testing the performance of an application according to another embodiment of the present invention;
FIG. 8 is a diagram illustrating performance analysis results of different types of APP provided by an embodiment of the present invention;
FIG. 9 is a schematic illustration of product performance issues provided by one embodiment of the present invention;
FIG. 10 is a diagram illustrating performance analysis results of different versions of APP provided by an embodiment of the present invention;
FIG. 11 is a schematic diagram of a closed loop for performance monitoring of an application provided by one embodiment of the present invention;
fig. 12 is a schematic structural diagram of a performance testing apparatus for an application according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
In order to make the objects, technical solutions and advantages disclosed in the embodiments of the present invention more clearly apparent, the embodiments of the present invention are described in further detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the invention and are not intended to limit the embodiments of the invention. First, the embodiments of the present invention explain the following concepts:
performance dogs (Perfdog): the performance dog is a performance monitoring tool for a mobile platform, and supports android and iOS (apple Operating System) platforms, when a tester manually tests and obtains the performance of an Application program (APP), the tester can obtain data of each test scene through the performance dog, and a performance test data display page is shown in fig. 1.
The product performance is as follows: an application program product, except having the function of attracting the user, still need to have smooth use experience (for example see live broadcast not stuck, the picture is smooth), this just needs APP to have more excellent performance, and three indexes are paid close attention to product performance general focus: whether the frame rate is too low results in jamming, whether there is memory leakage, and whether there is a surge in the Central Processing Unit (CPU). Each APP version has large demand characteristics that affect product performance and should be of concern to the tester.
Referring to fig. 2, which is a schematic diagram illustrating an implementation environment of a performance testing method for an application according to an embodiment of the present invention, as shown in fig. 2, the implementation environment may include at least a testing host 210 and at least one testing device 220. The test host 210 and each test device 220 may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiment of the present invention.
The test host 210 and the at least one test device 220 may include a smart phone, a tablet computer, a laptop computer, a desktop computer, a digital assistant, a smart speaker, a smart wearable device, a vehicle-mounted terminal, a server, and other types of physical devices, and may also include software running in the physical devices, such as an application program, but not limited thereto. The operating system running on the test device 220 may include, but is not limited to, an android system, an iOS system, a linux system, a windows system, and the like.
In the embodiment of the present invention, the application program to be tested may be installed in the test device 220, the performance test tool and the performance monitoring tool may be installed in the test host 210, the performance test process of the entire application program may be implemented in the test host 210, a tester may input data and test commands required for a test through the outside, test the application program to be tested and output a test result, and the test result provides effective help for subsequent analysis of reasons affecting performance and determination of a solution.
In practical application, a tester can write a test case based on Python language to implement each step of the performance test method of the application program provided by the embodiment of the invention. The tester can select or input data (including information of the application program to be tested, a performance test scene, target test equipment and the like) required by the test in the test case, test the application program to be tested by running the test case and output a test result. In other embodiments, the test cases may be implemented using other languages (e.g., C + +, java, C #, etc.) in addition to the Python language. Compared with other languages, the Python program has the advantages of strong cross-platform performance, suitability for Windows, mac, Linux and other systems, relatively simple development environment configuration and less occupied system resources. It should be noted that fig. 2 is only an example.
Referring to the specification, fig. 3 illustrates a flow of a performance testing method for an application program according to an embodiment of the present invention, which may be applied to the test host in fig. 2, and specifically as shown in fig. 3, the method may include the following steps:
s310: determining an application program to be tested and a performance test scene, wherein the performance test scene comprises at least one target operation.
In the embodiment of the invention, the application program to be tested and the performance test scene can be selected or input by a tester. The application program to be tested may be various types of application programs, such as a game application, a live broadcast application, or an instant messaging application, which is not limited in this embodiment of the present invention. With reference to fig. 4 in the description, the performance test scenario may be a preset test scenario, such as an APP start scenario, a home page sliding scenario, or a live broadcast scenario, or may also be a test scenario customized by a tester. Each of the performance test scenarios may include one or more target operations, for example, an APP start scenario may include repeatedly starting an APP operation, a home page sliding scenario may include an upward sliding operation and a downward sliding operation, and the like, and at least one target operation in the performance test scenarios may also be customized by a tester. The performance test method of the embodiment of the invention is suitable for various performance test scenes, and the performance test scenes and the corresponding target operation can be customized by testers, so that the expandability is strong.
In the embodiment of the present invention, before performing the test, at least one target test device for testing the application program to be tested needs to be determined, where the at least one target test device may be a test device of the same model or a test device of a different model. The at least one target test device may be designated by a tester. If the tester does not specify the target test equipment, all the test equipment in communication connection with the test host can be used as the target test equipment for testing. The method provided by the embodiment of the invention can support simultaneous multi-thread performance test of a plurality of test devices, thereby completing the performance test more quickly, shortening the test time and improving the test efficiency.
For example, a tester may write a test case through a test host, select or input an application to be tested, select or customize a performance test scenario, and specify a target test device to be tested. The test host can analyze the test case compiled by the tester to obtain the application program to be tested and the performance test scene, determine at least one target operation corresponding to the performance test scene, and determine target test equipment for testing.
In a possible embodiment, the application to be tested may be a plurality of applications, and the performance test scenario may also be a plurality of performance test scenarios. When the number of the applications to be tested is multiple, one or more target test devices for testing each application to be tested need to be determined respectively. When the performance test scenarios are multiple, one or more target test devices for testing each performance test scenario are also required to be determined. It should be noted that different test devices can be used for testing different applications to be tested/different performance test scenarios at the same time, or the same test device can be used for testing sequentially. The performance test method of the embodiment of the invention can simultaneously carry out performance test on different applications to be tested/different performance test scenes, thereby further shortening the test time and improving the test efficiency.
Exemplarily, assuming that the performance test scenario includes a test scenario 1 and a test scenario 2, and the test devices include a device 1 to a device 10, the performance test may be performed in the test scenario 1 by using the device 1 to the device 5, and the performance test may be performed in the test scenario 2 by using the device 6 to the device 10; or the performance test may be performed in the test scenario 1 by using the devices 1 to 10, and after the performance test is completed, the performance test may be performed in the test scenario 2 by using the devices 1 to 10.
S320: and calling an interface provided by a performance testing tool, and controlling the application program to be tested to execute the at least one target operation in at least one target testing device.
In the embodiment of the invention, the performance testing tool can be installed in a testing host, the performance testing tool can provide various operation interfaces for automatically operating the APP, such as starting the APP, sliding the page upwards, sliding the page downwards, entering a live broadcast room, and the like, and the APP can be automatically operated by calling the interfaces. Specifically, the performance testing tool may be a QTA testing platform, which is a cross-platform testing automation tool and is suitable for testing of background, native or hybrid applications. It should be noted that the application to be tested needs to be installed in each target test device, and in the whole test process, each target test device needs to maintain a communication connection with the test host.
In a possible embodiment, the invoking an interface provided by a performance testing tool, and controlling the application under test to perform the at least one target operation in at least one target testing device may include:
acquiring first interface information corresponding to the at least one target operation;
generating a first interface calling request according to the application program to be tested, the at least one target test device and the first interface information;
and sending the first interface calling request to the performance testing tool so that the performance testing tool controls the application program to be tested to execute the at least one target operation in the at least one target testing device according to the first interface information.
Specifically, the target operation may include starting an APP operation, sliding a page upward, sliding a page downward, entering a live broadcast room, and the like, different types of operations correspond to different operation interfaces, different operation interfaces correspond to different interface information, and the interface information may be an interface identifier or an interface address, and the like. For example, the starting of the APP operation corresponds to starting the APP operation interface, and the upward sliding page operation corresponds to the upward sliding page operation interface. After the first interface information is determined, a first interface call request carrying the first interface information, information of an application program to be tested and information of target test equipment may be generated, where the information of the application program to be tested may be a name or an identifier of the application program to be tested, the information of the target test equipment may also be a name or an identifier of the target test equipment, and the name or the identifier may be used to uniquely determine one application program or test equipment.
Correspondingly, after receiving the first interface call request, the performance testing tool may determine the application program to be tested, the at least one target testing device, and the first interface information according to the first interface call request, establish a connection with the at least one target testing device through an Android Debug Bridge (ADB) command, and control the application program to be tested to execute the at least one target operation in the at least one target testing device through the ADB command.
S330: and calling an interface provided by a performance monitoring tool to acquire the performance data of the at least one target test device.
In this embodiment of the present invention, the performance data may include one or more of Frame Per Second (FPS), CPU occupation information, memory occupation information, and image processor (GPU) occupation information. The performance monitoring tool may be installed in the test host, the performance monitoring tool may provide various interface services including login, data acquisition, data reporting, and the like, and the interface services may be used to obtain performance data of the test device in the test process, including acquiring and reporting the performance data of the at least one target test device in the test process. Specifically, the performance monitoring tool may be an existing performance monitoring platform such as a Perfdog platform, a LeakCeary platform, and the like, which is not limited in this embodiment of the present invention.
In a possible embodiment, the invoking an interface provided by the performance monitoring tool, and the obtaining the performance data of the at least one target test device may include:
acquiring second interface information corresponding to data acquisition operation;
generating a second interface calling request according to the application program to be tested, the at least one target test device and the second interface information;
and sending the second interface calling request to the performance monitoring tool so that the performance monitoring tool collects the performance data of the at least one target test device when the application program to be tested runs in the performance test scene according to the second interface information.
Specifically, the second interface information may be an interface identifier or an interface address, and after the second interface information is determined, a second interface call request carrying the second interface information, information of an application program to be tested, and information of a target test device may be generated, where the information of the application program to be tested may be a name or an identifier of the application program to be tested, the information of the target test device may also be a name or an identifier of the target test device, and the name or the identifier may be used to uniquely determine one application program or test device.
Correspondingly, after receiving the second interface call request, the performance monitoring tool may determine the application program to be tested, the at least one target test device and the second interface information according to the second interface call request, establish a connection with the at least one target test device through an ADB command, monitor and acquire performance data of the at least one target test device in the running process of the application program to be tested in real time through the ADB command, and store the acquired performance data in a local file.
In a possible embodiment, the invoking an interface provided by the performance monitoring tool, and the obtaining the performance data of the at least one target test device may further include:
acquiring third interface information corresponding to data reporting operation;
generating a third interface calling request according to the application program to be tested, the at least one target test device and the third interface information;
and when the test is finished, sending the third interface calling request to the performance monitoring tool so that the performance monitoring tool reports the performance data of the at least one target test device according to the third interface information.
Specifically, the third interface information may be an interface identifier or an interface address, and after the third interface information is determined, a third interface call request carrying the third interface information, information of an application program to be tested, and information of a target test device may be generated, where the information of the application program to be tested may be a name or an identifier of the application program to be tested, the information of the target test device may also be a name or an identifier of the target test device, and the name or the identifier may be used to uniquely determine one application program or test device. For example, the script program of the performance testing method provided by the embodiment of the present invention may be based on Python language, and may log in the performance dog platform by calling logwinmail, and after acquiring the performance data in the testing process, may acquire the performance data acquired by the performance dog platform by using a post request of a requests module of Python.
Correspondingly, after receiving the third interface call request, the performance monitoring tool may determine an application program to be tested, at least one target test device, and third interface information according to the third interface call request, and report performance data of the at least one target test device in the running process of the application program to be tested, which is stored in a local file.
In the embodiment of the present invention, since the first interface, the second interface, and the third interface are provided by a performance testing tool or a performance monitoring tool, in order to ensure that the testing process is performed smoothly, the latest interface information needs to be synchronized periodically.
In another possible embodiment, a label used for indicating that the application program to be tested is tested in the performance test scenario may be preset, and the label and the second interface call request are sent to the performance monitoring tool together, where when the performance monitoring tool acquires performance data in a test process, the performance monitoring tool may add the label to the performance data and store the performance data in a local file. When the test is finished, a fourth interface calling request can be generated according to the label and the third interface information and sent to the performance monitoring tool, and the performance monitoring tool can directly acquire and report performance data corresponding to the label according to the label.
S340: and analyzing and processing the performance data to obtain a performance test result of the application program to be tested when the application program to be tested runs in the performance test scene.
In the embodiment of the present invention, after the performance data is obtained, the performance data may be directly stored in a database, or the performance data may be analyzed according to information focused by a tester, for example, CPU, memory, frame rate, GPU information, and the like corresponding to different types of test equipment and different performance test scenarios are respectively determined, and the information is respectively stored in the database for subsequent data analysis and display. Illustratively, as shown in fig. 5, the acquired performance data of each performance test scenario may be directly stored in a data table in the database.
In a possible embodiment, the analyzing the performance data to obtain the performance test result of the application program to be tested when running in the performance test scenario may include:
acquiring a performance data set corresponding to each performance data type;
and respectively analyzing and processing the performance data sets corresponding to the performance data types to obtain performance test results corresponding to the performance data types.
Specifically, after the performance data of the application program to be tested is acquired when the application program runs in the performance test scenario, the performance data of different types of test equipment and different types of performance data may be analyzed and processed respectively, so as to obtain performance test results of different types of performance data in different types of test equipment. Illustratively, the CPU occupation data, the GPU occupation data, the memory occupation data, and the FPS data may be analyzed, respectively, to determine a change condition in the test process, and to draw a corresponding change curve.
In a possible embodiment, after analyzing and processing the performance data to obtain a performance test result of the application program to be tested when running in the performance test scenario, the method may further include:
displaying the performance test result to a user;
and storing the performance data and the performance test result into a database.
In the embodiment of the invention, after the performance test result is obtained, the performance test result can be displayed through the visual display page, so that a tester can find the performance problem of the application program to be tested, analyze the cause of the problem and determine the solution of the problem according to the performance test result. For example, as shown in fig. 6A to 6C, performance data such as the stuck problem, the memory occupancy, and the CPU occupancy may be statistically analyzed, and corresponding test results may be obtained and displayed. In the embodiment of the invention, a user does not need to check and maintain data on the performance monitoring platform, only needs to maintain the performance data and the visual display page in the test host, and the method and the device are convenient to use and low in maintenance cost.
In the embodiment of the invention, the obtained performance test result can also be stored in the database, so that subsequent query is facilitated.
In summary, according to the performance testing method of the application program, the interface provided by the performance testing tool is called to control the APP to trigger the performance testing scene, the interface provided by the performance monitoring tool is called to automatically collect and report the performance data of each target testing device in the testing process, and finally the obtained performance data is automatically analyzed to obtain the testing result.
In one possible embodiment, referring to fig. 7 in conjunction with the description, the method may further include the steps of:
s710: when a performance analysis instruction is received, one or more screening conditions corresponding to the performance analysis instruction are determined.
S720: obtaining the performance data satisfying the one or more screening conditions from the database as target performance data.
S730: and analyzing and processing the target performance data to obtain a performance analysis result corresponding to the performance analysis instruction.
S740: and displaying the performance analysis result to a user.
In this embodiment of the present invention, the performance analysis instruction may include one or more filtering conditions, where the filtering conditions may include an application type, an application version, a test device model, a test device system, a performance test scenario, a test time, and the like. The performance data in the database can be screened according to the performance analysis instruction of the tester and aiming at one or more screening conditions in the performance analysis instruction, the screened performance data is analyzed, and the product performance of the application program is analyzed in a multi-dimensional mode. For example, performance data of different applications may be filtered for horizontal comparison analysis to determine performance differences between the different applications, or performance data of different versions of the same application may be filtered for vertical comparison analysis to determine performance differences between a new version of the application and a previous version of the application.
In a specific embodiment, with reference to fig. 8 and fig. 9 of the specification, performance test may be performed on the APP of the application program to be tested, so as to obtain corresponding performance data. After the test is completed, the performance data of the application program to be tested and the corresponding competitive product APP can be transversely contrastively analyzed, the test results of different APPs are displayed on the same display page, and a user can quickly browse and analyze whether the application program to be tested has performance-related problems and which performance differences exist in the competitive product APP, so that the performance of the application program to be tested is well improved and provided. Specifically, as shown in fig. 8, performance data of an application program to be tested (e.g., penguin electric competition APP) and performance data of competition APPs (e.g., goby APP and tiger-tooth live broadcast APP) can be drawn with different lines, and comparison shows that in a corresponding test scene, which type of product has higher CPU occupancy, GPU occupancy, FPS and memory occupancy, and which type of product has lower occupancy, so that a user can perform performance optimization on the application program to be tested in a more targeted manner.
In another specific embodiment, with reference to fig. 10 of the specification, performance data of different versions of the same application program may be longitudinally compared and analyzed, and test results of different versions of the same application program are displayed on the same display page, so that a user may quickly browse and analyze a performance difference between a new version of the application program and a previous version of the application program, and promote performance optimization of an application program to be tested. As shown in fig. 10, performance data of a new version of application program (for example, the XX application program 5.6.0 version) and performance data of a previous version of application program (for example, the XX application program 5.5.0 version) may be drawn by using different lines, and it can be seen through comparison whether CPU occupation, GPU occupation, FPS occupation, and memory occupation of the new version of application program are optimized in a corresponding test scenario.
According to the performance testing method of the application program, the performance testing result is displayed by customizing the visual performance display page, so that the user can display the data when paying attention to the data, and the user requirements are better met. The abundant performance display pages can support multi-dimensional comparison, including comparison between different versions and different competitive products (such as comparison between performance data of historical versions and performance data of the competitive products), so that a user can pertinently analyze product performance problems according to test results, further pertinently optimize product performance, and improve user experience.
In a possible embodiment, referring to fig. 11 of the specification, a tester may find a performance problem of the application program to be tested through the performance test result, so as to guide development of the application program code and find some program code defects that cannot be found in terms of performance. After the tester modifies the application program code, the latest package can be reconstructed through a packaging platform (such as a blue shield platform), and then a new performance test is performed on the latest package. By the closed-loop mode, the APP performance can be continuously optimized, and the user experience is improved.
Referring to the specification, fig. 12 shows a structure of a performance testing apparatus 1200 for an application according to an embodiment of the present invention. As shown in fig. 12, the apparatus 1200 may include:
a first determining module 1210, configured to determine an application to be tested and a performance test scenario, where the performance test scenario includes at least one target operation;
the performance testing module 1220 is configured to invoke an interface provided by a performance testing tool, and control the application program to be tested to execute the at least one target operation in at least one target testing device;
a first obtaining module 1230, configured to invoke an interface provided by a performance monitoring tool, and obtain performance data of the at least one target test device;
the first processing module 1240 is configured to analyze and process the performance data to obtain a performance test result when the application program to be tested runs in the performance test scenario.
In one possible embodiment, the apparatus 1200 may further include:
the first display module is used for displaying the performance test result to a user;
and the storage module is used for storing the performance data and the performance test result into a database.
In one possible embodiment, the apparatus 1200 may further include:
the second determination module is used for determining one or more screening conditions corresponding to the performance analysis instruction when the performance analysis instruction is received;
a second obtaining module, configured to obtain, from the database, the performance data that meets the one or more filtering conditions as target performance data;
the second processing module is used for analyzing and processing the target performance data to obtain a performance analysis result corresponding to the performance analysis instruction;
and the second display module is used for displaying the performance analysis result to a user.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, the division of each functional module is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatuses provided in the above embodiments and the corresponding method embodiments belong to the same concept, and specific implementation processes thereof are detailed in the corresponding method embodiments, and are not described herein again.
An embodiment of the present invention further provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the performance testing method for the application program provided in the above method embodiment.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and data processing by operating the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
In a specific embodiment, fig. 13 shows a schematic hardware structure of an electronic device for implementing the method provided by the embodiment of the present invention, where the electronic device may be a computer terminal, a mobile terminal, or another device, and the electronic device may also participate in forming or including the apparatus provided by the embodiment of the present invention. As shown in fig. 13, the electronic device 1300 may include one or more computer-readable storage media, a memory 1310, one or more processors 1320, an input unit 1330, a display unit 1340, Radio Frequency (RF) circuits 1350, a wireless fidelity (WiFi) module 1360, and a power source 1370. Those skilled in the art will appreciate that the electronic device configuration illustrated in fig. 13 does not constitute a limitation of the electronic device 1300, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the memory 1310 may be used to store software programs and modules, and the processor 1320 may execute various functional applications and data processing by operating or executing the software programs and modules stored in the memory 1310 and calling data stored in the memory 1310. The memory 1310 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 1310 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device. Accordingly, memory 1310 may also include a memory controller to provide processor 1320 with access to memory 1310.
The processor 1320 is a control center of the electronic device 1300, connects various parts of the whole electronic device using various interfaces and lines, performs various functions of the electronic device 1300 and processes data by operating or executing software programs and/or modules stored in the memory 1310 and calling data stored in the memory 1310, thereby monitoring the whole electronic device 1300. The Processor 1320 may be a central processing unit, or may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input unit 1330 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, the input unit 1330 may include an image input device 1331 and other input devices 1332. The image input device 1331 may be a camera or an electro-optical scanning device. The input unit 1330 may include other input devices 1332 in addition to the image input device 1331. In particular, other input devices 1332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1340 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 1340 may include a Display panel 1341, and optionally, the Display panel 1341 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The RF circuit 1350 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink information from a base station and processing the received downlink information by the one or more processors 1320; in addition, data relating to uplink is transmitted to the base station. In general, RF circuit 1350 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 1350 can also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
WiFi belongs to short-range wireless transmission technology, and the electronic device 1300 can help the user send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 1360, and it provides wireless broadband internet access for the user. Although fig. 13 shows the WiFi module 1360, it is understood that it does not belong to the essential constitution of the electronic device 1300, and may be omitted entirely as needed within a scope not changing the essence of the invention.
The electronic device 1300 also includes a power supply 1370 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1320 via a power management system that may be configured to manage charging, discharging, and power consumption. The power supply 1370 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
It should be noted that, although not shown, the electronic device 1300 may further include a bluetooth module, and the like, which is not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, which may be disposed in an electronic device to store at least one instruction or at least one program for implementing a performance testing method of an application program, where the at least one instruction or the at least one program is loaded and executed by the processor to implement the performance testing method of the application program provided in the foregoing method embodiment.
Optionally, in an embodiment of the present invention, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
An embodiment of the invention also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the performance testing method of the application program provided in the various alternative embodiments.
It should be noted that: the sequence of the above embodiments of the present invention is only for description, and does not represent the advantages or disadvantages of the embodiments. And that specific embodiments have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A performance testing method of an application program is characterized by comprising the following steps:
determining an application program to be tested and a performance test scene, wherein the performance test scene comprises at least one target operation;
calling an interface provided by a performance testing tool, and controlling the application program to be tested to execute the at least one target operation in at least one target testing device;
calling an interface provided by a performance monitoring tool to acquire performance data of the at least one target test device;
and analyzing and processing the performance data to obtain a performance test result of the application program to be tested when the application program to be tested runs in the performance test scene.
2. The method according to claim 1, wherein after analyzing and processing the performance data to obtain a performance test result of the application program to be tested when running in the performance test scenario, the method further comprises:
displaying the performance test result to a user;
and storing the performance data and the performance test result into a database.
3. The method of claim 2, further comprising:
when a performance analysis instruction is received, determining one or more screening conditions corresponding to the performance analysis instruction;
obtaining the performance data meeting the one or more screening conditions from the database as target performance data;
analyzing and processing the target performance data to obtain a performance analysis result corresponding to the performance analysis instruction;
and displaying the performance analysis result to a user.
4. The method according to any one of claims 1 to 3, wherein the invoking an interface provided by a performance testing tool, controlling the application under test to perform the at least one target operation in at least one target testing device comprises:
acquiring first interface information corresponding to the at least one target operation;
generating a first interface calling request according to the application program to be tested, the at least one target test device and the first interface information;
and sending the first interface calling request to the performance testing tool so that the performance testing tool controls the application program to be tested to execute the at least one target operation in the at least one target testing device according to the first interface information.
5. The method according to any one of claims 1 to 3, wherein the invoking an interface provided by a performance monitoring tool to obtain performance data of the at least one target test device comprises:
acquiring second interface information corresponding to data acquisition operation;
generating a second interface calling request according to the application program to be tested, the at least one target test device and the second interface information;
and sending the second interface calling request to the performance monitoring tool so that the performance monitoring tool collects the performance data of the at least one target test device when the application program to be tested runs in the performance test scene according to the second interface information.
6. The method of claim 5, wherein the invoking an interface provided by a performance monitoring tool to obtain performance data of the at least one target test device further comprises:
acquiring third interface information corresponding to data reporting operation;
generating a third interface calling request according to the application program to be tested, the at least one target test device and the third interface information;
and when the test is finished, sending the third interface calling request to the performance monitoring tool so that the performance monitoring tool reports the performance data of the at least one target test device according to the third interface information.
7. The method according to any one of claims 1 to 3, wherein the analyzing the performance data to obtain the performance test result of the application program to be tested when running in the performance test scenario comprises:
acquiring a performance data set corresponding to each performance data type;
and respectively analyzing and processing the performance data sets corresponding to the performance data types to obtain performance test results corresponding to the performance data types.
8. An apparatus for testing performance of an application program, comprising:
the device comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining an application program to be tested and a performance test scene, and the performance test scene comprises at least one target operation;
the performance testing module is used for calling an interface provided by a performance testing tool and controlling the application program to be tested to execute the at least one target operation in at least one target testing device;
the first acquisition module is used for calling an interface provided by a performance monitoring tool and acquiring the performance data of the at least one target test device;
and the first processing module is used for analyzing and processing the performance data to obtain a performance test result of the application program to be tested when the application program to be tested runs in the performance test scene.
9. An electronic device, characterized in that the electronic device comprises a processor and a memory, wherein at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded by the processor and executed to implement the performance testing method of the application program according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein at least one instruction or at least one program is stored in the computer-readable storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the method for testing performance of an application according to any one of claims 1 to 7.
CN202110292285.0A 2021-03-18 2021-03-18 Method, device and equipment for testing performance of application program and storage medium Pending CN115114141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110292285.0A CN115114141A (en) 2021-03-18 2021-03-18 Method, device and equipment for testing performance of application program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110292285.0A CN115114141A (en) 2021-03-18 2021-03-18 Method, device and equipment for testing performance of application program and storage medium

Publications (1)

Publication Number Publication Date
CN115114141A true CN115114141A (en) 2022-09-27

Family

ID=83323640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110292285.0A Pending CN115114141A (en) 2021-03-18 2021-03-18 Method, device and equipment for testing performance of application program and storage medium

Country Status (1)

Country Link
CN (1) CN115114141A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490375A (en) * 2022-01-24 2022-05-13 腾讯科技(深圳)有限公司 Method, device and equipment for testing performance of application program and storage medium
CN117033250A (en) * 2023-10-08 2023-11-10 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for testing office application

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490375A (en) * 2022-01-24 2022-05-13 腾讯科技(深圳)有限公司 Method, device and equipment for testing performance of application program and storage medium
CN114490375B (en) * 2022-01-24 2024-03-15 腾讯科技(深圳)有限公司 Performance test method, device, equipment and storage medium of application program
CN117033250A (en) * 2023-10-08 2023-11-10 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for testing office application
CN117033250B (en) * 2023-10-08 2024-01-23 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for testing office application

Similar Documents

Publication Publication Date Title
CN104699598B (en) Automated testing method, device, equipment and system
CN112333057B (en) Intelligent household equipment distribution network testing method and device, executive machine and storage medium
CN107741844B (en) Method and device for generating application installation package
CN105657791A (en) Communication network access method and device
CN106294108B (en) Application program testing method and device
CN109548103B (en) Method and apparatus for switching networks
US9179341B2 (en) Method and system for simplifying WiFi setup for best performance
CN108132850B (en) Code positioning method and device and electronic equipment
EP2894900A1 (en) Method, mobile terminal and system for counting coverage blind spots in wireless network
CN104834529A (en) Method and device for optimizing performance of application
CN110784879B (en) Network mode switching test method, system, equipment and medium of communication module
CN115114141A (en) Method, device and equipment for testing performance of application program and storage medium
CN110362460B (en) Application program performance data processing method, device and storage medium
CN104468288A (en) Terminal network data testing method and device
WO2022236217A1 (en) System and method for identification, selection and validation of best network access for iot devices
CN105744600B (en) Communication network cut-in method and user equipment
CN105279077A (en) Method and device for automated testing
CN111050333A (en) Base station automatic test method and system
KR101993778B1 (en) Apparatus and Method for Displaying Indicator According to Interwork Network
CN112611922A (en) Base station electromagnetic radiation monitoring method and device
CN110198324A (en) Data monitoring method, device, browser and terminal
CN115190057A (en) Automatic testing method and device and electronic equipment
CN110932803B (en) Interference intensity acquisition method, device, terminal and storage medium
CN110662242B (en) Antenna feeder system detection method, network management equipment and computer readable storage medium
Díaz-Zayas et al. Remote control and instrumentation of Android devices

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