App-specific performance test test indicators and test methods

I haven’t done performance testing of the app at work, but you have asked about it in an interview, and now I will summarize it as follows

1. First load (cold start) 

A. Use logcat to monitor activitymanager

B.adb shell am start -w

C. Manual stopwatch counting

2. Not the first start (hot start)

After running in the background, there should be a method to monitor directly with cold start

3. Memory test

A. Use the monitor of the android sdk to observe on the core function page

B.monkey random events, adb shell dumpsys meminfo monitor memory usage per second

4. CPU usage test

A.monkey random events, adb shell dumpsys cpuinfo monitor memory usage per second

B. Use top to monitor the usage per second on the specific page

5. Power consumption

A. Use third-party tools available in the market, such as Jinshan battery, housekeeper, etc.

B. Through self-writing tools, there are generally 3 methods used here

a. The first one is based on powermanager and wakelock provided by android

b. The second is more complicated, the calculation of power consumption = CPU consumption + vakelock consumption + data transmission consumption + cps consumption + wifi connection consumption

c. The third one is obtained through adb shell dumpsys battery

6. Data usage

A. Third-party traffic treasure and the like

B. Packet capture tool, such as tcpdump

C.adb shell cat proc/uid_stat/(uid#)/tcp_rcv

   adb shell cat proc/uid_stat/(uid#)/tcp_snd

D.adb shell cat /proc/net/xt_qtaguid/stats | grep uid

7. UI performance test

Turn on CPU rendering in the developer

8. fps test (transmission frames per second)

A.adb shell dumpsys gfxinfo "application name" > fps.txt The common situation is that it should be about 16ms and 60 frames per second

B. You can use the HierarchyViewer tool to analyze

9. Image compression

Capture the app's request to get the size of the picture

10. Cache test

A. The comparison between viewing the picture list for the first time and viewing the picture capture package for the second time

B. Comparison of city distribution for the first time and city classification capture for the second time

 Summarize:

Thanks to everyone who read my article carefully! ! !

I personally sorted out some technical materials I have compiled in my software testing career in the past few years, including: e-books, resume modules, various job templates, interview books, self-study projects, etc. Everyone is welcome to leave a message in the comment area 333 to get it for free, don't miss it.

Guess you like

Origin blog.csdn.net/manbskjabgkb/article/details/131922109