Measure on the Testbench

Measure on the Testbench

update 05 nov 2025

Your script has been developed and is valid.

You can now proceed to the final measurements!

Run a functional journey

Launch the measure via web editor

  • Click on Launch button

image-20251105-103916.png
  • A window opens showing the measurement settings:

image-20251104-110149.png
  • Select the measurement mode Final.

  • Create a new version specific to the final measurements: this can be the current date, the version of the digital service, or something else.

image-20251105-104156.png
  • Then select the terminal on which to perform the measurement. It must be the same as the one used during automation.

  • Specify a minimum of 3 measurement iterations to ensure reliable results.

  • Click > Launch.

 

Launch the measure via the CLI

Initialization of configuration

  • Windows/Linux/Mac:

gspt init --greenspectorApi "https://core-saas-prod.greenspector.com/api" --privateToken [MYTOKEN]

Regardless of your OS, please replace [MYTOKEN] with a personal token.

It can be found in your account.

gspt ping

Link Greenspector CLI with the application on Greenspector Studio.

gspt initprojectconfiguration --application [APP-NAME] --version [VERSION]

Please replace [APP-NAME] and [VERSION] with the information used in the previous section.

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:

gspt testbench set-environment

Enter the number of your choice:

Available environments: 1 - mobile: Samsung - Galaxy S7 with android 8 2 - mobile: pixelc with android 8.1.0 3 - mobile: Samsung - Galaxy S9 with android 10 4 - mobile: Samsung - Galaxy S9 - with sim with android 10 5 - mobile: Samsung - Galaxy S9 - Maintenance with android 10 6 - mobile: Samsung - Galaxy S22 with android 13 7 - mobile: Samsung - Galaxy Tab S7 FE with android 13 8 - mobile: Samsung - Galaxy S10 with android 12 9 - mobile: Samsung - Galaxy S10 - with sim with android 12 Please choose an environment:

Launch of a web measure on Test bench

Use the command line below to start a measurement.

gspt testbench custom-tests --testsSuite launch:./script.testgb --monitoredPackage "com.android.chrome" --iterations=3 -e config-skipsetupphone=false --networkMode=Wifi -e PAUSEDURATION=30000 -e PAUSEAFTERLOAD=1000

Launch of an application measure on Test bench

For web measurements, the monitoredPackage option needs to be modified with the name of the application package.

You also need to add the app option as follows:

  • If the application is available on Play Store (Android) or on Apple Store (iOS):

--app [android package name of app] # ex: --app com.google.android.youtube --app [url of the app on Apple Store] # ex: --app https://apps.apple.com/fr/app/youtube/id544007664
  • If the application is present with a local apk (Android) or a local ipa (iOS):

--app [path to the apk] # ex : --app ./my_app.apk --app [path to the ipa] # ex : --app ./my_app.ipa
  • If the application is present with a public apk (Android) or a public ipa (iOS):

--app [path to the apk] # ex : --app https://my-website.com/my-app.apk --app [path to the ipa] # ex : --app https://my-website.com/my-app.ipa

Use the command line below to start a measurement:

gspt testbench custom-tests --testsSuite launch:./script.testgb --monitoredPackage [appPackageName] --iterations=3 -e config-skipsetupphone=false --networkMode=Wifi -e PAUSEDURATION=30000 -e PAUSEAFTERLOAD=1000 --app [appPackageName]

 

Mandatory option*

  • --app: apk or ipa to measure. The file could be a local path, a public URL, a package name to download from the PlayStore or an url of the app to download from the Apple Store.

  • --testsSuite* : Gdsl script name and lists of test files writen with Greenspector DSL. All test files will be launched in the specified order.

  • --monitoredPackage* : Name of the android package. Probes can monitor multi package at a time. In this case, metrics are agreggated. For website, choose com.android.chrome.

  • --iterations: Number of iterations of measure wanted. (Default: 1).

  • --report: Automatically generate the test report in the .greenspector folder and wait for the job to end.(Default: false). This command will send a measure request to the server. After this measure will ran on the Power Test Bench/Cloud, you will find the results on the Web Interface.

  • --extra: Use to transmit extras parameters with the format name=value. (exemple --e PARAMETERNAME="value" will replace all ${PARAMETERNAME} in the GDSL file by value).

  • --networkMode: The network mode for the test. Values can be "WIFI", "4G", "3G" or "2G". (Default: WIFI).

  • --disable-dumpsys: Disable Android System Monitoring. By default, this is enabled and will add one iteration to your job for more detailed metrics (Views, Activity, OpenSSL Sockets, ...). If no need these metrics, disable this iteration, it will reduce testing time.

  • --only-dumpsys: Run only a Android System Monitoring iteration. This iteration will only be able to retrieve Android System metrics (Views, Activity, OpenSSL Sockets, ...).

Please verify theses parameters to have relevant measurements:

  • PAUSEDURATION: 30000

  • PAUSEAFTERLOAD: 1000

  • config-skipsetupphone: false

  • iterations: 3

Note that extras in job.yml which contains text, as PSWD for example, can’t contain a “!” because it’s interpreted by the bash. To know more about it go to the Troubleshooting tool.

Results

Results are available on :

  • The work folder with greenspector/dd-mm-yyyy XXhXXm/tests-results/results.txt

  • On Greenspector Studio if online is true in job.yml.

 

Await the results

After pressing Launch, the test enters the queue of tests to be executed. It first displays a waiting message and then a measurement in progress message when it is running on a device.

image-20251104-121855.png
image-20251104-121934.png

When the execution is complete, the test report shows you the status of the test, whether it was successful or not, and the associated error in the latter case.

image-20251104-111213.png

If the test succeeds, congratulations!

Check the consistency of measures with https://greenspectorstudio.atlassian.net/wiki/spaces/DPP/pages/116720211