CN113407452A - APP power consumption testing method - Google Patents

APP power consumption testing method Download PDF

Info

Publication number
CN113407452A
CN113407452A CN202110705208.3A CN202110705208A CN113407452A CN 113407452 A CN113407452 A CN 113407452A CN 202110705208 A CN202110705208 A CN 202110705208A CN 113407452 A CN113407452 A CN 113407452A
Authority
CN
China
Prior art keywords
information
power consumption
app
mobile device
equipment
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
CN202110705208.3A
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.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network 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 Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202110705208.3A priority Critical patent/CN113407452A/en
Publication of CN113407452A publication Critical patent/CN113407452A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The application relates to an APP power consumption testing method, which comprises the following steps: after the connection with the mobile equipment is detected, acquiring equipment information of each mobile equipment, and judging the connection mode with each mobile equipment; if the connection mode is wireless connection, acquiring initial information of the mobile equipment; the initial information comprises first electric quantity information; controlling each mobile device to execute corresponding operation based on preset running data of a target APP, and acquiring second electric quantity information and monitoring information of each mobile device after the operation is finished; determining power consumption information of each mobile device according to the first power consumption information and the second power consumption information of each mobile device; and based on the equipment information, performing aggregation operation on the power consumption information and the monitoring information of each mobile equipment to generate a power consumption test report of the target APP. So, realized simultaneously to many mobile device APP's consumption test to need not integrated SDK, saved development time, promoted efficiency of software testing.

Description

APP power consumption testing method
Technical Field
The application relates to the technical field of power consumption testing, in particular to an APP power consumption testing method.
Background
With the rapid advance of the mobile terminal technology, the number of APP applications in the market is large, and the importance of APP testing is self-evident to test engineers. At the present stage, when a tester carries out automatic test of a mobile terminal, not only functional test and compatibility test need to be carried out, but also power consumption test of APP needs to be carried out.
In the related technology, testing tools such as Tencent GT and Bug Insight are generally adopted to access into corresponding SDKs to realize power consumption testing of APP, however, the testing method can only realize one-to-one power consumption testing, a plurality of mobile terminals cannot be operated simultaneously, when the number of models to be tested is large, a great amount of time and manpower of testing personnel are consumed to finish the testing one by one, and the testing efficiency is low.
Disclosure of Invention
In view of this, the present application aims to overcome the technical problem in the prior art that the test efficiency is low when performing power consumption test on a mobile terminal APP, and provides a method for testing APP power consumption.
In order to achieve the purpose, the following technical scheme is adopted in the application:
the application provides a method for testing APP power consumption, which is applied to an APP power consumption testing system, wherein the APP power consumption testing system comprises testing equipment and a plurality of mobile equipment which are respectively connected with the testing equipment; the method comprises the following steps:
after the connection with the mobile equipment is detected, acquiring equipment information of each piece of mobile equipment, and judging the connection mode with each piece of mobile equipment; the connection mode comprises wireless connection and wired connection;
if the connection mode is wireless connection, acquiring initial information of the mobile equipment; the initial information comprises first electric quantity information;
controlling each mobile device to execute corresponding operation based on preset running data of a target APP, and acquiring second electric quantity information and monitoring information of each mobile device after the operation is finished;
determining power consumption information of each mobile device according to the first power consumption information and the second power consumption information of each mobile device;
and based on the equipment information, performing aggregation operation on the power consumption information and the monitoring information of each mobile equipment to generate a power consumption test report of the target APP.
Optionally, the method further includes:
if the connection mode is wired connection, controlling each mobile device to execute corresponding operation based on the operation data, and acquiring the monitoring information of each mobile device after the operation is finished;
and based on the equipment information, carrying out aggregation operation on the monitoring information of each mobile equipment to generate a power consumption test report of the target APP.
Optionally, the determining power consumption information of each mobile device according to the first power consumption information and the second power consumption information of each mobile device includes:
comparing the first electric quantity information with the second electric quantity information of each mobile device to obtain electric quantity difference value information;
and using the power difference information of each mobile device as the power consumption information.
Optionally, the method further includes:
receiving a recording instruction input by a user, and determining the target APP according to the recording instruction;
and receiving operation information input by a user based on the target APP, and recording the running data of the target APP according to the operation information.
Optionally, the monitoring information includes: memory information, CPU information, uplink traffic information, and downlink traffic information.
The technical scheme provided by the application can comprise the following beneficial effects:
according to the scheme, the test equipment can be used for establishing connection with the mobile equipment, after the test equipment detects that the test equipment is connected with the mobile equipment, the equipment information of each piece of mobile equipment can be obtained, the connection mode with the mobile equipment is judged, if the connection mode is wireless connection, the initial information of the mobile equipment can be obtained, and the initial information comprises the first electric quantity information. And then, controlling each mobile device to execute corresponding operation based on preset running data of the target APP, and acquiring second electric quantity information and monitoring information of each mobile device after the operation is finished. And determining the power consumption information of each mobile device according to the first power consumption information and the second power consumption information of each mobile device. Based on the device information, aggregation operation can be performed on the power consumption information and the monitoring information of each mobile device, and finally a power consumption test report of the target APP is generated. Therefore, the labor force for one-to-one APP power consumption test is broken, not only is the simultaneous power consumption test of multiple mobile devices APP realized, but also the APP power consumption test can be carried out in the functional test, the SDK is not required to be integrated, the development time is effectively saved, and the test efficiency is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an APP power consumption test method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of a method for testing APP power consumption according to an embodiment of the present application. The embodiment of the application provides a method for testing APP power consumption, which can be applied to an APP power consumption testing system, wherein the APP power consumption testing system can comprise a testing device and a plurality of mobile devices respectively connected with the testing device. As shown in the figure, taking the execution of the test device side as an example, the method for testing APP power consumption may include at least the following implementation steps:
step 11, after detecting that the connection is established with the mobile equipment, acquiring equipment information of each mobile equipment, and judging a connection mode with each mobile equipment; the connection mode comprises wireless connection and wired connection.
In particular, the interface of the testing device may be connected to the ADB to ensure that the mobile device and the testing device are in a connected state. The ADB is used as a general command line tool and can be connected and communicated with the mobile equipment to realize the functions of controlling the mobile equipment, transmitting files with the mobile equipment, checking logs at the mobile equipment end, simulating the operation of the mobile equipment and the like. After the test equipment starts to perform the APP power consumption test, firstly, whether the connection is established with the mobile equipment is detected, and after the connection with the mobile equipment is determined, the step 12 is continuously executed; after determining that the connection with the mobile device is not established, the connection can be tried to be reestablished, or prompt information is sent to the user to prompt the user that the connection is not established currently, so that the user can respond in time.
Step 12, if the connection mode is wireless connection, acquiring initial information of the mobile equipment; the initial information includes first power information.
And step 13, controlling each mobile device to execute corresponding operation based on preset running data of the target APP, and acquiring second electric quantity information and monitoring information of each mobile device after the operation is finished.
Wherein, the monitoring information may include: the memory information, the CPU information, the uplink traffic information, and the downlink traffic information are main contents of the power consumption test.
And step 14, determining power consumption information of each mobile device according to the first power consumption information and the second power consumption information of each mobile device.
And step 15, performing aggregation operation on the power consumption information and the monitoring information of each mobile device based on the device information, and generating a power consumption test report of the target APP.
The specific implementation manner of performing aggregation operation by using the power consumption information and the monitoring information based on the device information may refer to the related art, and is not described herein again.
In this embodiment, a connection may be established between the test device and the plurality of mobile devices, after the test device detects that the connection is established between the test device and the mobile devices, the test device may acquire device information of each mobile device, and determine a connection mode with the mobile device, and if the connection mode is a wireless connection, may acquire initial information of the mobile device, where the initial information includes the first electric quantity information. And then, controlling each mobile device to execute corresponding operation based on preset running data of the target APP, and acquiring second electric quantity information and monitoring information of each mobile device after the operation is finished. And determining the power consumption information of each mobile device according to the first power consumption information and the second power consumption information of each mobile device. Based on the device information, aggregation operation can be performed on the power consumption information and the monitoring information of each mobile device, and finally a power consumption test report of the target APP is generated. Therefore, the labor force for one-to-one APP power consumption test is broken, not only is the simultaneous power consumption test of multiple mobile devices APP realized, but also the APP power consumption test can be carried out in the functional test, the SDK is not required to be integrated, the development time is effectively saved, and the test efficiency is greatly improved.
In practice, the mobile device may include, but is not limited to, a cell phone, a tablet computer, and the like.
When the test device is connected to the mobile device through the ADB, since the ADB supports both wired connection and wireless connection, after step 11, the method for testing the APP power consumption may further include: if the connection mode is wired connection, controlling each mobile device to execute corresponding operation based on the operation data, and acquiring monitoring information of each mobile device after the operation is finished; and based on the equipment information, performing aggregation operation on the monitoring information of each mobile equipment to generate a power consumption test report of the target APP.
In practical application, the main test contents of the power consumption test are electric quantity, memory, CPU, uplink flow and downlink flow. When the connection mode is wired connection, the wired connection part can provide electric quantity for the mobile equipment, so that the electric quantity test is not standard, and therefore, under the condition of wired connection, the related information of the electric quantity is not recorded, namely, the electric quantity is not tested. When the connection mode is wireless connection, the related information of the electric quantity can be recorded, namely the electric quantity needs to be tested. Therefore, when the connection mode is wired connection, the operation data is directly called without recording electric quantity information so as to complete the preset operation of the preset time of the mobile equipment, and meanwhile, the monitoring data of the mobile equipment, namely the memory information, the CPU information, the uplink flow information, the downlink flow information and the like of the mobile equipment are obtained after the operation is finished. And then, carrying out aggregation operation on the monitoring information of each mobile device to finally obtain a power consumption test report of the target APP.
In some embodiments, when the power consumption information of each mobile device is determined according to the first power information and the second power information of each mobile device, the first power information and the second power information of each mobile device may be compared to obtain power difference information; and then the power difference information of each mobile device is used as the power consumption information. Therefore, the power consumption information of each mobile device can be acquired, and the comprehensiveness of the APP power consumption test is ensured.
In step 13, when the operation data of the target APP is preset, the following may be specifically executed: receiving a recording instruction input by a user, and determining a target APP according to the recording instruction; and receiving operation information input by a user based on the target APP, and recording the running data of the target APP according to the operation information. Based on this, the tester can set up the operational data of target APP in advance after receiving the test task to use in the follow-up test procedure of being convenient for, saved test time, bring a lot of facilities for the tester.
In some embodiments, after determining the connection mode with the mobile device, the test device may further receive test data input by the user, that is, the user performs a certain time of operation on the mobile device in a manual simulation mode to obtain the monitoring data. When the monitoring data is acquired through manual operation, the test equipment is considered to be finished when detecting that the test data is not received within the first preset time, and the monitoring data is acquired.
The first preset time may be set according to actual needs, and is not limited herein.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (5)

1. The method for testing the power consumption of the APP is characterized by being applied to an APP power consumption testing system, wherein the APP power consumption testing system comprises testing equipment and a plurality of mobile devices which are respectively connected with the testing equipment; the method comprises the following steps:
after the connection with the mobile equipment is detected, acquiring equipment information of each piece of mobile equipment, and judging the connection mode with each piece of mobile equipment; the connection mode comprises wireless connection and wired connection;
if the connection mode is wireless connection, acquiring initial information of the mobile equipment; the initial information comprises first electric quantity information;
controlling each mobile device to execute corresponding operation based on preset running data of a target APP, and acquiring second electric quantity information and monitoring information of each mobile device after the operation is finished;
determining power consumption information of each mobile device according to the first power consumption information and the second power consumption information of each mobile device;
and based on the equipment information, performing aggregation operation on the power consumption information and the monitoring information of each mobile equipment to generate a power consumption test report of the target APP.
2. The method for APP power consumption testing as defined in claim 1, further comprising:
if the connection mode is wired connection, controlling each mobile device to execute corresponding operation based on the operation data, and acquiring the monitoring information of each mobile device after the operation is finished;
and based on the equipment information, carrying out aggregation operation on the monitoring information of each mobile equipment to generate a power consumption test report of the target APP.
3. The APP power consumption test method of claim 1, wherein determining power consumption information of each of the mobile devices according to the first power information and the second power information of each of the mobile devices comprises:
comparing the first electric quantity information with the second electric quantity information of each mobile device to obtain electric quantity difference value information;
and using the power difference information of each mobile device as the power consumption information.
4. The method of APP power consumption testing as defined in claim 1, further comprising:
receiving a recording instruction input by a user, and determining the target APP according to the recording instruction;
and receiving operation information input by a user based on the target APP, and recording the running data of the target APP according to the operation information.
5. The method for APP power consumption testing as defined in claim 1, wherein the monitoring information comprises: memory information, CPU information, uplink traffic information, and downlink traffic information.
CN202110705208.3A 2021-06-24 2021-06-24 APP power consumption testing method Pending CN113407452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110705208.3A CN113407452A (en) 2021-06-24 2021-06-24 APP power consumption testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110705208.3A CN113407452A (en) 2021-06-24 2021-06-24 APP power consumption testing method

Publications (1)

Publication Number Publication Date
CN113407452A true CN113407452A (en) 2021-09-17

Family

ID=77682969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110705208.3A Pending CN113407452A (en) 2021-06-24 2021-06-24 APP power consumption testing method

Country Status (1)

Country Link
CN (1) CN113407452A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150381467A1 (en) * 2014-06-25 2015-12-31 Blazemeter Ltd. System and method thereof for dynamically testing networked target systems through simulation by a mobile device
CN105467202A (en) * 2014-08-22 2016-04-06 深圳市中兴微电子技术有限公司 Method, device and terminal for power detection
CN106776330A (en) * 2016-12-26 2017-05-31 北京金山安全软件有限公司 Application testing method and device and electronic equipment
CN109189682A (en) * 2018-08-27 2019-01-11 广州云测信息技术有限公司 A kind of script method for recording and device
CN109726103A (en) * 2018-05-14 2019-05-07 平安科技(深圳)有限公司 Generation method, device, equipment and the storage medium of test report
CN110647453A (en) * 2019-09-18 2020-01-03 彩讯科技股份有限公司 Application performance comparison test method, system, equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150381467A1 (en) * 2014-06-25 2015-12-31 Blazemeter Ltd. System and method thereof for dynamically testing networked target systems through simulation by a mobile device
CN105467202A (en) * 2014-08-22 2016-04-06 深圳市中兴微电子技术有限公司 Method, device and terminal for power detection
CN106776330A (en) * 2016-12-26 2017-05-31 北京金山安全软件有限公司 Application testing method and device and electronic equipment
CN109726103A (en) * 2018-05-14 2019-05-07 平安科技(深圳)有限公司 Generation method, device, equipment and the storage medium of test report
CN109189682A (en) * 2018-08-27 2019-01-11 广州云测信息技术有限公司 A kind of script method for recording and device
CN110647453A (en) * 2019-09-18 2020-01-03 彩讯科技股份有限公司 Application performance comparison test method, system, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN111459794B (en) Communication network testing method, device, computer equipment and storage medium
CN106771972B (en) Automatic testing device, system and method for POS machine mainboard
CN111341090B (en) Bluetooth remote controller pressure measurement method, control device and computer readable storage medium
CN107038120B (en) Software testing method and device
EP3179321A1 (en) System and method for testing configuration and operation of i/o devices
CN108241560B (en) Memory test method and device and electronic equipment
CN111679652A (en) Test method and device based on smart screen, smart screen and readable storage medium
CN112148559A (en) Mobile APP power consumption test method, device and system, acquisition end and test end
CN111597083B (en) Testing system of intelligent terminal
CN114326677A (en) Vehicle machine testing method and device
CN112788640B (en) Communication equipment testing method and device, storage medium and terminal
KR100758850B1 (en) Appaturus and method for test using test script in mobile communication system
CN112867044A (en) Base station simulation test terminal, test method and device
CN112148599A (en) Performance pressure measurement method, device and equipment
CN113407452A (en) APP power consumption testing method
KR101794016B1 (en) Method of analyzing application objects based on distributed computing, method of providing item executable by computer, server performing the same and storage media storing the same
CN111026651A (en) Test method, test device, storage medium and electronic equipment
CN115499348A (en) Local communication micro application detection system and method
CN113238904B (en) Interface switching device, interface testing method and interface switching system
CN111541589B (en) Method, device and equipment for testing expansion module interface of intelligent terminal
CN111858208B (en) Standby function testing method, device, equipment and medium of processor chip
CN115685959A (en) Diagnostic write configuration test method, device, equipment and storage medium
CN115437865A (en) Method, device, equipment and medium for testing abnormal power failure of hard disk
CN112380121A (en) Automatic testing method and system for Internet of things equipment
CN105764086A (en) Terminal endurance performance detecting method and system

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