Getting Started with Appium

Similar documents
What is the Selendroid?

Appium mobile test automation

Class 1 Introduction to Selenium, Software Test Life Cycle.

But before understanding the Selenium WebDriver concept, we need to know about the Selenium first.

Preparing Rapise for Android Mobile Testing. Testing Architectures. Installation Notes

AUTOMATION FOR APPS 1

Configure Eclipse with Selenium Webdriver

Android Studio is google's official IDE(Integrated Development Environment) for Android Developers.

Participant Handbook

Basic Android Setup for Machine Vision Fall 2015

STQA Mini Project No. 2

Developing Android applications in Windows

Android SDK under Linux

Installing and configuring an Android device emulator. EntwicklerCamp 2012

Enabling Mobile Automation Testing using Open Source Tools

Manual Android Virtual Device Failed To Load Error

(Refer Slide Time: 0:48)

If you don t have the JDK, you will need to install it. 1. Go to

Android InsecureBankv2 Usage Guide. InsecureBankv2

USING APPIUM FOR MOBILE TEST AUTOMATION

Android Sdk Tutorial For Windows 7 64 Bit Full Version

Mobile Testing. Open Source Solu,ons

SELENIUM - REMOTE CONTROL

Turbo boost your digital app test automation with Jenkins

Android Studio Setup Procedure

Java Programming For Android Developers For Dummies By Barry A. Burd READ ONLINE

Homework 9: Stock Search Android App with Facebook Post A Mobile Phone Exercise

Tutorial on Basic Android Setup

SOLVING THE MOBILE TESTING CONUNDRUM

IT-G400 Series. Android 6.0 Quick Start Guide. This document is a Development Guide Book for IT-G400 application developers. Ver 1.

ECLIPSE TUTORIAL HOW TO WRITE JAVA PROGRAM IN ECLIPSE STEP BY STEP ECLIPSE TUTORIAL FOR BEGINNERS JAVA

SELENIUM. SELENIUM COMPONENTS Selenium IDE Selenium RC Selenium Web Driver Selenium Grid

Instructor s Notes Web Data Management Web Client/Server Concepts. Web Data Management Web Client/Server Concepts

1. Go to the URL Click on JDK download option

Eclipse Tutorial How To Write Java Program In Eclipse Step By Step Eclipse Tutorial For Beginners Java

BY: ATASHI SAMADDAR 1

JPA - INSTALLATION. Java version "1.7.0_60" Java TM SE Run Time Environment build b19

MultiBrowser Documentation

BrowseEmAll Documentation

STQA Mini Project No. 1

Automated Web Tests withselenium2

Android System Development Training 4-day session

SD Card with Eclipse/Emulator

Signing For Development/Debug

How to set up FMOD*, Cocos2D-x*, and OpenAL* Libraries for Android* on Intel Architecture

Research of Mobile Applications Automated Testing Using Uiautomator. Wang Xiu Ming, Huang Xin, Li Gui Zhi, Miao Cui Ping, Shen Ning*

Android Validating Xml Against Schema Java Example

A Sample PhoneGap Application Using SUP

Selenium Testing Training

How to Set up Eclipse and Android SDK Manager Environment You need to download the following

Android Development Tools = Eclipse + ADT + SDK

OSSW ICOSST 2009, Al-Khawarizmi Institute of Computer Science University of Engineering and Technology, Lahore

Lab Android Development Environment

webdriver selenium 08FE064A22BF82F5A04B63153DCF68BB Webdriver Selenium 1 / 6

MuleSoft.U Development Fundamentals (Mule 4) Setup Instructions

Chrome if I want to. What that should do, is have my specifications run against four different instances of Chrome, in parallel.

WA day Java prereq for Selenium. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

Usersguide SELENIUM_TEST type

Android Sdk Install Documentation Eclipse. Ubuntu >>>CLICK HERE<<<

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals

Software Installation Guide

12.1 Introduction OpenCV4Android SDK Getting the SDK

Shift Left Testing: are you ready? Live Webinar, Sept 19

by- Salman A. Khan, Ishendra Agarwal,Prateek Sahu,Manas

WebDriver: Controlling your Web Browser

Software Development. Integrated Software Environment

Java And Android Application Development For Dummies Ebook Set

ELET4133: Embedded Systems. Topic 3 Eclipse Tour & Building a First App

Getting Started with Android Development Zebra Android Link-OS SDK Android Studio

Ionic Tutorial. For Cross Platform Mobile Software Development

13 th Annual International Software Testing Conference in India 2013

AWS Lambda. 1.1 What is AWS Lambda?

Developing Ajax Web Apps with GWT. Session I

Choose OS and click on it

Android In Industrial Applications. A Field Report

Using the Computer Programming Environment

Running the Vortex Demo

Using Data Science to deliver Workforce & Labour Market Insights. Gary Gan Co-Founder, JobKred

Webservices In Java Tutorial For Beginners Using Netbeans Pdf

SeeTest Quality Assurance Platform SeeTestAutomation

Introduction TAMZ 1. Lab 1

E-BOOK JAVA DIAGRAM FRAMEWORK ARCHIVE

WA2535 Apache Cordova From the Ground Up. Classroom Setup Guide. Web Age Solutions Inc.

ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012

International Journal of Advance Engineering and Research Development. Proof of concept (Poc) selenium web driver based Automation framework

If you have a running/working installation you do not need to upgrade to V

Creating Android Apps from Rh10

Installation Instructions

User Guide for itrust over SMS and itrust over Wi-Fi Direct Installation and Use

Sahi. Cost effective Web Automation

1) What is the difference between Mobile device testing and mobile application testing?

G-WAN. Complete install process for Ubuntu (both for the 32 and the 64 OS versions).

Chapter 2 Setting Up for Development

Selenium Webdriver Github

Google Maps Troubleshooting

GAVIN KING RED HAT CEYLON SWARM

Code Composer Studio Managed Make Project File Error

In order to support developers, there needs to be a number of tools available which may be involved in the ultimate solution.

Android for Ubiquitous Computing Researchers. Andrew Rice University of Cambridge 17-Sep-2011

Transcription:

Getting Started with Appium

XBOSoft- Appium Tutorial 2 Appium Tutorial- A Guide forgetting Started in Windows Appium is proving to be a hot tool for mobile automation as it allows forcross platform automation tests forios, Android,and FirefoxOS applications. This whitepaper is a basic AppiumTutorial to help you get up and running with this tool. AthoughAppiumis most commonly usedon Macintosh and Linux, many use it on Windows. This tutorialprovides basic instructions and tips for setting up Appium on Windows.A test script is also provided in JAVA written for beginners to start up quickly. More reasons forselectingappium;quoteddirectly from http://appium.io/getting-started.html. 1. You don't have to recompile your app or modify it in any way, due to use of standard automation APIs on all platforms. 2. You can write tests with your favorite dev tools using any WebDriver-compatible language such as Java, Objective-C, JavaScript with Node.js (in both callback and yield-based flavours), PHP, Python, Ruby, C#, Clojure, or Perl with the Selenium WebDriver API and language-specific client libraries. 3. You can use any testing framework. For most people, their first step in learning Appium and knowing how to setup in Windows is to Google and find the following link: https://github.com/appium/appium/blob/master/docs/running-on-windows.md This is the official site, but it is severely out of date. Therefore, it s very hard for most people to accomplish what they want using the information found on this site. For example, it guides you to install ANT, Maven, and Git; but in fact they are not necessary. Additionally, many explanations are not clear enough for a beginner to understand. For example; You must supply the --no-reset and --full-reset flags currently for android to work on Windows. After going through this whole process, deciphering the directions and figuring out what actually is and is not required, we ve documented the simplest ways to set up Appium on Windows.

XBOSoft- Appium Tutorial 3 Setting up Appium in Windows 1. Install JDK 1.7 into your Windows 7; configure JAVA_HOME in your environment variable. 2. Install the Android SDK. Make sure you have an API Level 17 or higher. Set ANDROID_HOME to be your Android SDK path;add the tools and platform-tools folders to your PATH variable. 3. Download AppiumForWindows.zip from https://bitbucket.org/appium/appium.app/downloads/. Extract it to C:\. OK, now you ve completed the Appium setup. Wasn t that quick? Let s run a sample script to get a good feel for how it works.

XBOSoft- Appium Tutorial 4 Run Appium Script from Eclipse 1. Find Appium.exe from the folder you just extracted in Step 3 above. Double click Appium.exe to invoke Appium. (You need at least.net Framework 4.0 installed; but we suggest.net 4.5.) You will see the following window. 2. Check Perform Full Reset setting.

XBOSoft- Appium Tutorial 5 3. Click File > Preferences, check Reset Application State After Each Session setting. 4. Click the Launch button. If you can see the following information, congratulations, you ve started Appium successfully. 5. Download needed files:junit jar file from https://github.com/junit-team/junit/wiki/download-and-install. Selenium jar file from http://docs.seleniumhq.org/download/.

XBOSoft- Appium Tutorial 6 6. In Eclipse, create a JAVA project named TestAppium. Then, add the newly downloaded Junit and Selenium jar files to the Referenced Libraries. 7. Now you can write automation scripts for your application. We ve pasted a sample script here for your reference. File name: androidexamplejunit.java packagecom.qa.test; importjava.io.file; import java.net.url; importjava.util.concurrent.timeunit; importorg.openqa.selenium.by; importorg.openqa.selenium.webdriver; importorg.openqa.selenium.remote.capabilitytype; importorg.openqa.selenium.remote.desiredcapabilities; importorg.openqa.selenium.remote.remotewebdriver; importorg.junit.*; publicclassandroidexamplejunit { WebDriverdriver = null; @Before publicvoidsetup() throws Exception { FileappDir = newfile("c://users//xbosoft//desktop");

XBOSoft- Appium Tutorial 7 File app = newfile(appdir, "HelloAndroid.apk"); DesiredCapabilities capabilities = newdesiredcapabilities(); capabilities.setcapability("device", "Android"); capabilities.setcapability(capabilitytype.browser_name, ""); capabilities.setcapability(capabilitytype.version, "4.2.2"); capabilities.setcapability(capabilitytype.platform, "WINDOWS"); capabilities.setcapability("app-package", "com.example.helloandroid"); capabilities.setcapability("app-activity", "com.example.helloandroid.mainactivity"); capabilities.setcapability("app", app.getabsolutepath()); driver = newremotewebdriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlywait(80, TimeUnit.SECONDS); } @Test publicvoidappiumtestsample() throws Exception { driver.findelement(by.xpath("//button[@text='test']")).click(); driver.findelement(by.xpath("//button[@text='ok']")).click(); } @After publicvoidteardown() throws Exception { driver.quit(); } } 8. Prepare the device. Scripts can be run on both real devices and virtual devices.virtual devices can be created in Android SDK Tools > AVD Manager. Considering that a virtual device needs a Windows machine with at least 8 GB RAM to perform smoothly, we recommend using a real device. Get a mobile device with Android version equal to or higher than 4.2.2 and connect to your Windows machine with a USB cable. Remember to set the USB Debugging setting to ON in your mobile device. Click OK if you see the following dialog box.

XBOSoft- Appium Tutorial 8 To check if the device is really ready, you can use adb devices command to verify. 9. Prepare the APK file. The script showed above is specifically for the attached application HelloAndroid.apk. Download and put it onto your desktop; make sure the path in the line FileappDir = newfile("c://users//xbosoft//desktop"); is correct in your machine. Everything is ready. Now you can run the script in your Eclipse environment.

XBOSoft- Appium Tutorial 9 This basic script will first install the application onto your device; invoke it; click the Test button; click OK button in the confirmation window, and finally close it. Now you can use this as a base for your test scripts. Just Copy and modify the script for your needs and you can run your first Hello Android for your own application.

XBOSoft- Appium Tutorial 10 Conclusion As you can see, once you get around the installation maze, it s easy to use Appium for multi-platform mobile automation tasks.compared with test automation on a PC/Web platform, the mobile s screen is much smaller making manual input and operationmuch harder and more prone to errors not only for end users but also for testers! With mobile test automation, you can automatically handlemanual testing activities that require a lot of manual input and put into yoursmoke and regression testing.this will save both time and your eyesight. Photo Reference: Cover photo courtesy of Richard Leone http://www.flickr.com/photos/richardleonard/104833424/