DZone
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
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report

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 · Tutorial
Like (2)
Save
Tweet
Share
6.82K 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

  • Strategies for Kubernetes Cluster Administrators: Understanding Pod Scheduling
  • Building a REST API With AWS Gateway and Python
  • Tackling the Top 5 Kubernetes Debugging Challenges
  • Getting a Private SSL Certificate Free of Cost

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • 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: