我刚开始玩Specflow,Watin和Deleporter。
我遇到集成类型测试的问题,因为它不会将表数据传递到相应的测试中。
Scenario: User tries to register and their email already exists
Given I have filled out the register page with the following data
| Name | Password | Nickname | Email |
| Sam | password1 | SamsNickname | email@email.com |
When I already have an account with the same email
| Name | Password | Nickname | Email |
| Sam | password1 | SamsNickname | email@email.com |
Then Show message that the account exists
[Given(@"I have filled out the register page with the following data")]
public void GivenIHaveFilledOutTheRegisterPageWithTheFollowingData(Table table)
{
var data = table.Rows.First();
}
我遇到的问题是上面的Table参数作为null传递。这里有什么我想念的吗?
答案 0 :(得分:0)
错误的跑步者执行你的测试。
转到以下选项: 工具 - >选项 - > Specflow - >一般 - >测试跑步工具
将值更改为" Auto"或" SpecRun"