DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Appium-Mobile App Automation (Configuration and Installation), Part 1

Appium-Mobile App Automation (Configuration and Installation), Part 1

In tutorial, we'll walk you through using Appium to run tests on your Android app from installation all the way to the automation test case.

manoj mathpal user avatar by
manoj mathpal
·
Mar. 08, 17 · Mobile Zone · Tutorial
Like (2)
Save
Tweet
6.66K Views

Join the DZone community and get the full member experience.

Join For Free

Part One

Appium is an open source test automation framework which is used for testing hybrid apps, native apps, and mobile web apps for Android and iOS using webdriver.

Appium works on a distributed open source mobile UI testing framework. It runs the automation test on real devices, emulators, and simulators. Appium translates the selenium web-driver command into UIautomation, like Android device. Appium supports lots of languages like Java, PHP, Ruby, Python, JavaScript, Node.js, etc.

How to Use Appium:

To use Appium, we need the following items:

  1. Android sdk

  2. java

  3. TestNg

  4. Appium for Ubuntu

  5. Selenium jar

  6. Apk app

So, we start from Android sdk. First of all, download the Android sdk. After downloading the sdk, run the following command in your terminal.

$android

This will download all the Android's API. Whatever you used after that we enter into the emulator open command. It will open the emulator.

android-avd

emulatorstart

Next, we start the emulator, which works on Android API 5.0.1.

android-emulaoropen

After that, we will install the Appium on Ubuntu machine.

> brew install node      # get node.js
> npm install -g appium  # get appium
> npm install wd         # get appium client
> appium &               # start appium
> node your-appium-test.js

After installation, we start the Appium server.

appium

We can see our connected device listed in Command Prompt type 'adb devices' on our terminal.

adbdevice

Appium does not support versions of Android lower than 4.2. So if you want to test the lower version of Android you can use Selendroid.

Part Two

In the first section of this article, we described the Installation and configuration of Appium on an Ubuntu machine. Now we will explain how to run automation test cases on Android devices using Appium.

So, for test the app we have to put the app apk in an Android device which we want to test. After that, we start writing the code using selenium webdriver. We are using a TestNg framework with selenium webdriver.

So when we run the program, the Appium server automatically starts the mapping with the emulator and running the script on the emulator.

appiumcode

appium-server-start

Here is the result of automation test case.

report

Feel free to ask me any question.

Thanks.

mobile app

Published at DZone with permission of manoj mathpal, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Applying Domain-Driven Design Principles to Microservice Architectures
  • Which Backend Frameworks Are Impacting Web App Development Immensely?
  • API Security Weekly: Issue 165
  • Event-Driven Microservices?

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo