当前位置:网站首页>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.
边栏推荐
猜你喜欢
随机推荐
The Microsoft campus ambassador to shout you to autumn recruit!
[ASM] Bytecode Operation MethodWriter
感觉自己好傻
0DFS Medium LeetCode6134. Find the closest node to the given two nodes
恒星的正方形问题
No more rolls!After joining ByteDance for a week, he ran decisively.
模拟数据之mockjs
小程序毕设作品之微信体育馆预约小程序毕业设计成品(4)开题报告
LeetCode952三部曲之二:小幅度优化(137ms -> 122ms,超39% -> 超51%)
leetcode 204. Count Primes 计数质数 (Easy)
SOM Network 1: Principles Explained
shell programming conventions and variables
迁移学习——Discriminative Transfer Subspace Learning via Low-Rank and Sparse Representation
APP专项测试:流量测试
SAP Spartacus Accessibility E2E 端到端测试
基于 OData 模型和 JSON 模型的 SAP UI5 表格控件行项目的添加和删除实现
KMP 字符串匹配问题
2022-08-01 第八组 曹雨 泛型 枚举
Shell programming conditional statement
解决 win10 下 ISE14.7的 iMPACT 崩溃问题 - FPGA 笔记