Mobile WebDriver Testing
You can perform object-based testing of Android and iOS devices with Eggplant Functional using WebDriver functionality. For Android devices, this requires the installation and configuration of Appium and other components. For iOS devices, WebDriver testing requires iOS Gateway 5.1.2 or later. Use mobile WebDriver commands and functions to perform tests.
IOS Testing Setup
WebDriver testing of iOS devices requires iOS Gateway 5.1.2 or later. After you install and launch iOS Gateway, plug in the iOS device you want to test, start automation, then create a connection using mobile WebDriver commands and functions. Make sure the Auto Start WebDriverAgent is selected in iOS Gateway.
Android Testing Setup
Performing WebDriver testing on Android devices requires the installation and configuration of several pieces in addition to Eggplant Functional:
- Java SE Development Kit (JDK) 10.0.2 or later
- ADB 3.1.3, part of Android Studio
- Appium 1.6.3 or later
Depending on the devices you're testing, you might also need Android USB drivers, which are manufacturer-specific and can be installed as needed.
Java Development Kit
Download the JDK, and install using the default settings.
Android Studio
- Download Android Studio. Use standard installation settings, and allow the installer to download components.
- When the installation is complete, click Configure > SDK Manager from the Android Studio splash screen.
- Select Appearance and Behavior > System Settings > Android SDK in the left menu, then click the SDK Tools tab. Select the SDK Build-Tools, SDK Platform-Tools, Android SDK Tools, and Google USB Driver checkboxes (Windows only). Click OK.
Appium
- Download and install Appium 1.6.3 or later. Use the default installation settings.
- Open Appium.
- Click Edit Configurations to enter Environment Variables. These variables, ANDROID_HOME and JAVA_HOME, are the paths to the Android SDK folder and the jdk folder on your system. You can find the ANDROID_HOME path on SDK Tools page in Android Studio. The JAVA_HOME path typically is C:\Program Files\Java\jdk-10.0.2. Note: You do not need to set the JAVA_HOME path on Mac.
- Click Start Server to launch the Appium server.
- Click the magnifying glass icon in the server window. A new Appium window opens with the Automatic Server tab active.
- Configure testing of a specific app on a specific device in the Desired Capabilities area. Use the plus (+) button and fill in the UI fields on the left of the screen. You must create a capability set for every device/app combination that you want to test. Capability sets include the following parameters:
- platformName: Android
- deviceName: Android
- device: The serial number of the device. You can find this by either entering adb devices at the command prompt or by opening Android Gateway with the device connected.
- appPackage: The identifier of the mobile app that you want to test. This parameter is case-sensitive.
- appActivity: The screen in the app that you want the app to open on. This parameter is case-sensitive.
- AutomationName: The automation engine to use to test the device.
- Save your settings. If you haven't plugged in an Android device yet, do so now and click Start Session. Appium installs drivers on the device that are required for testing with Eggplant Functional.
- Close the driver installation window, but keep the Appium server running. You're now ready to create a connection and automate the device using mobile WebDriver commands and functions.