我正在创建一个多步注册过程的黄瓜测试,并且对于方案步骤的最佳实践有点不确定...黄瓜长度?
注册中有4个表单/页面。我应该循环通过给定,当在一个场景中4次或有更好的方式来组织它吗?
到目前为止,我有...
Scenario: Company User
Given I am on the registration page
When I follow "Register as a supplier"
When I fill in the following:
| user_email | [email protected] |
| user_password | secret |
| user_password_confirmation | secret |
And I press "Create login - Proceed to step 2"
Then I should see "Create Company Profile"
When I fill in the following:
| company_name | Test Company |
| company_description | Lorem |
| company_telephone | 01928740436 |
| company_email | [email protected] |
And I press "Create company - Proceed to step 3"
Then I should see "Test Company office(s)"
我会很失望,如果这实际上不是狡猾的影射。 – 2011-05-16 15:43:13
这篇文章的标题让我发笑:) – d11wtq 2011-05-16 17:01:53
这对我来说看起来不错,但如果它是我的代码,我可能会将所有表单位提取到一个步骤定义中,并且会更一般:“当我设置了我的电子邮件和密码“和”当我填写我的公司信息“ – Unixmonkey 2011-05-16 18:52:59