Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To be able to run an application with the applicationStart gdsl function, the application should be installed on emulator first, there are 2 choices :

  • Install the app manually through the Play Store application or with adb or other mechanism

  • In the job.yml file, add an url apps field with the name of the application packagea list of application that will be install at the beginning of the test and will be uninstall at the end (Each element of the list could be a package name for playstore or a local path to an apk or a public url to an apk). Example :

Code Block
languageyaml
job:
   urlapps: com.android.chrome

...


    - com.myapp

2 - Change the config.yml file

...

  • Launch an android emulator

    • Option 1: open the Device Manager window of Android Studio and click on the triangle

    • Option 2: start an emulator from the command line (part 2.5)

  • If you run the testrunner for the first time, you have to run it once without the --no-update option:Run the testrunner

    • On Linux and macOS: ./testrunner -jobFile job.yml -config config.yml

    • On Windows: testrunner -jobFile job.yml -config config.yml

Info

On macOS with M1 chip, you may need to install Rosetta first:

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

Info

On macOS with M1 chip, you have to download the android-service executable with arm architecture: https://dl.greenspector.com/emulator/android-service-files-mac-m1.tar.gz

  • Go to your greenspector cache:

    • On Linux and macOS: $HOME/.greenspector

    • On Windows: C:\Users\[username]\.greenspector

  • Replace the android-service and android-service.version files with the downloaded files. You will have to decompress the tar.gz file.

  • You can now run the testrunner with the --no-update option:

    • On Linux and macOS: ./testrunner -jobFile job.yml -config config.yml --no-update

    • On Windows: testrunner -jobFile job.yml -config config.yml --no-update

...