This is the first blog in our Things You Should Know About Appium blog series, and we’ll naturally start with the basic things, getting the environment set up, Appium pieces installed and running on your machine. Depending on which programming language you are using, we’ve tried to provide here everything, step-by-step, for those 4 main languages.
To get started, first download our Appium example. The example is available in C#, Python, Java and Ruby, and we’ll be using these as a basis for next examples. Okay, then depending on which programming language you will be using, select the appropriate client library as follows. Or you can download our free Appium beginner’s guide to access your local copy anytime.
Most of the Testdroid examples are located in our Github repositories. To make most out of the existing samples you should have Git installed. If you are new to Git, there is a very good guide on how to install Git on a popular operating system here. Below is the abbreviated version of the installation procedures.
Download the latest git command line tool from http://git-scm.com/download/mac install it using normal Mac installation procedure.
The easiest and most straight forward way is to install the Github Windows application.
Brew is a handy package manager tool, similar to apt-get. If you don’t have it, check the brew website for its one-liner installation.
If Python 2.7 or newer is not installed, download and run the setup from Python’s download center. To add Python into environment variables, go to Windows “System properties” → “Advanced System Settings” → “Environment Variables” → “System Variables” → choose “Path” and press “Edit…” and then insert (assuming you have installed Python in the default location) ;C:Python27;C:Python27Scripts at the end separating each path with semicolon ; . Make sure to re-launch the command prompt to bring new environment variables into effect.
Appium testing supports writing tests in multiple programming languages, including Java. Testing can be done against native or hybrid apps or responsive web pages on both iOS and Android devices. Only the test setups differ.
With Java, things are pretty simple and you only need to configure your test file accordingly. You can use SampleAppium(iOS)Test.java as an example/template.
In case you don’t have an IDE with Maven included and would like to launch the example from the command line, you will need to make sure that Maven is properly installed. Here’s a link to the installation instructions.
Launch the AppiumTest.sln on Visual Studio and make sure that the NUnit Test Adapter is installed through the Extension Manager. Use Test Explorer to run your tests.
If you are new with desired capabilities or if you are looking for more information on how to use those efficiently, take a look at this article.
In this Java example, you only really need to configure testdroid_username and testdroid_password, since sample application upload is included.
Before the test can start you need to upload your application to Bitbar Testing. This can be done either via API or you can do it manually as well.
There’s a myriad of different ways you can set up, build and run your Appium tests. The ones provided here were just one example of how things can be done. Stay tuned – more good stuff about Appium is coming out in few days!