SCRUMble ! Hello Blog Readers! Thank you for all your support and encouragement. I have something exciting for you all. I have recently written and published a new book called 'SCRUMble !'. It is currently available on pothi store. It will be soon available on Amazon and Flipkart as well. Please get your copy and do let me know your reviews. -Abhishek Sathe SCRUMble ! Written and Published by: Abhishek Sathe Distributed by: pothi.com Order your copy now: https://store.pothi.com/book/abhishek-sathe-scrumble/ Coming soon on Amazon and Flipkart About the book: Scrum is a framework for solving complex problems largely adapted by Software Development field. There are multiple ag...
Appium is an open-source, UI automation tool for automating mobile apps.
This tutorial is helpful for setting up a Java-Selenium based project in Eclipse IDE for you to be able to execute test automation scripts for your mobile application. Please note that, we assume you already have an existing project for importing locally or cloning from git.
Steps to be performed for setup required for automation of mobile applications using Appium Mobile Automation tool using Java-Selenium:
Below is the list of steps that needs to be performed for setting up the environment for execution of test cases on Windows:
JDK Installation.
Setting PATH variable.
Installation of Android SDK.
Installation of Eclipse.
Importing a project in Eclipse.
Install Eclipse ADT plugin.
Install other required softwares.
Install Appium.
JDK Installation:
Install JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
After installation of java software, You need to set JAVA_HOME variable in your windows system. Example : C:\Program Files\Java\jdk1.8.0_45.
You need to set JDK's bin folder path in PATH variable of system variables. You will find bin folder inside your JDK folder.
Verify java is installed properly or not.
To verify java software is installed properly or not, Open command prompt.
Run command "java -version"
Android SDK Installation:
Next, download android SDK zip file from http://developer.android.com/sdk/index.html extract it and install required packages using SDK Manager inside the SDK folder.
Create a new environment variable ‘ANDROID_HOME’ and set it equal to path of SDK folder. Also, add path of SDK\tools and SDK\platform-tools\ in PATH variables of environment variables.
To verify android sdk is installed properly or not, Open command prompt.
Run command “android"
You can download Eclipse from http://www.eclipse.org/downloads/ extract it and run Eclipse.exe.
Importing an Existing project in Eclipse:
Go to File -> Import. Select Existing Projects into Workspace and click Next.
Click the radio button next to Select archive file and click the Browse button on the following dialog.
Find the archive file on your hard disk. Click Open to select it.
If you have selected an archive file containing an entire Eclipse project, the project name will appear in the box below, already checked. Click Finish to perform the import.
Alternatively, you can clone a project from git to your local directory.
To clone a Repository from git, first install git.
Use command git clone PATH_TO_REPOSITORY.
Install Eclipse ADT Plugin:
Open Eclipse. Goto Help->Install New Software->Add. Then add ‘https://dl-ssl.google.com/android/eclipse’ inside Location textbox and click OK.
Then install all the developer tools.
Install other required softwares:
Now, Download And Install Microsoft .Net Framework.
Double click on .Net framework installation .exe file and continue with installations with default options.
Next, download And Install Node JS from https://nodejs.org/en/download/.
Double click on Node JS installation .msi file.
Proceed for installation with default selected options and settings on each screen of installation dialog.
Install Appium:
Download appium from http://appium.io/ and install Appium zip file. We have installed Appium 1.4.16.1.
Configure Appium:
Appium will launch with default configuration parameters. To reduce errors during software automation test execution, You need to set/modify few appium parameters as per your requirement if they are wrong or not set properly.
Click on Android Settings button.
Select Platform Name = Android
Select Automation Name = Appium
Select PlatformVersion = Your android device's OS version
Click on General Settings button.
Note down Server Address and Post number. We need it during appium software automation test script creation
Un-check Pre-Launch Application check box if it is checked
Launch Appium from Windows Start menu.
By Default Server Address is :
127.0.0.1 and Port Number is : 4723.
Click on Start button to start appium
node server.
It will take some time to launch node server.
Executing the Tests:
Connect Android Device With PC In USB Debugging Mode.
Enable Developer Option In Android Device.To start USB Debugging mode, Connect your device with PC using USB cable.
Go to Settings -> Developer options.
There will be option USB debugging with check box. Check it.
It will ask you to "Allow USB debugging?". Tap on OK.
It will enable USB debugging mode for your android device.To verify USB debugging mode, Open command prompt in your PC.
Run command: adb devices.
Finally, right click on pom.xml file in Eclipse and navigate on Run As then click on Maven test.
Interptrting the results:
Once you have done executing the test suite, you can find the file named ‘index.html’ inside osram-automation->result folder inside the date’s timestamp when you executed the test suite.
Here you can find Results tab.
Under this you can view:
-Total methods(test cases)
-Failed methods and
-Passed methods.
Also, for failed test methods, goto automation_folder->result->screenshot folder. Here you can view screenshots for failed test cases.
If you like this blog post then make sure to get your own copy of these awesome books to your personal collection:
Comments
Post a Comment