正如您所写:我需要它适用于所有步骤,这也没有给我示例的数量和迭代次数。
方案大纲:方案大纲示例
Given I have RestAPI '<iterationNumber>'
When I read '<iterationNumber>' and '<api_key>'
Then the '<iterationNumber>' and results table
| links list |
| aaa |
| bbb |
Examples:
| iterationNumber | api_key |
| 0 | @@app.config=api_key_full |
| 1 | @@app.config=api_key_limited |
调试这个
[Given(@"I have RestAPI '(.*)'")]
public void GivenIHaveRestAPI(int iterationNumber)
{
Console.WriteLine(iterationNumber);
}
[When(@"I read '(.*)' and '(.*)'")]
public void WhenIReadAnd(int iterationNumber, string p1)
{
Console.WriteLine(iterationNumber);
}
[Then(@"the '(.*)' and results table")]
public void ThenTheAndResultsTable(int iterationNumber, Table table)
{
Console.WriteLine(iterationNumber);
}