Selendroid is an innovative test automation framework which is used to test native and hybrid Android mobile applications. A Selendroid framework drives off the user interface of a mobile or web app, and the test is written using Selenium 2 client API. Selendroid is a dynamic mobile testing framework that can be used both on emulators and real Android devices with an additional option of integrating into selenium grip as a node for parallel testing and scaling.
Using Selendroid for mobile testing can provide a number of benefits for an app developer/tester. Some of the benefits of Selendroid are as follows:
Selendroid offers multiple advantages over other mobile app testing frameworks but just like every coin has two sides, the Selendroid framework also suffers from some drawbacks. These are as follows:
Step 1: A developer must ensure that to use Selendroid, Java SDK (v1.6 or above) must be necessarily installed on a machine. If SDK is not installed, first install Java framework and configure the variables.
Step 2: Android Studio must be downloaded, installed using default options and a developer should set the Android_Home directory.
Step 3: Download the test application and selenium jar files from Selendroid and place in it a relevant local directory.
Step 4: Attach an Android device using a USB device and enable the USB Debugging Mode.
Android app testing is often seen as a resource intensive process which takes a lot of time and efforts to complete. But testing using Selendroid mobile framework is extremely easy and quick for a developer or tester, during which he can check the functionality and performance of an app on various parameters. To test an app using Selendroid, one should follow the following steps:
Step 1: Install the Eclipse testing environment.
Step 2: Create a new Java project.
Step 3: In the new Java project, add the previously downloaded Selendroid and Selenium jar files.
Step 4: Configure the testNG attribute in Eclipse
Step 5: Connect an Android device with the system with the help of a USB cable and enable the USB debugging mode by navigating to the developer options in the settings menu of the mobile device.
Step 6: Start the Selendroid Server by running the same.
Step 7: Create a new Java project and add the following things to the build path of the new project:
Step 8: Create a new package under the existing java project.
Step 9: Under the newly created package, create a class to run.
Step 10: Run the class with the help of testNG run configuration.