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.
我是*的TDD和BDD粉丝,但在UI测试方面做得不多。我有一个ASP.NET MVC 3应用程序与许多MSpec测试,我想使用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?
你测试什么样的东西?我是否必须为UI的初始加载编写测试,或仅针对因用户交互而更改的内容?
What are, in short, good rules of thumb and best practices when writing WatiN (and UI tests in general) tests?
简而言之,在编写WatiN(以及一般的UI测试)测试时,有哪些良好的经验法则和最佳实践?
2 个解决方案
#1
7
Where I work now, we test these 5 things (where applicable) for each page:
我现在在哪里工作,我们为每个页面测试这5件事(如果适用):
- Layout - should have textbox labeled X, should have dropdown labeled X
- Populate - should have dropdown with the following values ... should have textbox with the value
- Validate - when I enter X, then I should see the error message Y
- Navigate - when I click X button, then I should go to Y page
- Save - when I click save button, then I should see the Success message
布局 - 应该有标记为X的文本框,应该有标记为X的下拉列表
填充 - 应该具有以下值的下拉列表...应该具有值的文本框
验证 - 当我输入X时,我应该看到错误消息Y.
导航 - 当我点击X按钮时,我应该转到Y页面
保存 - 当我单击保存按钮时,我应该看到成功消息
#2
1
Ideally, UI Testing (Automation) involves automating everything that you can :)
理想情况下,UI测试(自动化)涉及自动化您可以做的一切:)
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
我相信你有功能测试用例。每个测试用例都可以自动化。如果您以本网站为例,我可以考虑以下情况:1。注册 - 确认您已列出所有字段(必须经过验证) - 无法创建重复的帐户2.确认注册
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.
基本上,您可以手动执行的所有操作都是自动化的目标候选者。我们的应用程序有大约1500个测试用例,90%是自动化的。手动测试用于可视化验证屏幕。自动化中可以忽略化妆品检查。
Hope this helps. Thanks, K
希望这可以帮助。谢谢,K
#1
7
Where I work now, we test these 5 things (where applicable) for each page:
我现在在哪里工作,我们为每个页面测试这5件事(如果适用):
- Layout - should have textbox labeled X, should have dropdown labeled X
- Populate - should have dropdown with the following values ... should have textbox with the value
- Validate - when I enter X, then I should see the error message Y
- Navigate - when I click X button, then I should go to Y page
- Save - when I click save button, then I should see the Success message
布局 - 应该有标记为X的文本框,应该有标记为X的下拉列表
填充 - 应该具有以下值的下拉列表...应该具有值的文本框
验证 - 当我输入X时,我应该看到错误消息Y.
导航 - 当我点击X按钮时,我应该转到Y页面
保存 - 当我单击保存按钮时,我应该看到成功消息
#2
1
Ideally, UI Testing (Automation) involves automating everything that you can :)
理想情况下,UI测试(自动化)涉及自动化您可以做的一切:)
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
我相信你有功能测试用例。每个测试用例都可以自动化。如果您以本网站为例,我可以考虑以下情况:1。注册 - 确认您已列出所有字段(必须经过验证) - 无法创建重复的帐户2.确认注册
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.
基本上,您可以手动执行的所有操作都是自动化的目标候选者。我们的应用程序有大约1500个测试用例,90%是自动化的。手动测试用于可视化验证屏幕。自动化中可以忽略化妆品检查。
Hope this helps. Thanks, K
希望这可以帮助。谢谢,K