2 types of measure are possible on the Testbench :
Run a benchmark
fastest way to get result with an automated test execution
Does not give a personalized analysis
Possible to run a benchmark on Greenspector App directly
Run a functional journey
Personalized analysis with an automated test execution
Run a functional journey
Initialization of configuration
Link Greenspector CLI with the application on Greenspector App.
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 :
--app [package name of app] # ex : --app com.google.android.youtube
If the application is present with a local apk :
-app [path to the apk] # ex : --app ./my_apk.apk
If the application is present with a public apk :
--app [path to the apk] # ex : --app https://my-website.com/my-apk.apk
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]
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 app.greenspector.com.
For a better understanding, screenshots of steps are available at greenspector/dd-mm-yyyy XXhXXm/tests-results/MYAPP/parcours/iteration 1/screenshots
. The final state is called success.png
or failed.png
regarding the result.
If the test doesn’t succeed, refer to Troubleshooting tool
If the test succeeds, congratulations!
Check the consistency of measures with Verification of measures consistency
Run a benchmark
Benchmark is the fastest way to get result with an automated test execution. However, it does not give a personalized analysis with a precise user journey.
All the benchmark procedure takes place on app.greenspector.com/testbench/jobs/new with the detailed procedure below or via the CLI after the previous commands.
Results
After the test is complete, the results are available in the dashboard
tab, with a global Ecoscore from network and client resources grades.
Verify that all rules have been evaluated : 24 rules should be verified.
If it is not the case, re launch benchmark.
Launch with the CLI
It is possible to launch benchmark measures via the CLI. For that, the first configuration steps presented at the beginning of this page must be followed until the terminal selection.