Tuesday, February 3, 2015

Introduction to Appium


This blog is written for running the NGE Automation code to Chrome browser of Android device, with the help of Appium.  

About the Appium:

Appium is an open-source tool for automating native, mobile web, and hybrid applications on iOS and Android platforms. Native apps are those written using the iOS or Android SDKs. Mobile web apps are web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome or the built-in 'Browser' app on Android).

Importantly, Appium is "cross-platform": it allows you to write tests against multiple platforms (iOS, Android), using the same API. This enables code reuse between iOS and Android testsuites.

It supports:
Mac OSX 10.7+ or Windows 7+ or Linux
Android SDK ≥ 16 (SDK < 16 in Selendroid mode)

Below image shows how Appium works:

Prerequisite before starting:

1.       Install Eclipse
2.       Install JAVA JDK, and set the path to windows preference
3.       Configure the Android SDK, and set the path to windows preference. (Instructions give in the doc)
4.       Download Appium, and configured Appium jar (java-client)+GSON jar+Selenium jar files. 

 Install Eclipse
      Download the eclipse.

Installing and configuring the Android SDK
1.       Download the standalon sdk tool from https://developer.android.com/sdk/index.html#Other
2.       By default, the Android SDK does not include everything you need to start developing. The SDK separates tools, platforms, and other components into packages you can download as needed using the Android SDK Manager. So before you can start, there are a few packages you should add to your Android SDK.
       3. To start adding packages, launch the Android SDK Manager in one of the following ways: (Time        consuming process)
          3.1  Windows: Double-click theSDK Manager.exe file at the root of the Android SDK directory.
Set the path on windows of SDK

1. Add the platform-tools\ directory to your Windows path: Ex: ;C:\Development\Android\android-sdk-windows\platform-tools\

2. Set the Android_Home: Ex

Configuing installed Android SDK with Eclipse

Launch Eclipse->Windows->Preference->Android->Click on Browse->Locate the installed Android SDK folder.

Launch Appium

1.       Open the downloaded Appium
2.       Double-click on Appium.exe, and launch the Appium server.  

Write code
Run the application:
1.       Connect the Android device.
2.       Run the test suite file.

No comments:

Post a Comment