MAJ 25-03-24
User journey
Instead of benchmark test, functional journey tests allow to measure a personalized user journey. For this purpose, it needs a script to describe the actions required to reproduce the journey.
A script language was designed to define the user journey to measure: GDSL for Greenspector Domain-specific language. By convention, files written in GDSL use .testgb
extension.
To execute a first measure, we will use an example: sample.testgb. Please download it in your working directory.
############################################################################################ # Getting started with GDSL : a first analysis of www.gouvernement.fr # ############################################################################################ # Preparation # applicationKill,com.android.chrome browserPrepareAndOpenForReference pause,${PAUSEAFTERLOAD} # Blank tab reference # measureStart,PAUSE_referenceBrowser pause,${PAUSEDURATION} measureStop browserGoToUrl,https://www.gouvernement.fr/ # Loading step # assertNotExistsText,accept all measureStart,CHRGT_home pressEnter waitUntilText,accept all pause,${PAUSEAFTERLOAD} measureStop # Pause step # measureStart,PAUSE_home pause,${PAUSEDURATION} measureStop
This script visits the French government website and measures:
Reference empty tab
Homepage loading
Homepage idle
Initialization
The Greenspector CLI allows to launch measures on the Greenspector testbench. CLI means command-line interface: the Greenspector CLI is a command-line tool to be run in a terminal.
Application creation
All measurement iterations of Greenspector Studio are stored in app.greenspector.com in an application. We will create one to launch our first test.
In
Applications
menu, chooseAdd an application
Fill
Name
,Version
of app in the pop-up. Description field is optional.
After validation, the new app should appear in the applications list:
Project configuration
We will now link Greenspector CLI with our new application:
gspt initprojectconfiguration --application [APPNAME] --version [VERSION]
Please replace [APPNAME]
and [VERSION]
with the information used in the previous section.
Test will be launched on a real device from our testbench. The model which will run the test has to be specified. Type the following command:
gspt testbench set-environment
Enter the choice number:
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:
For this simple test, simply use the most available device: the number 3
with Samsung - Galaxy S9 with android 10
.
Launch measure
The following command will finally launch a first test:
gspt testbench custom-tests / --testsSuite launch:./sample.testgb / --monitoredPackage com.android.chrome / --iterations=1 / --networkMode=Wifi / --disable-dumpsys / -e PAUSEDURATION=1000 / -e PAUSEAFTERLOAD=1000 / --apkFile [MYAPK]
Please note:
monitoredPackage
points to the package analysed for data exchanges:It is specific for an application:
com.google.android.youtube
For web, specify the browser package:
com.android.chrome
Replace
[MYAPK]
with an .apk fileTo let testbench download the app on Google Playstore for Android, enter package name:
com.google.android.youtube
For a local .apk file, enter path:
./youtube.apk
For a online .apk link, enter URL:
https://mysite.com/youtube.apk
Remove this line for web test
Follow test progress
Regarding the testbench availability and iteration number, tests may take time, from 5 minutes to 3 hours. An email is sent as soon as the test finish.
If after 3 hours, you still haven’t received an email or any results, please restart or support contact.