Special classification
a , special performance-memory
1. OOM: One-time allocation of insufficient memory, exceeding the maximum memory limit of the Android process, bursting memory. A persistent content leak causes insufficient memory.
2. Low memory Killer: When the remaining memory of the mobile phone is below the cordon, the low memory Killer will spike the process in the background.
3. Frequent GC:JVM when a virtual machine is in the GC, other threads are suspended in addition to the GC thread. Improper memory usage leads to frequent GC-induced Dayton.
Second, special performance-CPU
1. CPU Redundancy use: The code is bad, the algorithm is not efficient, the variable type is unreasonable, the CPU brings an additional burden, not only the implementation of low efficiency and high power consumption
2. CPU Resource Scramble: Preemptive main thread CPU resource caused UI Kaka, CPU core number and thread number mismatch result in inefficiency
3. Low CPU utilization: Low CPU utilization results in a long execution time, such as: single thread, synchronous initialization, resulting in a long boot time
Third, special performance-network traffic
1. Round-trip time (RTT, round trip delay): The main decision depends on the interface resources of the page load times, by the network, service architecture and other aspects of the impact
2. Request Traffic Bandwidth: Users and companies have to pay for the traffic charges, traffic also affects RTT.
Iv. Special performance-load time
Page first renders theme structure and static content (T1), network requests Dynamic Data content (T2), re-renders populated dynamic data content (T3), page load total duration =t1 + T2 + T3
V. UI Kaka
Less than 24FPS human eye will perceive discontinuity, less than 30FPS can not express the beautiful picture. CPU problems (unnecessary layout and aging), GPU problems (over-Drawing) can cause UI Kaka.
Six, start time
1. Cold start
2. Hot start
3. First Boot
Vii. stability
1. Monkey
2. Smart traversal: Iterate through the elements of the click Page based on the depth-first or breadth-first algorithm to click on the element in the app as much as possible to see where the exception occurs
3. Weak network test: simulation of different bandwidth and packet loss rate of the low-net environment of the app's running state, often with UI Automation combined.
Viii. compatibility
1. Brand
2. System
3. Resolution
Nine, security
1. Sensitive information encryption: Encrypted storage of sensitive information, such as account password, to avoid plaintext storage. Sensitive information transmission encryption, and the use of HTTPS security protocol.
2. Code obfuscation: Translating program code into a functionally equivalent but difficult-to-read and understandable form of behavior. If the name of a variable, function, class is rewritten as a meaningless name, the for loop is rewritten as a while loop, the loop is rewritten as recursive, the intermediate variable is streamlined, and so on.
3. APK Shell: The shell program can effectively prevent the disassembly of the program analysis, so as to protect the software copyright, to avoid being cracked. Android Dex file packers, typically require shell programs, shell programs and source programs.
Tool Set
Tool Set |
Memory |
Cpu |
Flow |
Fluid level |
Power consumption |
Discover problems |
adb Shell Dumpsys Meminfo | grep PackageName |
adb Shell Dumpsys Cpuinfo | grep PackageName |
ADB Shell CAT/PROC/UID_STAT/<UID>/TCP_RCV ADB Shell cat/proc/uid_stat/<uid>/tcp_snd |
ADB Shell Dumpsys Gfxinfo ADB Shell Dumpsys Sufaceflinger |
Battery Historian |
Positioning problems |
Memory Monitor MAT Leakcanary |
TraceView Systrace |
Wireshark |
Hierarchy Viewer CPU over-rendering detection |
Battery Historian |
The theory foundation of front-end app special testing