Launch measures (Android)

In this section, you will find how to launch a functional journey analysis on a local android device as it has been described in the Getting started part.

Preparation

If it is not done and you want to save measures on the web interface, create an application on Greenspector App

  • Go to the Applications menu

  • Click on Add an application

  • Enter a name, a first version and description (not obligatory)

  • Validate

  • Completed job.yml and config.yml files

To launch tests, the testrunner executable needs config and job files. For more information about the content of these files, check the section Complementary files (Android).

You will need some information to launch functional journey analysis on local device :

Modification of config.yml file

Edit the config.yml file you have used for test, fill or replace :

  • ${PHONE_IP} by your phone's IP address

  • ${PHONE_PORT} by 5555

  • ${PRIVATE_TOKEN} by your token. To find your token, go to the Greenspector interface, click on your name in the top right-hand corner, then click on the "Preferences" tab.

  • tcpdump:
    gatewayIP: IP of the gateway used to filter data
    networkInterface: Network interface used to detect data (wlp2s0...)
    keepPcap: true If true, it keeps the pcap file at the end of the measures
    ipFilters:
    apple: true

Go on Collect of data via network probe to have more details on tcpdump module and configure it.

Modification of job.yml file

Edit the job.yml file you have just downloaded, fill or replace :

  • ${APP_NAME} by the name of your application.

  • ${APP_VERSION} by the name of your version.

  • In the testFiles field, enter the path to your test scenario

  • ${MONITORED_PACKAGE} by the name of your application package. If you are measuring on a website, write "com.android.chrome".

  • ${PAUSEDURATION} by 30000 (30000 milliseconds, i.e. 30 seconds)

  • ${PAUSEAFTERLOAD} by 1000 (1000 milliseconds, i.e. 1 second)

  • online=true

  • skipsetupphone=false

  • tcpdump=true

  • iterations=3

 

Launch a functional journey analysis on a local Android device

Launch of a functional journey on a local device needs :

  • GDSL script

  • job.yml & config.yml

  • Connected smartphone in adb Wifi

Reminders:

Activate ADB Wifi

  • Connect your device through USB

  • Verify ADB connection :

adb kill-server adb devices
  • The device should be detected. If it’s the first connection, a pop-up Allow USB debugging? should appear on device. Click on Allow:

  • Run the following command to enable network connection:

adb tcpip 5555
  • Disconnect USB cable from your device

  • Run the following command to establish network connection:

adb connect [IP]:5555
  • Run the following command to verify network connection:

You should see your device now identified with its IP.

Test launch

Testrunner is now ready to be launched. Simply launch it to start a measure :

  • Go in the folder where job and config files are located

  • Launch the following command in the terminal

  • During the measurement execution and until measurement end:

    • Don’t close terminal

    • Don’t interact with device. Check device screen to see the measure running.

Results

The Testrunner prompts the result at the end of the measure. In case of failure, error’s line is given to help to adapt GDSL file. Results are available:

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.