当前位置:网站首页>APP special test: traffic test
APP special test: traffic test
2022-08-01 22:07:00 【Test Cortana】
The power and flow test of mobile phones is mainly to think from the user's point of view. After all, the power consumption and flow consumption are large, which will affect the customer's experience.The battery usage of the mobile phone is proportional to the CPU usage.
Because there are no detailed regulations for this performance after all, only a general range can be given. The CPU usage rate cannot exceed 10%, and the traffic flow cannot exceed 10M. Generally, data can be obtained through some monitoring software on the Android mobile phone.The software includes Emmagee, GT
Traffic testing should pay attention to the test items
1) Traffic prompt when the app is first launched;
2) The average traffic value of the app running continuously for 2 hours in the background;
3) The average flow value applied at the operating limit (big data transmission)
4) Test for the application main process method involved in the scenario method
5) Average at first login (multi-device test)
Use tcpdump to capture traffic packets, capture steps
1) Copy the tcpdump file to the /data/locla directory:
adb push
tcpdump
/data/local
tcpdump download address: http://www.tcpdump.org/
2) Modify file permissions:
adb
shell
chmod
777
/data/
local/tcp/tcpdump
3) Determine whether you have root permissions: adb shell (# is displayed in front of the command line, indicating that you already have root permissions)
After the # enter:
/
data
/
local
/
tcpdump
-s
0
-w
/
data
/
capture.pcap
-
v
Details:
-s: The default capture length is 8 bytes when capturing data packets, plus -s 0 means capture complete data packet information;
-v: Displays the current number of packages during command execution;
-w:/data/captrue.pcap: Indicates that the captured data package file is saved in the /data folder of the Android virtual machine
Execution error here (to be resolved)
4) Drag the captured data packet captrue.pcap to the local (specified location such as d:)
adb
pull
/data
/
capture.pcap
Analyze with wireshark: find the flow of packets.Click on Statistics==>Capture file properties (analyze data according to development documentation)
Scenario traffic saving method
1) Data is compressed without affecting the experience and functions, such as web page js file compression, image compression.(compress and remove spaces to save traffic)
2) The use of different data formats, such as the use of json format as the interface return format is usually smaller than the XML format
3) Optimize data download, such as split-screen loading to reduce traffic loss
4) Local cache, which can temporarily cache some pictures and js files obtained by the client to reduce network data loading
5) Design different strategies for different network types, such as manually downloading pictures from 2g/3g networks to optimize the network
Learning resource sharing
Finally, I would like to thank everyone who has read my article carefully. Watching the rise and attention of fans all the way, there is always a need for gifts. Although it is not a very valuable thing, if you can use it, you can take it directly.
These materials should be the most comprehensive and complete preparation warehouse for friends who do [software testing]. This warehouse has also accompanied me through the most difficult journey. I hope it can also help you!Everything should be done as early as possible, especially in the technology industry, and the technical foundation must be improved.Hope it will be helpful to you all...
If you don't want to experience the feeling that you can't find any information during self-study, no one answers your questions, and give up after a few days, you can join my QQ group below to discuss and exchange, there are also various softwareTest data and technical exchange.
边栏推荐
- Based on php tourism website management system acquisition (php graduation design)
- 【Verilog刷题篇】硬件工程师从0到入门1|基础语法入门
- 图论——强连通分量缩点+拓扑排序
- 46.全排列
- The thing about npm
- KMP 字符串匹配问题
- ImportError: `save_weights` requires h5py. Problem solved
- NgRx Store createSelector 的单步调试和源代码分析
- SOM Network 1: Principles Explained
- [Mobile Web] Mobile terminal adaptation
猜你喜欢
How to add a game character to a UE4 scene
小程序毕设作品之微信美食菜谱小程序毕业设计成品(8)毕业设计论文模板
[ASM] Bytecode Operation MethodWriter
高等代数_证明_矩阵的任意特征值的代数重数大于等于其几何重数
【开源】Sentinel高性能高可用集群限流解决方案
工程建筑行业数据中台指标分析
The must-have "fishing artifact" for programmers is here!
_ _ determinant of a matrix is higher algebra eigenvalue of the product, the characteristic value of matrix trace is combined
小程序毕设作品之微信美食菜谱小程序毕业设计成品(7)中期检查报告
365天挑战LeetCode1000题——Day 046 生成每种字符都是奇数个的字符串 + 两数相加 + 有效的括号
随机推荐
【C语言实现】两种计算平均成绩题型,博主精心整理,值得一读
PAM 回文自动机
365 days challenge LeetCode1000 questions - Day 046 Generate a string with odd number of each character + add two numbers + valid parentheses
解决 win10 下 ISE14.7的 iMPACT 崩溃问题 - FPGA 笔记
LeetCode952三部曲之一:解题思路和初级解法(137ms,超39%)
Delicious this year
Based on php animation peripheral mall management system (php graduation design)
Based on php tourism website management system acquisition (php graduation design)
Based on php online learning platform management system acquisition (php graduation design)
【C语言实现】最大公约数的3种求法
The thing about npm
[深入研究4G/5G/6G专题-48]: 5G Link Adaption链路自适应-4-下行链路自适应DLLA-PDCCH信道
PAM Palindromic Automata
SQL injection of WEB penetration
小程序毕设作品之微信体育馆预约小程序毕业设计成品(3)后台功能
罗克韦尔AB PLC RSLogix5000中的比较指令使用方法介绍
SAP Spartacus NgExpressEngineDecorator 的工作原理
SOM Network 1: Principles Explained
shell specification and variables
9. SAP ABAP OData 服务如何支持删除(Delete)操作