我是Visual Studio的新手。我正在使用Visual Studio 2015和SpecFlow。以下是功能文件:
@mytag
Scenario Outline: Successful Authentication
Given I am a user of type <user>
When I hit the application URL
And I provide <email>
And I click on Log In Button
Then I will be landed to the Home Page
And I will be able to see <name> on the Home Page
Examples:
| user | email | name |
| admin | a.b@example.com | alpha |
| non-admin | b.c@example.com | beta |
当我生成步骤定义时,我期待参数代替变量,而不是生成如下方法:
[Given(@"I am a user of type admin")]
public void GivenIAmAUserOfTypeAdmin()
{
ScenarioContext.Current.Pending();
}
我反而期待一种方法:
[Given(@"I am a user of type '(.*)'")]
public void GivenIAmAUserOfType(string p0)
{
ScenarioContext.Current.Pending();
}
我错过了什么?