开发者

WatiN best practices/rules of thumb for an ASP.NET MVC app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 5 years ago.

开发者_运维技巧Improve this question

I'm an avid TDD and BDD fan but haven't done much in the ways of UI testing. I have an ASP.NET MVC 3 application with many MSpec tests and I'd like to add presentation tests using WatiN.

What sort of stuff do you test? Do I have to write tests for the initial load of the UI or only for things that changed due to user interaction?

What are, in short, good rules of thumb and best practices when writing WatiN (and UI tests in general) tests?


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

  1. Layout - should have textbox labeled X, should have dropdown labeled X
  2. Populate - should have dropdown with the following values ... should have textbox with the value
  3. Validate - when I enter X, then I should see the error message Y
  4. Navigate - when I click X button, then I should go to Y page
  5. Save - when I click save button, then I should see the Success message


Ideally, UI Testing (Automation) involves automating everything that you can :)

I am sure you have Functional Test Cases. Each of those test cases can be automated. If you take the example of this site itself, I can think of the following scenarios: 1. Registration - Verify you have all the fields listed (are mandatory, validated) - Duplicate accounts cannot be created 2. Confirm Registration

Basically, everything that you can do manually is a target candidate for Automation. We have about 1500 Test Cases for our app and 90% is automated. Manual Testing is used to visually verify the screens. The cosmetic checks can be ignored in Automation.

Hope this helps. Thanks, K

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜