UI test with WatiN for TDD in .NET

Hello all

Today I will show how to test UI ( User Interfaces ) in .NET with WatiN . WatiN is UI test framework. Though its a very simple but i have felt the documentation is not rich enough with example. So i have taken an initiative to make it more userfriendly for the developers.

I will not emphasize on how to configure WatiN as its already well documented in the following links. What i will try to do is make familiar with HTML controls that’s needed to be validated .

Follow accordingly to configure WatiN :

  1. Add reference as the documentation of WatiN, you dont have to follow the example which is documented there just add the reference.
  2. If you don’t know how to add reference please see this and for NUnit see this
  3. Visit this link for a good CodeProject’s example.

One of the common mistake we do is, open a class file in our website project and start the writing the test code in it, but what we have to do is make a new Class Project ,add reference in that project & select as startup project for NUnit test.

Thats all for today.


User ScrumPad for your Agile based projects.