Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before using meter command, you have to define the application and the version you are working on by setting the configuration file in the current folder by following instructions in paragraph Current working folder configuration in $CURRENT_FOLDER/.greenspector/config.yml 43909160.

Send measures

Use this subcommand to send the results files from the current folder to the server:

...

Before using testbench command, you have to define the application and the version you are working on by setting the configuration file in the current folder by following instructions in paragraph Current working folder configuration in $CURRENT_FOLDER/.greenspector/config.yml 43909160.

Set the environment

To use the testbench command, you first need to set the environment for your project.
To do so, you should use this command:

...

Code Block
languagebash
gspt testbench benchmark-apk --apkFilesapkFile <path to APK>

Examples:

Code Block
languagebash
gspt testbench benchmark-apk --apkFilesapkFile target/final.apk
gspt testbench benchmark-apk --apkFilesapkFile target/main.apk --apkFilesapkFile target/app-module.apk --apkFilesapkFile target/commons.apk
gspt testbench benchmark-apk --apkFilesapkFile target/final.apk --iterations 5 --report

The options are :

1 - --apkFilesapkFile: The APK(s) to benchmark. (If set multiple times, all the APK will be installed but only the first one will be monitored). Mandatory option: Minimum 1

...

This command will send a measure request to the server. After this measure has run on the Power Test Bench/Cloud, you will find the results on the Web Interface.

Some options are deprecated:

1 - --apkFiles: The APK(s) to benchmark. (If set multiple times, all the APK will be installed but only the first one will be monitored). Mandatory option: Minimum 1. This option is deprecated, use apkFile.

Run your custom functional tests on your APK / website

...

Code Block
languagebash
 gspt testbench custom-tests --apkFilesapkFile <path to APK> --testPackagestestPackage <Test package to launch> --monitoredPackagesmonitoredPackage <package to monitor>

Examples:

Code Block
languagebash
gspt testbench custom-tests --apkFilesapkFile target/application.apk --apkFilesapkFile target/test.apk --testPackagestestPackage com.greenspector.demo.tests --monitoredPackage com.greenspector.demo.app
gspt testbench custom-tests --apkFilesapkFile target/application.apk --apkFilesapkFile target/test-1.apk --apkFilesapkFile target/test-2.apk --testPackagestestPackage com.greenspector.demo.tests.first --testPackagestestPackage com.greenspector.demo.tests.second --monitoredPackage com.greenspector.demo.app --iterations 5
gspt testbench custom-tests --apkFilesapkFile target/application.apk --apkFilesapkFile target/test.apk --testPackagestestPackage com.greenspector.demo.tests --monitoredPackage com.greenspector.demo.app --report

The options are:

1 - --apkFilesapkFile: 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. Mandatory option: Minimum 1

2 - --testPackagestestPackage: 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

3 - --monitoredPackagesmonitoredPackage: For each Android application you want to monitored, precise the name of the android package to get metrics about the process (process data, process CPU…). Probes can monitor multi package at a time. In this case, metrics are agreggated. For website, choose the browser where the tests runs (i.e. com.android.chrome). Mandatory option: Minimum 1

...

Some options are deprecated:

1 - --apkFiles: 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. This option is deprecated, use apkFile

2 - --testPackages: For each APK containing functional tests you want to launch (i.e. UIAutomator 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. This option is deprecated, use testPackage

3 - --monitoredPackagemonitoredPackages: The package name of the Android application to monitor with the probes to get metrics about the process (process data, process CPU…). Probes can monitor only one package at a time. For website, choose the browser where the tests runs (i.e. com.android.chrome). Mandatory option: Exactly 1 (This option is deprecated, use monitoredPackages)

Related articles


Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@185bfa9a
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "cli" and type = "page" and space = "DOCUMENTATION"
labelskb-how-to-article