Thursday, 30 January 2014

Selendroid(Introduction)

        

About Selendroid:
Selendroid is a test automation framework which drives off the UI of Android native and hybrid applications (apps) and the mobile web. Tests are written using the WebDriver client API.
Solenoid can be used on emulators and real devices and can be integrated as a node into the Selenium Grid for scaling and parallel testing.
Overview about the Selendroid:
Selendroid is based on the Android instrumentation framework, so therefor only testing one app is supported. Selendroid contains four major components:
ü Selendroid-Client - the java client library (based on the selenium java client).
ü Selendroid-Server - that is running beside your app on the Android device.
ü Android Driver-App - a build in Android driver web view app to test the mobile web.
ü Selendroid-Standalone - manages different Android devices by installing the Selendroid-server and the app under test.
The selendroid-standalone-0.7.0.jar does contains the standalone-server, Selendroid-server and as well the Selendroid-client driver.

Selendroid-Server:

Central driver class is Default Selendroid Server. That class is responsible for doing the common activities (like taking screenshots) for both contexts Native_app and Web_app.
The web view related driver class is SelendroidWebDriver and native class is SelendroidNativeDriver.
Selendroid-Standalone:
Central driver class is Selendroid Standalone Driver that acts as a proxy between the Selendroid-client and the Selendroid-server and starts e.g. an Android emulator, creates for the app under test a customized Selendroid-server and installs everything on the device.
Features of Selendroid:
ü The only mobile WebDriver that supports native & hybrid apps on Android version.
ü The app under test must not be modified in order to automate it
ü Different locator types are supported to find elements
ü Gestures are supported: Advanced User Interactions API
ü Selendroid can interact with multiple Android devices (emulators or hardware devices) at the same time
ü Existing Android emulators are started automatically
ü It can be integrated as a node into the Selenium Grid for scaling and parallel testing
ü Build in Inspector to simplify test case development.
ü Full compatibility to the WebDriver JSON Wire protocol.

Selendroid Architecture:



System Requirements:
ü Selendroid is tested to run on Mac, Linux and Windows.
ü Java SDK (minimum 1.6) is installed and JAVA_HOME is configured
ü Latest Android-SDK is installed and ANDROID_HOME is set.
ü At least one Android virtual device must exist or an Android hardware device must be plugged in to the computer





Thursday, 23 January 2014

About Appium(Minimal Discription)



About Appium:
Appium used for Automating Native and Hybrid Apps on Android, IOS, and Firefox OS Devices. It’s an Open Source tool. Written in JavaScript and powered by Node.js, Appium is a Selenium WebDriver-compatible server. Appium can test apps in emulators and on real devices.
Appium aims to automate any mobile app from any language and any test framework. Automation tool for native and hybrid mobile apps which mean the same test cases would work on multiple platforms.
Binding Selenium WebDriver with Appium tool (Automating Mobile Native and Hybrid Apps) and executing selenium scripts to run native app in emulator or device (android)
Why Appium:
·        You don't have to recompile your app or modify it in any way, due to use of standard automation APIs on all platforms.
·        You can write tests with your favourite dev tools using any WebDriver-compatible language such as Java, Objective-C, JavaScript with Node.js (in both call back and yield-based flavours), PHP, Python, Ruby, C#, Perl with the Selenium WebDriver API and language-specific client libraries.
·        You can use any testing framework.

·        If you use Apple's UIAutomation library without Appium you can only write tests using JavaScript and you can only run tests through the Instruments application. Similarly, with Google's UiAutomator you can only write tests in Java. Appium opens up the possibility of true cross-platform native mobile automation.
Supported Platforms, Languages and Devices:
               Devices    :  IOS, Android, FirefoxOS
Languages: Java, PHP, Python, Ruby, C#, Perl, Objective-C, JavaScript with Node.js
Platforms : Widows, Mac, Unix
Requirements for Setup:
      Install node.js (v.0.8 or greater). Use the installer from nodejs.org.
      Download Appium for Windows(here I have worked on windows)
      Install the Android SDK. You will need to run the 'android' tool (included in the SDK) and make sure you have an API Level 17 or greater API installed. Set ANDROID_HOME to be your Android SDK path and add the tools and platform-tools folders to your PATH variable.
      Install the Java JDK and set JAVA_HOME to your JDK folder.
      Install Apache Ant or use the one that comes with the Android Windows SDK in the eclipse\plugins folder. Be sure to add the folder containing ant to your PATH variable.
      Install Apache Maven and set the M2HOME and M2 environment variables. Add the M2 environment variable to your PATH variable.

Limitation for Windows:
 Need to update .NET Framework to 4.5