Status | ||||
---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
gspt testbench benchmark-apk --apkFile target/final.apk # gsptlocal testbenchpath benchmark-apk --apkFile target/main.to apk gspt testbench benchmark-apk --apkFile target/app-modulehttps://demo/demo.apk --apkFile target/commons.apk --networkMode 3G# apk from public url gspt testbench benchmark-apk --apkFile target/final.apk --iterations 5 --reportcom.microsoft.office.outlook # package name to download the apk from the PlayStore gspt testbench benchmark-apk --apkFile target/finalmain.apk --apkFile target/app-module.apk --apkFile target/commons.apk --iterationsnetworkMode 13G # three apk to frominstall and public url |
...
launch benchmark in 3G
gspt testbench benchmark-apk --apkFile target/final.apk --iterations 5 --report # Launch 5 iterations of the benchmark and wait for the report
|
The options are :
1 - --apkFile
: The APK(s) to benchmark. (If set multiple times, all the APK will be installed but only the first one will be launched and monitored). The apk file could be a local path, a public URL or a package name to download from the PlayStore. Optional if the applications to benchmark are already installed on phone
...
Code Block | ||
---|---|---|
| ||
# To run android tests (uiautomator, espresso) gspt testbench custom-tests --apkFile <path to APK> --testPackage <Test package to launch> --monitoredPackage <package to monitor> or # To run Greenspector DSL tests Greenspector DSL tests gspt testbench custom-tests --apkFile <path to APK> --testsSuite <suite name:path_testfile1.testgb,path_testfile2.testgb> --monitoredPackage <package to monitor> |
Examples:
Code Block | ||
---|---|---|
| ||
gspt testbench custom-tests --apkFile <path to APK> --testsSuite <suite name:path_testfile1.testgb,path_testfile2.testgb> --monitoredPackage <package to monitor> |
Examples:
Code Block | ||
---|---|---|
| ||
gspt testbench custom-tests --apkFile target/application target/application.apk --apkFile target/test.apk --testPackage com.greenspector.demo.tests --monitoredPackage com.greenspector.demo.app gspt testbench custom-tests --apkFile https://dl.greenspector.com/demo/demo.apk --apkFile https://dl.greenspector.com/demo/testuiautomator-debug-androidTest.apk --apkFile target/testhttps://dl.greenspector.com/demo/testuiautomator-debug.apk --testPackage com.greenspector.demo.teststest --monitoredPackage com.greenspector.demo.app gspt testbench custom-tests --apkFile target/application.apk --apkFile target/test-1.apk --apkFile target/test-2.apk --testPackage com.greenspector.demo.tests.first --testPackage com.greenspector.demo.tests.second --monitoredPackage com.greenspector.demo.app --iterations 5 gspt testbench custom-tests --apkFile target/application.apk --apkFile target/test.apk --testPackage com.greenspector.demo.tests --monitoredPackage com.greenspector.demo.app --report gspt testbench custom-tests --apkFile target/application.apk --testsSuite suite1:tests/file1.testgb,tests/file2.tgb --testsSuite suite2:tests/file3.testgb --monitoredPackage com.greenspector.demo.app |
...
1 - --apkFile
: Precise the APKs you want to measure and the APKs which contain your functional tests to launch. Prefer separate APKs for your app and for your tests. The apk file could be a local path, a public URL or a package name to download from the PlayStore.
2 - --testPackage
: For each APK containing functional tests you want to launch (i.e. UI Automator or Espresso tests), precise the name of the android package (i.e. package in file AndroidManifest.xml). All tests in those Android packages will be launched. Mandatory option: Minimum 1 if --testsSuite is not used
...
7 - --extra:
Use to transmit extras parameters to your instrumentation with the format name=value (ie --extra annotation=com.greenspector.demo.test.MyAnnotation add the following parameters to your instrumentation -e annotation com.greenspector.demo.test.MyAnnotation). Thus you can filter your tests for example using those extras parameters : https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner). Optional
8 - --networkMode: The network mode for the test. Values can be "WIFI", "4G", "3G" or "2G". (Default: WIFI). Optional
Some options are deprecated:
...