2012-06-16 35 views
0

我刚开始玩Specflow,Watin和Deleporter。Specflow不通过表

我遇到了集成类型测试的问题,因为它不会将表数据传递到相应的测试中。

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 protected] | 
When I already have an account with the same email 
| Name | Password | Nickname  | Email   | 
| Sam | password1 | SamsNickname | [email protected] | 
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

哪个specflow版本? – nemesv

+0

最新版本,1.8.1.0 –

+0

我无法在specflow 1.8.1和Nunit的新项目中转载您的问题,并重塑为testrunner。表格不为空并包含场景中的值。你能发布更多的上下文吗?或者你可以尝试在一个新项目中重现这个问题吗? – nemesv

回答

0

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

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

值更改为 “自动” 或 “SpecRun”