Sunteți pe pagina 1din 9

1 Contents

1 Appium introduction ............................................................................................................................. 2


1.1 What is appium? ........................................................................................................................... 2
1.2 Architecture of appium ................................................................................................................. 3
2 Required download files and installations ............................................................................................ 4
2.1 Download jdk (32 bit/64 bit) and install ....................................................................................... 4
2.1.1 Setting the Java_Home Variable ........................................................................................... 5
2.1.2 Setting the Java Path Variable .............................................................................................. 7
2.2 Download eclipse and install ........................................................................................................ 8
2.3 Download associate selenium jars ................................................................................................ 8
2.4 Download android studio and install ............................................. Error! Bookmark not defined.
2.4.1 Setting the Android_Home Variable ...................................... Error! Bookmark not defined.
2.5 Download appium client libraries .................................................. Error! Bookmark not defined.
2.6 Download Appium Server And Install ......................................... Error! Bookmark not defined.
2.7 Download node js and install (optional) ...................................... Error! Bookmark not defined.
2.7.1 Setting the node js path variable .......................................... Error! Bookmark not defined.
2.8 Download Pdanet+ and install ...................................................... Error! Bookmark not defined.
2.9 Download Vysor and install ........................................................... Error! Bookmark not defined.
3 Maven setup for appium ........................................................................ Error! Bookmark not defined.
3.1 Why maven and appium? .............................................................. Error! Bookmark not defined.
3.2 How to install maven: .................................................................... Error! Bookmark not defined.
3.3 How to create maven project in eclipse ........................................ Error! Bookmark not defined.
3.4 Pom.Xml ......................................................................................... Error! Bookmark not defined.
4 How to install TestNG ........................................................................... Error! Bookmark not defined.
4.1 How to add TestNG to project ....................................................... Error! Bookmark not defined.
5 How to create new appium project in eclipse ........................................ Error! Bookmark not defined.
6 Sample Program ..................................................................................... Error! Bookmark not defined.
7 Steps to execute the sample program using Real Device ....................... Error! Bookmark not defined.
7.1 How to Enable USB Debugging: ..................................................... Error! Bookmark not defined.
7.2 How to Know the Device details .................................................... Error! Bookmark not defined.
8 Steps to execute the sample program using Emulator ........................... Error! Bookmark not defined.
How to install Appium with step by step procedure and How to Write Appium
Program using Real Device and Emulator

1 Appium introduction

Mobile Automation testing is an exceptionally successful contrasting option to conventional manual


testing. It diminishes the time required for a testing and accomplishes speedy outcomes. Using
automation, we can re-use same tests to re-execute on different devices and different Operating System.

There is a number of Mobile Automation testing tools available, some of them are paid and some are
open source.

 It supports many programming languages like Java, Ruby, Python, PHP, C# etc.
 By using Appium, we can automate ios, Android, and Firefox OS platform.
 It supports automation of Native apps, Mobile Web apps, and Hybrid Apps.
 It doesn’t require access to your source code or library. You are testing apps which are used by the
real user.
 It uses Selenium web driver.
 It is free to use.
 It supports current and future versions of Android OS.

The list down of these benefits must have encouraged you to know more about it. So, what are we waiting
for? Let’s scorch more about the term ‘Appium’!

1.1 What is Appium?

Appium is an open source, cross-platform test automation tool used to automate native, hybrid and mobile
web apps. We can run automation tests on actual devices, emulators, and simulators.

Native apps are built for a particular device and operating system. Native apps are installed directly on a
mobile device.

Mobile web apps are web apps accessed using a mobile browser (mobile version’ of a website). They
don’t have to install.

Hybrid apps have a wrapper around a “web view” — a native control that enables interaction with web
content.
1.2 Architecture of Appium

Appium is an http server which was written in node.js, its architecture is as same as selenium web driver
server.

 Receiving requests from the client libraries


 Executes the commands on the target devices & emulators
 Responds with an http response.

Appium will support only android and ios but not windows platform. And the architecture of appium is
different from android to ios.

Generally, when you’re downloading appium, you are basically downloading the server. When we
execute our scripts, an http request goes in json format to appium server. Then appium server sends the
command to ios instruments which need bootstrap.js file to automate ios apps and for android, it sends to
uiautomator which needs bootstrap jar.
The uiautomator testing framework allows you to test your user interface (UI) efficiently by creating
automated functional UI test cases that can be run against your app on one or more devices.

When we execute the test scripts, Appium sends the command to the uiautomator. To listen to our
commands we need a TCP server. So, here bootstrap.jar works as TCP server. And then it executes the
command on the devices.
Before starting with Appium, we first need to setup environment to run scripts on Android platform using
Appium.

2 Required download files and installations


2.1 Download jdk (32 bit/64 bit) and install

 jdk download link http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-


2133151.html
 Click on jdk 8 with respect to Os and bit size(32 bit/64 bit)
 Paste that download in personal folder.
 Double click on that download file to start installation.
 Click next button until finish.

2.1.1 Setting the Java_Home Variable

 Open the control panel -> system or security –> system; the same thing can be done by right-clicking
on ‘my computer’ and choosing properties.
 Choose ‘advanced system settings‘.
 Under the advanced tab choose the ‘environment variable…option.
 Select new in the system variables.
 Define the variable name as ‘java_home‘and variable value as ‘c:\program files\java\jdk1.8.0_45‘ (for
this example jdk version 1.8.0 was installed in ‘c:\program files\java\jdk1.8.0_45‘ folder; if needed,
modify this value to reflect the real location).
2.1.2 Setting the Java Path Variable

 We need to specify the location in the path variable. For path, most probably it will already exist on
your machine. So just select it and choose the edit option.
 In editor add the value ‘;%java_home%\bin‘ or c:program files\java\jdk1.8.0_45\bin‘.

 Go To ‘Start Menu’ and type ‘cmd’ and Enter. It will launch the Command Prompt, type java / javac.
It will display the following information.
 If command prompt displays like above, jdk is installed successfully in your system.

2.2 Download eclipse and install

 Eclipse download link http://www.eclipse.org/downloads/


 Click on 32bit /64bit with respect to Os and bit size.
 Click download.

 Paste that download in personal folder.


 Extract that download file.
 Open extracted eclipse folder.
 Create shortcut to eclipse on desktop.
 Double click on that eclipse shortcut in desktop.
 Browse a personal folder as a workspace.
 Select don’t ask again check box. Click ok.
 Close welcome screen.

2.3 Download associate selenium jars

 Selenium jars download link http://www.seleniumhq.org/download/


 Click download for java in selenium webdriver language list.
 Paste that download in personal folder.
 Extract that download file.

For more information register for the demo at

https://qa-masters.com/trainings/mobile-testing-trainings/appium

S-ar putea să vă placă și