Skip to main content

Appium Configuration with Visual studio for selenium C# development

Prerequisites: 1. Visual Studio Ultimate (2010 or above) (Because MSTest is present in that) 2. Android SDK For Windows (Download Link) (Website link) 3. Appium For Windows (Website Link) (Download Link) 4. A Real Android Device running Android 4.2 or Above 5. A USB Cable to attach your Android Phone to Your PC. 6. ADB Interface Drivers for your device (Link on how to get that ) (very important Step) Some Configurations for Android SDK and Appium: • When you have installed Android SDK, go to My Computer, right click, click Properties, click Advanced System Settings, and click Environment Variables. • Create a new User Variable with the name “ANDROID_HOME”. Give path to your sdk folder in the value. The default path is C:\Program Files (x86)\Android\android-sdk • Edit the PATH variable in “System Variable” Section. Append the path to your tools folder and platform-tools folder. Separated with “;” The paths are C:\Program Files (x86)\Android\android-sdk\tools C:\Program Files (x86)\Android\android-sdk\platform-tools See the image below. • Connect your Android Device with USB Cable. To make sure your android Device is connected with your PC, we have to do following. Go to C:\Program Files (x86)\Android\android-sdk\tools. Click on “uiautomatorviewer.bat”. A window will open. See Image. You can use this window to inspect the elements of your app in android. Open the appropriate app in your android device and click on “Device Screenshot” button on this screen. If you receive this error message “No Android devices were found by adb” That means adb interface drivers are not installed on your system. You have to read again point number 6 in the Prerequisites section. If android device is successfully connected, you should see a snapshot along with Object Map in this window like this. •Unzip in a folder. Open Appium.exe, you should see a window like this. Click on the android Icon on the top left of this window. You will see a window in which you can configure the platform and version of your android on which you want to test. I have filled the following configurations there. Now click on the Play button on the top right corner of the window. Appium server will start with the configurations you have provided. •Developer options should be enabled on your android device, with these two options. Usb Debugging should be enabled. Stay Awake should be enabled. Now it is time to code. Open Visual Studio Ultimate (2010 or above) Create a UnitTest project. Install “Appium Web Driver” and “Selenium WebDriver” using NuGet package manager. (The easiest way) If you don’t want to use NuGet package manager, you can manually download Appium dot net driver and selenium web driver c# libraries and add them to your solution Your reference section should look like this. For every application you want to test, you must know its package name and app activity name. So to know about these attributes, you need to download a little android app on your phone. It is called apkInfo. It will show you the package name and activity name of any android app installed on your phone. Just pass these parameters here and that app will launch on your phone by automation code. Conclusion. If you are familiar with Selenium WebDriver, coding in Appium is not so different. Only problem was the configuration. If you have done this right, you should be able start writing scripts for your android. I tried to explain this as simply as possible.


Popular posts from this blog

Istqb,cste inforamtions and training centers in India

About istqb:
The ISTQB was officially founded as an International Testing Qualifications Board in Edinburgh in November 2002 and it is responsible for the "ISTQB Certified Tester", which is an international qualification scheme.

ISTQB is the parent body responsible for approving various national boards in addition to other tasks such as defining the syllabi for various certifications.
website url: FAQ :

for examination and preparation and sample question papers available in below link

will be helpful for ISTQB

join yahoo groups:
in this group you can ask your queries about istqb examinations and certification related doubts and sample papers to certified level and advance level question keep on raised by members.

ISTQB-India@ yahoogroups. com

CSTE information:

QAI, India, the premier knowledge corporation in the software engineerin…

Equivalence partitioning

Equivalence partitioning:
Equivalence partitioning is a method for deriving test cases. In this method, classes of input conditions called equivalence classes are identified such that each member of the class causes the same kind of processing and output to occur.

In this method, the tester identifies various equivalence classes for partitioning. A class is a set of input conditions that are is likely to be handled the same way by the system. If the system were to handle one case in the class erroneously, it would handle all cases erroneously.

Equivalence partitioning drastically cuts down the number of test cases required to test a system reasonably. It is an attempt to get a good 'hit rate', to find the most errors with the smallest number of test cases.

To use equivalence partitioning, you will need to perform four steps:
Determining conditions to be TestedDefining TestsDesigning test casesIdentifying Final set of Test Cases

Defining Tests

A number of items must be considered when…

Cyclomatic complexity

Cyclomatic complexity is a software metric (measurement). It was developed by Thomas McCabe and is used to measure the complexity of a program. It directly measures the number of linearly independent paths through a program's source code. It is computed using a graph that describes the control flow of the program. The nodes of the graph correspond to the commands of a program. A directed edge connects two nodes if the second command might be executed immediately after the first command.


M = E − N + 2P


M = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components.

"M" is alternatively defined to be one larger than the number of decision points (if/case-statements, while-statements, etc) in a module (function, procedure, chart node, etc.), or more generally a system.

Separate subroutines are treated as being independent, disconnected components of the program's control flow graph.