WatiN recommendations / rules of thumb for an ASP.NET MVC application

I am an avid fan of TDD and BDD, but haven’t done much to test the UI. I have an ASP.NET MVC 3 application with many MSpec checks, and I would like to add presentation tests using WatiN.

What kind of things do you experience? Do I have to write tests to bootstrap the user interface or only for things that have changed due to user interaction?

What are the good rules and guidelines for writing WatiN tests (and UI in general)?

+6
asp.net-mvc asp.net-mvc-3 watin coded-ui-tests
source share
2 answers

Where I work now, we test these 5 things (where applicable) for each page:

  • Layout - should have a text box with the inscription X, should have a drop-down list with the inscription X
  • Populate - should have a drop-down list with the following values ​​... should have a text field with a value
  • Confirm - when I enter X, then I should see the error message Y
  • Navigation - when I press the X button, then I have to go to page Y
  • Save - when I click the "Save" button, I should see the message "Success"
+7
source share

Ideally, UI Testing (Automation) includes the automation of everything you can :)

I am sure you have functional test cases. Each of these test cases can be automated. If you take an example of this site, I can think of the following scenarios: 1. Registration - Make sure you enter all the fields (required, verified) - Unable to create duplicate accounts 2. Confirm the registration

Basically, all you can do manually is the target candidate for automation. We have about 1,500 test cases for our application, and 90% are automated. Manual testing is used to visually inspect screens. Cosmetic checks can be ignored in Automation.

Hope this helps. Thanks, K

+1
source share

All Articles