Tuesday, 27 November 2012

Coded UI Testing - Using Microsoft Test Manager

At work a few months ago my development manager told me 'we need to implement coded UI testing' then he told me I think you can use Microsoft Test Manger, your a clever guy work it out.

So I did, this blog post is my experience of creating coded UI tests using Visual Studio with Microsoft Test manager.

Before I start, I would like to thank Brian Keller from Microsoft who helped me out while I was discovering how all this worked.

What is Automated Coded UI Testing?

"Automated Coded UI testing drive your application through it's user interface."
http://msdn.microsoft.com/en-us/library/dd286726.aspx

They allow you to create tests that will automatically check your user interface will behave as expected.

The computer will automatically open your application click where you tell it too, enter data in to forms, while doing so it can check that your application displays the correct validation messages.

If implemented correctly this tool can save you a lot of time and make your applications more reliable by helping you to find problems within your user interface as your application changes.

Part 1 - Creating a very simple Coded UI Test

Before I get in to some of the more advanced features (for example using Microsoft Test Manager) I want to give complete beginners a feel of what this is all about by walking you through a very simple example. So lets get started and fire up Visual Studio.

You have heard of google right? :-) Well what we are going to do is create a coded ui test that checks if the search engine is returning results when we click search on the home page.