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。有什麼我在這裏失蹤?
哪個specflow版本? – nemesv
最新版本,1.8.1.0 –
我無法在specflow 1.8.1和Nunit的新項目中轉載您的問題,並重塑爲testrunner。表格不爲空幷包含場景中的值。你能發佈更多的上下文嗎?或者你可以嘗試在一個新項目中重現這個問題嗎? – nemesv