Android Special test

Source: Internet
Author: User

The app performance test metrics are as follows:
1. Resource consumption
2. Memory leaks
3. Power consumption
4. Time-consuming
5. Network traffic consumption
6, mobile terminal related resource utilization
7. Frame rate
8, rendering and so on ....
The test flow profile includes but is not limited to the following points:
Component initialization time (business party burial point)
App Start-up time (cold start, hot start)
CPU consumption (active, silent)
PSS memory consumption (active, silent State)//cannot root phone, so no USS battery temperature change (active, silent) FPS hardware render out frame number single frame rendering average time single frame detection processing time (business party buried point)
OS Version: 4.4, 5.0, 5.1, 4.2, 4.3, 6.0, 4.0
Brand coverage: Huawei, Xiaomi, Nexus, VIVO, cool, cool, Samsung, hammer
Resolution overlay: 1920x1080, 2560x1440, 1280x720, 854X480
Business Scenario: A test scenario that is set up for business features is not in this table.
FPS test:
1, Concept: FPS is the definition of the field of image, refers to the frame number of frames per second, popular refers to the animation or video screen number. FPS is the measurement of the amount of information used to save and display dynamic video. The greater the number of frames per second, the smoother the displayed action will be.
The standard: Frame rate is not higher than 16ms, for Android system. At this point in the command output there will be a matrix data, calculate the matrix in the frame rate is greater than 16 of the proportion of points, that is, the lag ratio.
The scheme is as follows:
1. By command: Dumpsys Surfaceflinger | grep "|....|" gets the name of the current pinned window
2. History 127 rows of data, 60 frames can be recorded 2.12S data, so as not frequently obtained. (Finally, consider setting the 1.6S interval to refresh the data.) )
3. Periodically clear 0 re-record, to avoid how to distinguish which data is the last time. Command: Dumpsys surfaceflinger--latency-clear
4. There is a refresh to calculate the frame rate, no refresh does not output data, sometimes take the FPS is 1, this is the reason
5. Calculate FPS, drop frame rate, maximum frame interval for each sample data greater than or equal to 1 frames
6. Increased single-frame average rendering time statistics for business needs
Memory test:
Test subkey in memory test:
1) application memory consumption in idle state
2) application memory consumption in medium size state
3) application memory consumption in full spec state
4) Apply Memory peak condition
5) Application of memory leaks
6) Whether the application resides in memory
7) Memory usage after stress test
Memory problem Phenomenon:
1) Memory jitter
2) Large memory objects are assigned
3) Increased memory
4) Frequent GC

Memory Data acquisition:
1. Various Linux commands (top, free, meminfo ...) )
2, through the Dumpsys
ADB shell Dumpsys meminfo [pakagename | pid]
3, through the/system/xbin/procrank tool
ADB Shell Procrank
5. Android check for memory leak steps:
1. Run Monkey for stress test:
adb shell monkey-p Cn.microinvestment.weitou--pct-touch--ingore-crashes--throttle 1000-s 100-v-V 50
2, monitor the memory value, if there is a large increment exception, save the Hprof file (the Hprof file is a heap snapshot of the Java Virtual Machine) to analyze the command to view the application memory:
adb shell Dumpsys meminfo Cn.microinvestment.weitou (process name)
If memory is found to be too large, save the Hprof file: adb shell am dumpheap < process name > < save path >
3, Analysis Hprof file
Use the tool mat to see, first of all, this hprof file is converted to a mat-readable file
There is a Hprof-conv command in the Android SDK tool:
Hprof-conv < original hprof file path > < converted Hprof path >
Hprof-conv a.hprof B.hprof
4. Open the converted Hprof file with the Mat tool
General selection Leak Suspects report (SQL statement to query if the object has not been released, if there are multiple identical objects, there will be a memory leak problem)

Android Special test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.