Versions Compared

Key

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

...

  • Install Java on Windows:

    • Go to https://www.java.com/fr/download/help/windows_manual_download.html and install the Java executable

    • Click on the Java executable and follow the instructions

    • Add JAVA_HOME to your PATH path / environment variables: Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Modify > Add the path C:\Program Files (x86)\Java\jre-1.8

  • Install sdkmanager from Android Studio:

    • Open Android Studio

    • Click on More Actions > SDK Manager (or Tools > SDK Manager if a project is open)

    • Click on the SDK Tools tab, uncheck "Hide Obsolete Packages"

    • Check Android SDK Tools and install version 26.1.1

  • Add sdkmanager to your PATH path / environment variables:

    • On Linux: add the line export PATH=$HOME/Android/Sdk/tools/bin:$PATH in the .bashrc file and run the command "source ~/.bashrc"

    • On Mac: add the line export PATH=$HOME/Library/Android/sdk/tools/bin:$PATH in the .bash_profile file and run the command "source ~/.bash_profile"

    • On Windows: Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Modify > Add the path C:\Users\[username]\AppData\Local\Android\Sdk\tools\bin

  • On Windows only, turn vulkan off to be able to load web pages (only if you want to test web pages) :

    • Open Windows start menu

    • Select Notepad

    • Add the following text :

      Code Block
      languagebash
      Vulkan = off
      GLDirectMem = on
    • Click on File > Save as : go to C:\Users\[username]\.android and name the file advancedFeatures.ini

Info

On Windows, turning vulkan off may display a black screen on the emulator.

If it is the case, during the emulator creation, you will have to select “Graphics: Software - GLES 2.0”

1.2. Prerequisite to use an android emulator with Greenspector tools

  • Follow the first part of the prerequisite (part 1.1)

  • Add ADB (Android Debug Bridge) to your PATH path / environment variables:

    • On Linux: add the line export PATH=$HOME/Android/Sdk/platform-tools:$PATH in the .bashrc file and run the command "source ~/.bashrc"

    • On Mac: add the line export PATH=$HOME/Library/Android/sdk/platform-tools:$PATH in the .bash_profile file and run the command "source ~/.bash_profile"

    • On Windows: Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Modify > Add the path C:\Users\[username]\AppData\Local\Android\Sdk\platform-tools

  • Get the testrunner from https://app.greenspector.com/ in the Modules tab, and put it in a folder (for example “testrunner_files”)

  • Add in this folder the configuration files config.yml and job.yml, and a script with the testgb extension. An example of these files is available at the following location:

  • You can find the documentation about the gdsl functions here: https://dsl.greenspector.com/

2. Use an android emulator without Greenspector tools

...

  • On the Device Manager window, click on “Create Device”

  • On the Virtual Device Configuration window, click on “New Hardware Profile”

  • Fill in the form with the properties of the device you want to create. In the example below, you can find the properties of the Samsung Galaxy S9. If you want to use an other device, see the next part “Emulators tested”.

...

...

If you want to use a tablet emulator, you can uncheck the portrait mode to use only the landscape mode.

Click on “Finish” then on “Next”.

...

Info
  • If your computer is configured in English, you have to write the screen size with a dot (ex: 5.8).

  • Avoid using Android 13.0 system image. It takes for too many resources from your computer.

  • If you want to use a tablet emulator, you can uncheck the portrait mode to use only the landscape mode.

2.3. Add Google Play Store to a custom emulator

...

Code Block
languageyaml
job:
  extras:
    config-skipsetupphone: true

To be able to run an application with the applicationStart gdsl function, there are 2 choices :

  • Install the app manually through the Play Store application

  • In the job.yml file, add an url field with the name of the application package. Example :

Code Block
languagebash
job:
   url: com.google.android.youtube

In the second case, it installs the app at the beginning of the test and uninstalls it at the end.

3.2. Change the config.yml file

...