How to connect Emulators or Simulators to Appium Studio:
Android and iOS simulators can both be connected to and tested on with Appium Studio. X86-based emulators are preferred for Android. And tablet emulators are included in the install for both.
And this tutorial is a part of our Appium Studio hands-on training series.
Download the free Appium Studio Community Edition
Table of Contents:
Connecting an Android Emulator to Appium Studio
It is important to remember that emulators can alter both the functional and performance-related aspects of an app, so all the applications should be tested on real devices as well.
GenyMotion (Download available here) will provide the users with multiple images or x86-based emulators.
The emulator must be identified by the ADB before use.
A high-performance machine is required for most SDKs, with the minimum recommended specifications being an i5 processor with 8GB RAM.
Details regarding Android Emulator Toolkits:
Google Android SDK (Download available here).
Emulators lack the following features:
- No device reflection (The “Open Device” button will be disabled).
- No object spy tool; use the debug tab for object properties and element extraction.
- No recording.
How to Add emulators:
Step 1: Open the AVD on your testing machine and configure the emulator.
Verify if the ADB recognizes the device.
Step 2: To connect a real device, carry on to the below.
Connecting an iOS Simulator to Appium Studio
Simulators can also be used to create and execute tests.
Minimum requirements
A Macintosh machine with Xcode 8+ installed will be required.
Preliminary setup
Any desired simulator must be installed through Xcode before it can be run in the Appium Studio.
Add new simulator:
- Run Xcode.
- Select “Devices” from the Window menu (1).
- All simulators currently installed are listed in the left panel.
- Click “+” and then click “Add Simulator” (2).
- Choose a name, add the iOS version you wish to simulate and click “Create”.
Add new iOS version
- Once the simulator creation dialog is complete, click the OS Version box.
- Select the desired version.
Supported iOS versions
Appium Studio only supports iOS 10+. Lower versions will not appear in the version list.
Add simulator in the Studio
- Select the iOS device from the “Add Device” dialog box.
- Ensure that the “Show Simulators” checkbox has been selected.
- All supported simulators will populate the Simulator Box.
- Select a simulator and click “OK”.
This will boot up the simulator for the first time, which may take up to 10 minutes for setup and initialization. Depending on your machine’s specifications, subsequent boot times should be around 1 minute.
Current Simulator Limitations
- Not more than one simulator can be listed by the Device Manager at any one time; the Add Device dialog will not add any further.
- If you wish to use a different simulator, then you will have to delete the current one first.
Delete Simulator
After deleting a simulator from the Device Manager, the simulator will shut down, by displaying a progress bar until the shutdown is complete.
Simulator Applications
Building Applications
Simulators use a fundamentally different architecture than real devices. As a result, many regular applications will not work or will work differently, on simulators.
Follow these steps to build apps for a simulator:
- Open your project in Xcode.
- Navigate to the root file in the “Project Files” section on the left and open the project settings.
- Select the appropriate “Build Target” (2).
- Click “Build Settings” (1).
- Select “No” for the “Build Active Architectures Only” option under “Architectures” (2).
- Select your simulator from the list of devices available (3).
- Under the “Product” menu, click “Build” to begin building your application (1).
- Once the build is complete, the app output file will be available in the “Products” folder (2).
- Select “Show in Finder” after right-clicking the application.
- Use the app file to install your application on simulators in Appium Studio.
To import the application to Appium Studio, click “Import” in the Application Manager and select your .app file.
Click ‘import’ from the application manager and select the .app application file.
Check our upcoming tutorial to know more about the installation of applications in Appium.
PREVIOUS Tutorial #3 | NEXT Tutorial #5