scaleout cli - nomeDeus/cli GitHub Wiki
事前準備
安裝pyCli套件
-
使用pip安裝
$ pip install pyCLI
-
從gitHub上下載
$ git clone git://github.com/whilp/cli.git
Python 執行 Server
$ python __init__.py
用法
python 執行 scaleout-cli.py 並使用參數
$ python scaleout-cli.py [options] [args]
選項
$ python scaleout-cli.py -h
usage: python scaleout-cli.py [options] [args]
optional arguments:
-h, --help show this help message and exit
-addr ADDRESS, --address ADDRESS Host IP address
-p PROJECT, --project PROJECT Test project name
-a APK, --apk APK Application APK
-t TEST_APK, --test-apk TEST_APK Test application APK
--small Small test project size
--medium Medium test project size
--large Large test project size
-os OS [OS ...] Android release
-api API [API ...] API Level
-devicetype DEVICETYPE [DEVICETYPE ...] Board Specifications
-display DISPLAY [DISPLAY ...] Density
-arch ARCH [ARCH ...] CPU
-s, --status Show devices status
查詢指令功能 (結果如上)
options |
---|
-h --help |
EX :
python scaleout-cli.py -h
設定IP位址
options |
---|
-addr --address |
EX :
python scaleout-cli.py --address 192.168.1.1:5000
備註:
格式為 IP Address:Port
IP預設為 127.0.0.1:5000
測試專案 / apk檔 / test_apk檔
options |
---|
-p --project |
-a --apk |
-t --test-apk |
EX :
python scaleout-cli.py --project story3 --apk app-mock-debug.apk --test-apk app-mock-debug-androidTest.apk
如果不使用 --apk
、 --test-apk
參數的話將直接進行測試
備註:
Server會去偵測有沒有此專案名稱的資料夾,如果沒有,測試將不會執行
加入條件
options |
---|
-os |
-api |
-devicetype |
-display |
-arch |
EX :
python scaleout-cli.py -project newstory -os 6.0 7.0 -display 640 -devicetype Smartphone -apk app-mock-debug.apk -test-apk app-mock-debug-androidTest.apk
備註:
1. 允許多個參數 (如: -os 4.0 5.0 6.0 7.0 -api 24 25)
2. 沒有用到的條件參數可以不用輸入
查詢裝置狀態
options |
---|
-s --status |
EX :
python scaleout-cli.py --status
指定Test大小
options |
---|
--small |
--medium |
--large |
EX :
python scaleout-cli.py --small