Skip to main content

SCRUMble ! - New Book about SCRUM

 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...

Mobile Automation using Appium-Java

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

Popular posts from this blog

Bipartite and semihamiltonian graphs

Bipartite Graph: A graph is bipartite if its vertex set can be partitioned into two subsets X and Y so that every edge has one end in X and one end in Y; such a partition (X,Y) is called bipartition of the graph, and X and Y its parts. ex.- Notation: We denote a bipartite graph G with bipartition (X,Y) by G[X,Y]. Complete Bipartite Graph: If G[X,Y] is simple and every vertex in X is joined to every vertex in Y, then G is called a Complete Bipartite graph. ex.- Semi-Hamiltonian Graph: A semi-Hamiltonian graph is a graph that contains a Hamiltonian path, but not a Hamilton cycle. Hamiltonian Path: A Hamiltonian path in an undirected or directed graph is a path which visits each vertex exactly once. ex.- C-A-D-B-E is a Hamiltonian path Hamiltonian Cycle: A Hamiltonian cycle or a Hamiltonian Circuit is a Hamiltonian path which is a cycle. This post will be useful in understanding a question: "The nabhi kamal grapg is:" (A)Bipartite graph (B)Semi-...

Accessibility : An Important consideration in software development

What is Accessibility? Accessibility is a very important piece of consideration in today's market. It means the quality of being able to be reached or entered. Accessibility focuses on how a physically or mentally disabled person accesses or benefits from a site, system or application.  Conformance with accessibility guidelines while developing a web page or an app is important. What does accessibility mean for software development? Accessibility isn't about taking away functionality or making things difficult for the software development team. It is about making sure all possible users have a way to use the system.  How do information architects and web designers/developers design web pages to be compatible with assistive devices is an important aspect when thinking about accessibility. What does accessibility mean for software testing? Accessibility Testing checks if a product is accessible to the people having disabilities. We need to understand ...

Android 102

This post is in continuation with an earlier post : Android 101 1. Common attributes used in views and viewgroups: -layout_width -layout_height -layout_marginTop -layout_marginBottom -layout_marginLeft -layout_marginRight -layout_gravity: specifies how child views are positioned -layout_weight: specifies how much of the extra space in the layout should be allocated to the view -layout_x -layout_y 2. LinearLayout: arranges views in a single column or a single row. Child views can be arranged either vertically or horizontally. 3.AbsoluteLayout: enables you to specify the exact location of its children using layout_x and layout_y. AbsoluteLayout has been deprecated since android 1.5 4.TableLayout: groups views into rows and columns. You use <TableRow> element to designate a row in the table. Each row can contain one or more views. Each view you place within a row forms a cell. The width of each column is determined by the largest width of each cell in that column. 5....