Status | ||||
---|---|---|---|---|
|
Info |
---|
You can use an android emulator to help you develop your GDSL tests. It is useful if you do not have a real device or if you want to test on a device with the same resolution as a device on the Test Bench. Do not use emulator if you want measures, the metrics (energy, data …) are not available. |
1 - Change the job.yml file
...
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 | ||
---|---|---|
| ||
job: urlapps: - com.android.chrome |
In the second case, it installs the app at the beginning of the test and uninstalls it at the end.
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:
|
Download the android-service executable in 32 bits and its version file : https://dl.greenspector.com/emulator/android-service-files.tar.gz
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
...