Skip to main content

Xamarin UI Tests – Deep dive Part 1

Intro

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 http://blog.lesspainful.com/2012/03/07/Calabash-iOS/
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


Cucumber

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.   


Comments

Popular posts from this blog

Windows Phone 8 - Application bar command binding MVVM

This is a short post in which i will explain how on Windows phone 8 to bind the application bar button or menu item, first this is only a fix for the  BindableApplicationbar  which supports windows phone 7 only, i just made it support windows 8 no features added or anything. i have uploaded the dll file here so it can be accessible easily here is the link to download http://sdrv.ms/RApUal now that you got the link lets check how we gonna use it you can refer to BinableApplicationbar  or check out the code here that i actually used in my app and i already read it there !  Add a reference to the BindableApplicationBar library here is the link again  http://sdrv.ms/RApUal Add XML namespace declaration in your page's XAML: xmlns : bar ="clr-namespace:BindableApplicationBar;assembly=BindableApplicationBar" Set Bindable.ApplicationBar property on your page code as in the snippet below: < phone : PhoneApplicationPage >  ...

Windows 8 – XAML/C# how to Add multi push pins to map control Bing maps

Greetings readers I promised you in my previous post that I am gonna go a little bit deeper in the Bing map control and I will should more advanced scenarios and one is push pins, Basically I am going to tell you how you can add push pin to your map and also how to dynamically populate those push pins using binding Refer to my previous article Using bing maps part one  for more details cause I am going build on it so if you ever feel that you don’t understand something just click the link and spend a few minutes reading it, I promise you it will prove worthy. First lets add a normal push pin to our map  < Grid Background = " {StaticResource ApplicationPageBackgroundThemeBrush} " > < bm : Map x:Name = " MyMap " Width = " 640 " Height = " 480 " Credentials = " {StaticResource BingMapsApiKey} " > < bm : Map.Children > < bm : Pushpin x:Name = ...

Windows 8 RTM Using bing map control. How to use the map control in a metro (modern) style App

This is a briefing article on how to start using Bing map control using XAML & C#, to begin with you must first follow a set of instruction to get a license key for using Bing maps. Lets talk first about bing maps and the map control Bing map control is a part of the Bing SDK for windows 8 modern style apps About the SDK as Microsoft says : Bing Maps SDK for Metro style apps (RTM Beta)   combines the power of Windows 8 and   Bing Maps ™ to provide an enhanced mapping experience for modern style apps. Developers can use this Bing Maps control to incorporate the latest road maps and aerial views into a Windows 8 Metro style app. This SDK includes controls for apps built using JavaScript, as well as apps built using C#, C++, and Visual Basic, and requires a   Bing Maps Key   for a Windows Metro style app. (If you have an existing “Metro style apps (BETA)” key, it will still work until the evaluation period expires.) Now lets get started and here...