If you want to create or run mobile tests on your own machine instead of using mabl’s cloud devices, you’ll need to set up a virtual device locally. This article walks through the prerequisites for both Android and iOS, plus how to confirm mabl can connect to your virtual devices.
- 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. Download Xcode.
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
Before starting a training session in mabl, run a virtual device in your mobile development IDE:
- For Android testing, start an emulator in Android Studio.
- For iOS testing, start a simulator in XCode.
To confirm that mabl can connect to your virtual devices, create a new mobile test in mabl: New test > Mobile test.
In Core settings, select Local training. mabl checks for virtual devices installed on your computer.
Checking for virtual devices in mabl
Select a local Android .apk or iOS .app mobile build file and virtual device type for training.
Note
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
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%AppDataLocalAndroidSdkemulatoremulator.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).