Skip to main content

Xamarin UI Tests – Deep dive Part 1


As the title may describe this is the first of the series of articles that will cover the UI Test of Xamarin in a deep dive, we will start simple and then dig deeper as we go.
Since this is very well the first of the series, it will mostly cover up the architecture and the testing technique that Xamarin UI Tests uses.

The Technology

Xamarin UI Test is an automation testing framework similar to selenium, Watir, Watin (.net), Robot and Sikuli, if you have used BDD (Behavioral Driven Development) or a more advanced TDD (Test Driven Development) approach at least you must have come across one of these frameworks, and in that perspective comes Xamarin UI Testing as an automation framework designed specifically for Xamarin Automation testing,
For starter Xamarin UI Tests was not build from scratch, instead it was built on top of another UI Automation testing framework that is targeting android and iOS sepecifically which is Calabash, I have to say that this choice was made wisely as of not only that Calabash does have the proper support and documentation nevertheless that superior support it gives to mobile platforms compared with Libraries such as TouchTest, UIAutomation, MonkeyTalk ‘Previously FoneMonkey’, in order to check more about this please refer to this blog, though it is written by one of calabash team members
However now the calabash is part of the Xamarin, as Xamarin already acquired the framework for themselves and then set out to make their Xamarin Test cloud, won’t talk about that now but I will sure have that in upcoming posts where you can upload your tests to the test cloud to be ran on pre-selected devices.

The BDD Mindset in Xamarin UI Test


If you are going for tests then you are going first, this a saying that defines first things first about TDD, But TDD has been sometimes misguiding people to shape their code instead of shaping their business into code, so a certain need for a step towards the business, built on top of the TDD itself, and thus Comes BDD (Behavioral Driven Development), it takes TDD to a further business level, in which Developer and business owner can meet and write tests together in a language that can be understood by both the business people with all that money and those nerdy mombo jambos they call developers, and thus comes the idea of converting natural language like English statements into actual code, and of course the tools that will make this happen, For Xamarin since it is Calabash based Cucumber has been tightly coupled with it, if you have used BDD Before and you happen to come from a .Net development background such as myself you would probably know Specflow, which serves the same exact purpose as cucumber.

Whats Next?

In the Upcoming article we will go over the Xamarin UI tests functionality and how we can do a basic UI test on iOS and Android.   


  1. Quantum Binary Signals

    Professional trading signals sent to your cell phone daily.

    Start following our signals right now and earn up to 270% per day.

  2. If you need your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (no matter why you broke up) you must watch this video
    right away...

    (VIDEO) Text Your Ex Back?


Post a Comment

Popular posts from this blog

(AsyncWebClient) Async Webclient for windows phone 8

Using windows phone web client is pretty common but the thing is you can not use it using Async -> Await mechanism so i used threading to create an async functionality for The Download string and upload string methods here is the code below // Comment public class AsyncWebClient { public Task DownloadString(Uri uri) { var task = new TaskCompletionSource(); try { var client = new WebClient(); client.DownloadStringCompleted += (s, e) => { task.SetResult(e.Result); }; client.DownloadStringAsync(uri); } catch (Exception ex) { task.SetException(ex); } return task.Task; } public Task UploadString(Uri uri, string content) { var task = new TaskCompletionSource(); try { var client…

RuntimeBinderException cannot resolver property in Unit Test in case of dynamic return.. Solved