Appium Getting Started
Introduction to Mobile Test Automation
Before the mobile application development boom, we have explored and tried every bit of web application testing and kind of conquered that space. Wondering what makes mobile app test automation challenging?
Couple of things, which I would want to highlight here:
Never ending screen size and form factors
Apps hosted in a sandboxed environment and very limited inter process communication
Network Challenges
Usability aspect of mobile and the complexity in terms of navigation
What is Appium
Appium is an open source test automation tool for mobile applications. It allows you to test all the three types of mobile applications: native, hybrid and mobile web.
It also allows you to run the automated tests on actual devices, emulators and simulators.
Today when every mobile app is made in at least two platform iOS and Android, you for sure need a tool, which allows testing cross platform. Having two different frameworks for the same app increases the cost of the product and time to maintain it as well.
The basic philosophy of Appium is that you should be able to reuse code between iOS and Android, and that’s why when you see the API they are same across iOS and android. Another important thing to highlight here is that unlike Calabash, Appium doesn’t modify your app or need you to even recompile the app.
Appium let’s you choose the language you want to write your test in. It doesn’t dictate the language or framework to be used.
Architecture
So how does Appium do all this? Let’s try to understand what happens behind the scenes.
When you download the Appium app you are basically downloading the server. The server is written in Node.js and implements the Selenium WebDriver. It allows one to use available WebDriver client to fire your tests. And then your mobile app acts precisely like a web app where the DOM is represented by View hierarchy.
So this server basically exposes REST api which performs the following actions:
1) Receives connection from client
2) Listen command
3) Execute command
4) Respond back the command execution status
In terms of architecture diagram, below is how Appium can be explained
System Installation
Before installing Appium, you need to get few other things in ecosystem:
- .net framework click here to download
- Java latest JDK click here to download
- Node.js click here to download
- MAVEN Download maven
- GIT Download GIT
- Eclipse Download latest eclipse version
- Android SDK Download Android SDK
- Selenium: Download webdriver java library
- Appium Client : Appium java client library[Link]
Configuring installed software
Java JDK
- · Go to JDK folder and copy path like
- · Set JAVA_HOME environment variable· Set JDK bin folder path variable (Do not delete existing path just put “;” at end and paste JDK bil folder path· Check java is properly installed and configured in systemAndroid SDK
- · Extract download ADK zip in any hard drive
Structure of directory after extraction- Open SDK Manager >> tools >> install Android API version
Click checkbox >> Install packages- Set ANDROID_HOME system/user variable and add pathCopy SDK directory pathCreate system/user variable and add SDK directory path
Add adb.exe file directory path in path variable
Verify SDK setup
Create ,Configure and start Android Emulator (AVD )
· Open SDK manager and click on tools >> Manage AVD
Note:
To create AVD , in SDK you should have installed at least 1 API ie. API – 19
Appium works n API – 17 +
Click on New
Configure AVD as shown in below image and click on ok
§ Devices AVD added in list and select AVD >> click Start >>Launch
§ AVD will launch in couple of minute and it’ll start loading Android version
§ Loding API on AVD will take around 3 to 5 min and after loading it’ll look like below image
Install Node.js
§ Click on Setup file and follow instruction
Maven configuration
§ Extract maven zip file in C: driver
§ Add MAVEN_HOME in system/user variable
§ Add maven >> bin directory path in system path veriable
§ Verify maven installation
GIT Installation
§ Click on Setup file and follow instruction
§ GIT directory automatically added in system path variable
§ Verify git setup
Eclipse installation
§ Extract eclipse bundle in any hard driver click on Eclipse.exe 
§ Create workspace
§ Install TestNG plugin
o Go to Help >> install new software >>enter url
And follow instruction
§ Install MAVEN plugin
Go to Help >> install new software >>enter url
And follow instruction
§ Install ADT plugin
Go to Help >> install new software >>enter url
And follow instruction
No comments:
Post a Comment