The first iteration of native mobile testing in mabl leverages local virtual devices:
- For Android, mobile testing uses emulators via the Android Studio IDE.
- For iOS devices, mobile testing uses simulators via the Xcode IDE.
This article explains how to configure Android Studio and Xcode and confirm that mabl can connect to your virtual devices.
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.
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:
- On MacOS:
- On Linux:
- On Windows:
- On MacOS:
- 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.
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.