Tutorial: Appium Android configuration on Eclipse IDE

Appium is an open source test automation framework for use with native and hybrid mobile apps. It drives iOS and Android apps using the WebDriver JSON wire protocol. It’s a great tool for automating mobile apps. Here is a step-by-step tutorial for configuring Appium tool for Android apps automation.

We will use Eclipse and TestNG framework to run Appium automated test on Android device/emulator(If you have not configured TestNG on Eclipse, refer this tutorial). Let’s check out prerequisites of this setup process.

Prerequisites:

  • Android SDK installed in system.

  • Appium (You can get it from official Appium site)

  • .NET Framerork 4.5

  • Eclipse

  • TestNG and Selenium 2 JARs

We will now start setting up Appium Android configuration from scratch. Follow below steps for the same.

  1. Install Android SDK in your system.
  2. Set ANDROID_HOME environment variable which points to your SDK directory’s \sdk\ folder.
  3. Append ‘%ANDROID_HOME%\platform-tools’ value to your PATH environment variable.
  4. Start your Android emulator or connect your Android device to your system (Make sure you have Android Debugging option enabled in your Android device).
  5. Open Command Prompt and navigate to your Android SDK’s \platform-tools\ directory (Eg. D:\adt-bundle-windows-x86_64-20130514\sdk\platform-tools).
  6. Run ‘adb devices’ command. You should see your connected devices listed in Command Prompt window.
  7. Run ‘adb start-server’ command. It will start ADB server which will be used by Appium to send commands to your Android device.
  8. Now, navigate to Appium directory in your system and start Appium by clicking Appium.exe file.
  9. Click Launch button. Your Appium console should be displayed as below.
    Appium Console

    Appium Console

  10. Create a Java project in your Eclipse and reference Selenium 2 and TestNG JARs.
  11. Create a new Java class in your project and enter below code.

  12. Run your test using TestNG.

Let us know in the comments how this Appium Android configuration tutorial work for you.

Cheers!

Comments
  1. poggiali
    • Maharshi
  2. sanjeevakumar
  3. Pavithra
  4. Mahender
  5. e
  6. Rao
  7. Jimit
  8. Janet
    • Jimit
      • Janet
      • Janet
  9. Janet
  10. Janet
  11. Janet
  12. Janet
  13. Janet
    • Jimit
  14. shyam
  15. himanshu
    • Jagadish
    • Shiva Adirala
  16. prateek
  17. Dainese
    • Efrain
      • angel
    • angel
  18. Nacho
  19. surabhi

Leave a Reply

Your email address will not be published. Required fields are marked *