[android]android自動化測試三之設定AVD各項引數
有時候我們需要設定虛擬機器的語言地區等,我們可以使用-prop引數,例如日本。
The -prop command line option allows us to set any of the properties we could set:
$ emulator -avd test -no-window -no-audio -no-boot-anim -port 5580
-prop persist.sys.language=ja -prop persist.sys.country=JP &
To verify that our settings were successful, we can use the getprop command to
verify them, for example:
$ adb –s emulator-5580 shell "getprop persist.sys.language"
ja
$ adb –s emulator-5580 shell "getprop persist.sys.country"
JP
If you want to clear all the user data after playing with the persistent settings, you
can use the following command:
$ adb -s emulator-5580 emu kill
$ emulator -avd test -no-window -no-audio -no-boot-anim -port 5580\
-wipe-data
And the emulator will start afresh.
有的時候我們需要指定虛擬機器需要用得網路環境,網路型別以及網速。
Option Description Speeds [kbits/s]
-netspeed gsm GSM/CSD up: 14.4, down: 14.4
-netspeed hscsd HSCSD up: 14.4, down: 43.2
-netspeed gprs GPRS up: 40.0, down: 80.0
-netspeed edge EDGE/EGPRS up: 118.4, down: 236.8
-netspeed umts UMTS/3G up: 128.0, down: 1920.0
-netspeed hsdpa HSDPA up: 348.0, down: 14400.0
-netspeed full no limit up: 0.0, down: 0.0
-netspeed <num> select both upload and up: as specified, down: as
download speed specified
-netspeed <up>:<down> select individual up and up: as specified, down: as
down speed specified
-netdelay gprs GPRS min 150, max 550
-netdelay edge EDGE/EGPRS min 80, max 400
-netdelay umts UMTS/3G min 35, max 200
-netdelay none no latency min 0, max 0
-netdelay <num> select exact latency latency as specified
-netdelay <min>:<max> select min and max latencies minimum and maximum
latencies as specified
This is an example of an emulator using these options to select the GSM network
speed of 14.4 kbits/sec and a GPRS latency of 150 to 500 msec.
$ emulator -avd test -port 5580 -netspeed gsm -netdelay gprs
The -prop command line option allows us to set any of the properties we could set:
$ emulator -avd test -no-window -no-audio -no-boot-anim -port 5580
-prop persist.sys.language=ja -prop persist.sys.country=JP &
To verify that our settings were successful, we can use the getprop command to
verify them, for example:
$ adb –s emulator-5580 shell "getprop persist.sys.language"
ja
$ adb –s emulator-5580 shell "getprop persist.sys.country"
JP
If you want to clear all the user data after playing with the persistent settings, you
can use the following command:
$ adb -s emulator-5580 emu kill
$ emulator -avd test -no-window -no-audio -no-boot-anim -port 5580\
-wipe-data
And the emulator will start afresh.
有的時候我們需要指定虛擬機器需要用得網路環境,網路型別以及網速。
Option Description Speeds [kbits/s]
-netspeed gsm GSM/CSD up: 14.4, down: 14.4
-netspeed hscsd HSCSD up: 14.4, down: 43.2
-netspeed gprs GPRS up: 40.0, down: 80.0
-netspeed edge EDGE/EGPRS up: 118.4, down: 236.8
-netspeed umts UMTS/3G up: 128.0, down: 1920.0
-netspeed hsdpa HSDPA up: 348.0, down: 14400.0
-netspeed full no limit up: 0.0, down: 0.0
-netspeed <num> select both upload and up: as specified, down: as
download speed specified
-netspeed <up>:<down> select individual up and up: as specified, down: as
down speed specified
-netdelay gprs GPRS min 150, max 550
-netdelay edge EDGE/EGPRS min 80, max 400
-netdelay umts UMTS/3G min 35, max 200
-netdelay none no latency min 0, max 0
-netdelay <num> select exact latency latency as specified
-netdelay <min>:<max> select min and max latencies minimum and maximum
latencies as specified
This is an example of an emulator using these options to select the GSM network
speed of 14.4 kbits/sec and a GPRS latency of 150 to 500 msec.
$ emulator -avd test -port 5580 -netspeed gsm -netdelay gprs
相關文章
- [android]android自動化測試七之動態AVD硬體引數Android
- [android]android自動化測試二之命令列建立AVDAndroid命令列
- [android]Monkey自動化測試引數Android
- [android]android自動化測試十之單元測試例項Android
- [android]android自動化測試八之讓你的AVD無法連線網路Android
- [android]android自動化測試十三之sciroccoAndroid
- [android]android自動化測試五之RobolectricAndroid
- [android]android自動化測試十三之monkeyRunner自動化框架Android框架
- [android]android自動化測試十四之dumpsys效能測試Android
- [android]android自動化測試Android
- Android 自動化測試之 MonkeyAndroid
- [android]android自動化測試十五之junitRepoterAndroid
- [android]android自動化測試九之monkeyRecordAndroid
- Junit測試Android自動化測試Android
- [Android]android自動化測試十六之calabash-androidAndroid
- [android]android自動化測試六之命令列編譯APKAndroid命令列編譯APK
- [android]android自動化測試十三之JavaMonkey跨APP操作AndroidJavaAPP
- [android]android自動化測試十二之程式碼控制截圖Android
- [android]android自動化測試四之Monkey與MonkeyRunnerAndroid
- Android 談談自動化測試Android
- Android自動化測試解決方案Android
- Android自動化測試之Monkeyrunner從零開始Android
- android自動化測試六之命令列編譯APKAndroid命令列編譯APK
- Android 程式設計師必須掌握的三種自動化測試方法Android程式設計師
- 測試開發之自動化篇-自動化測試框架設計框架
- Android自動化測試入門(四)單元測試Android
- android 5個自動化測試Ui框架AndroidUI框架
- [android]am自動化測試框架(原創)Android框架
- [android]android自動化測試十一之程式碼覆蓋率報告EMMAAndroid
- python3 selenium web自動化測試之excel引數化PythonWebExcel
- 如何設定自動化測試斷言?
- 自動化測試系列(三)|UI測試UI
- Android自動化測試工具實現簡述Android
- Android使用Espresso進行UI自動化測試AndroidEspressoUI
- Android 下的自動化測試工具總結Android
- Android UI 自動化測試實現過程AndroidUI
- 自動化測試系列 —— UI自動化測試UI
- 用Robotium對android進行自動化測試的探索Android