当前位置:网站首页>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.
边栏推荐
- SQL injection of WEB penetration
- 如何理解 new (...args: any[]) => any
- 小程序毕设作品之微信体育馆预约小程序毕业设计成品(2)小程序功能
- 威纶通触摸屏如何打开并升级EB8000旧版本项目并更换触摸屏型号?
- No more rolls!After joining ByteDance for a week, he ran decisively.
- 还在纠结报表工具的选型么?来看看这个
- SAP Spartacus NgExpressEngineDecorator 的工作原理
- User Experience | How to Measure User Experience?
- kubernetes CoreDNS全解析
- ImportError: `save_weights` requires h5py. Problem solved
猜你喜欢
程序员必备的 “ 摸鱼神器 ” 来了 !
APP专项测试:流量测试
深度学习Course2第二周Optimization Algorithms习题整理
Raspberry Pi information display small screen, display time, IP address, CPU information, memory information (C language), four-wire i2c communication, 0.96-inch oled screen
365 days challenge LeetCode1000 questions - Day 046 Generate a string with odd number of each character + add two numbers + valid parentheses
一种灵活的智能合约协作方式
模拟数据之mockjs
【C语言实现】最大公约数的3种求法
入门数据库Days4
Postman 批量测试接口详细教程
随机推荐
familiar friend
模拟数据之mockjs
feel so stupid
熟悉的朋友
HCIP---Multiple Spanning Tree Protocol related knowledge points
9. SAP ABAP OData 服务如何支持删除(Delete)操作
还在纠结报表工具的选型么?来看看这个
SOM Network 2: Implementation of the Code
SAP Spartacus Accessibility E2E 端到端测试
感觉自己好傻
字符串——Trie
10 Practical Uses of NFTs (NFT System Development)
Recycling rental system 100% open source without encryption Mall + recycling + rental
shell programming conventions and variables
2022 edition of MySQL tutorial, top collection good, take your time
程序员必备的 “ 摸鱼神器 ” 来了 !
xctf攻防世界 Web高手进阶区 web2
Still struggling with reporting tool selection?To take a look at this
leetcode 204. Count Primes 计数质数 (Easy)
小程序毕设作品之微信美食菜谱小程序毕业设计成品(5)任务书