Greenspector Documentation has been moved.
Please go to
https://greenspectorstudio.atlassian.net/l/cp/TDhqYDSu
Benchmark an application on the Power Test Cloud
UP TO DATE
The easiest way to start using GREENSPECTOR is to use an available smartphone from the Power Test Cloud (WHERE) and launch a benchmark test (WHAT). The advantage of the Power Test Cloud is to have a device immediately available and configured, which allows you to obtain very stable measurements.
Depending on your GREENSPECTOR license, it is possible that you will not use the Power Test Cloud but the Power Test Bench installed on your premises.
Running benchmark tests allows you to measure an application in different states (launching, inactivity, setting in background task…). These tests can be launched either from the GREENSPECTOR Web Interface (click on Benchmark on the left-hand menu), or with the CLI.
How to lauch a benchmark test with the CLI
1) On the GREENSPECTOR Web Interface, create an application.
2) Build your application as an APK file or download one from a public repository like APKpure.
3) Install the GREENSPECTOR CLI on your platform and put it in a directory. You can rename the file (e.g. gspt) and add the path to the executable in your path environment variable to simplify the launch.
5) Open a terminal in the project folder of your application and run the command:
gspt init
The command prompt asks you for your private token. You will find it in the Preferences page on the GREENSPECTOR Web Interface.
6) Initialize a GREENSPECTOR local project:
gspt initprojectconfiguration --application MyFirstApp --version 1
7) Choose a device on which to run the tests:
gspt testbench set-environment
8) Launch the benchmark tests for your mobile application:
gspt testbench benchmark-apk --apkFiles yourApp.apk --iterations 3
9) You can see the progress on the GREENSPECTOR Web Interface (go to Tests tracking on the left-hand menu).
10) When the job is finished, you can see the results:
Each time you use the CLI, you can add --help
for options.
To go faster, you can use command aliases (-a
instead of --application
for example).
Related articles