0

我刚刚开始使用 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 传入。我在这里缺少什么吗?

4

1 回答 1

0

错误的跑步者执行你的测试。

转到以下选项:工具 -> 选项 -> Specflow -> 常规 -> 测试运行工具

将值更改为“Auto”或“SpecRun”

于 2015-10-30T13:49:35.300 回答