/
Complementary files (iOS)

Complementary files (iOS)

update 25 nov 2024

The testrunner needs job and config files to execute tests. They can be found in the Examples section of Greenspector’s Gitlab.

Style rules :

  • Bold : parameters which contain a value

  • Italic : not free choice of value (ex: false/true)

1 - Job.yml

The job.yml will give the instructions to the testrunner about the journey details (variables, iterations

Here, there is the file template for iOS test available on Examples section for iOS in Greenspector Gitlab.

Different code lines are explained below.

mode: custom greenspector: application: name: ${APP_NAME} # Your application's name version: ${APP_VERSION} # Your application's version 
  • mode:

    • custom: test with a gdsl script

  • greenspector/application

    • name : the name of the application of Greenspector Studio

    • version : the name of the version

job: # List all mandatory ipa to install on the phone before the launch of the test # App can be path to Apple Store, local path to an ipa or public URL to an ipa # apps: # - ${app} testsSuites: - name: suite1 testFiles: - "./script.testgb" iterations: 1 # Number of iteration for each test case extras: PAUSEDURATION: "${PAUSEDURATION}" PAUSEAFTERLOAD: "${PAUSEAFTERLOAD}" testTimeout: 30m0s # Timeout for the total duration of the test, default value is 30m, max value is 60m online: true # [true, false] networkMode: WIFI modules: hardware_probe: false tcpdump: false
  • testsSuites

    • name: the name of the application

    • testFiles: the path of the functional journey file

  • iterations: Number of iteration for each test case

  • extras :

    • PAUSEDURATION

    • PAUSEAFTERLOAD

  • testTimeout: Timeout for the total duration of the test, default value is 30m, max value is 60m

  • online:

    • false : results available on your PC

    • true : results available on Greenspector Studio and locally

  • modules

    • hardware_probe: “false” (use of the hardware module to get the energy consumption)

    • tcpdump: “false” (use of the tcpdump module to get the exchanged data)

 

Extras can be added:

  • PAUSEAFTERACTION: 500

  • PAUSEAFTERSCROLL: 500

  • Variables needed (id, password, ..)

Example

# Testrunner job configuration file mode: custom greenspector: application: name: LeMonde version: "automatisation" job: # Custom job android apk testsSuites: - name: "LeMonde" testFiles: - ios.testgb iterations: 1 testTimeout: 60m0s online: false modules: hardware_probe: false tcpdump: false extras: PAUSEDURATION: 2000 PAUSEAFTERLOAD : 1000 PAUSEAFTERACTION: 500 PAUSEAFTERSCROLL: 500 ID: jean PSWD: 5678

2 - Config.yml

Here, there is the file template for iOS test available on Examples section for iOS in Greenspector Gitlab.

Different code lines are explained below.

  • platform: The platform you are testing on (ios)

  • resultPath: The path where the Testrunner saves the tests results. defaults to ./greenspector/measures

  • udid: Unique Device ID of the iPhone (you can find it on Xcode > Window > Devices and Simulators)

  • name: Name of the iPhone. For example, you can choose the version of your iPhone (ex : iPhone 14).

  • greenspector/server: URL of Greenspector instance (https://core-saas-prod.greenspector.com)

  • greenspector/token: Private token registered on your account

 

Parameters can be added:

  • log-level: The log level you want (from maximum to minimum log)

    • debug

    • info

    • warn

    • error

    • fatal

    • panic

 

Target parameters can be added:

For more information on the tcpdump module, see: Collect of data via network probe

 

Example