This article explains how to configure virtual devices to use in mabl for creating and executing tests.
- For Android, mobile testing uses emulators via the Android Studio IDE.
- For iOS devices, mobile testing uses simulators via the Xcode IDE.
Android emulator configuration
- The Android tools require Java version 9 or greater. Install Java if you do not already have it installed. See these instructions for more information.
- Download, install, and launch Android Studio.
Android studio installs a Pixel device at installation time, e.g. Pixel_3a_API_33_arm64-v8a
. If you want to configure additional devices, go to the Virtual Device Manager menu in Android Studio.
iOS simulator configuration
Xcode can only be installed on Mac devices. Testers on Windows or Linux cannot configure simulators via Xcode, and therefore cannot test iOS apps.
Xcode configures a set of the most recently released devices based on the selections made in the setup process. If you want to configure additional devices, go to the Manage run destinations menu in Xcode.
Connecting to virtual devices
To confirm that mabl can connect to your virtual devices, create a new mobile test in mabl:
- Click on the New test button in the left-hand navigation
- Select Mobile test
On the mobile test creation form, mabl checks for virtual devices installed on your computer.
Checking for virtual devices in mabl
Select the mobile build for training in the Application build section. After selecting the build, you can choose the virtual device for training.
For a faster user experience, run a virtual device in your mobile development IDE before starting a training session in mabl:
- For Android testing, start an emulator in Android Studio
- For iOS testing, start a simulator in Xcode
Emulators are resource intensive and require significant CPU and RAM. If the emulator crashes, limit the number of programs running on your machine to improve your experience.
Troubleshooting
Connecting to emulators and simulators
If you do not see emulators or simulators when creating a new mabl mobile test, confirm that mabl can connect to your virtual devices by opening the troubleshooting menu: Help > Troubleshooting
- Run system check for iOS testing: checks if mabl can connect to iOS simulators.
- Run system check for Android testing: checks if mabl can connect to Android emulators.
You can also confirm whether virtual devices have been installed via the terminal:
- Emulators:
- On MacOS:
~/Library/Android/Sdk/emulator/emulator -list-avds
- On Linux:
~/Android/Sdk/emulator/emulator -list-avds
- On Windows:
%USERPROFILE%\AppData\Local\Android\Sdk\emulator\emulator.exe -list-avds
- On MacOS:
- Simulators:
- On Mac OS:
xcrun simctl list devices available
- On Mac OS:
If the command does not respond with virtual device(s), the program has not been successfully installed.
Mac users
If Xcode was successfully installed but the mabl system check for iOS testing was unsuccessful, you may need to reset the Xcode path. To do so, open Xcode and navigate to Settings... > Locations and select the version of Xcode to use under "Command Line Tools". Alternatively, run the following command in your terminal:
sudo xcode-select --reset
This should reset the Xcode CLI path and if you run xcode-select -print-path
, it should print the path to /Applications/Xcode.app/Contents/Developer
. For more detailed instructions, visit these docs (Medium and Stack Overflow).
Local training and execution
If you are already running the Appium server on your local machine, you may not be able to launch the mabl Trainer or run local tests.