Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 数据驱动测试.带Nunit的示例表_C#_Selenium_Nunit_Specflow - Fatal编程技术网

C# 数据驱动测试.带Nunit的示例表

C# 数据驱动测试.带Nunit的示例表,c#,selenium,nunit,specflow,C#,Selenium,Nunit,Specflow,我的任务是使用c#创建一个测试。我有我的specflow,当,然后。在我的测试中,我有一个示例表。当我生成步骤定义时,我将在何处传递此步骤的参数 | Lifecyclestatus | | Prenew | | New | | Current | | Clearance | | Old | 数据驱动测试可以使用场景大纲来实现。所有参数都需要在示例部分中提及。请参阅下面的示例功能 Scenario Ou

我的任务是使用c#创建一个测试。我有我的specflow,当,然后。在我的测试中,我有一个示例表。当我生成步骤定义时,我将在何处传递此步骤的参数

| Lifecyclestatus |
| Prenew          |
| New             |
| Current         |
| Clearance       |
| Old             |

数据驱动测试可以使用场景大纲来实现。所有参数都需要在示例部分中提及。请参阅下面的示例功能

Scenario Outline: Addition Check with multiple set of data
    Given I have entered <Number 1> into the calculator
    And I have entered <Number 2> into the calculator
    When I press add
    Then the result should be <Result> on the screen

Examples: 
| Number 1 | Number 2 | Result |
| 10       | 20       | 30     |
| 15       | 25       | 40     |
| 50       | 90       | 140    |
| 2        | 2        | 4      |    
场景大纲:使用多组数据进行添加检查
假设我已经输入了计算器
我已经输入了计算器
当我按add时
然后结果应该显示在屏幕上
示例:
|1号| 2号|结果|
| 10       | 20       | 30     |
| 15       | 25       | 40     |
| 50       | 90       | 140    |
| 2        | 2        | 4      |    

上述场景将针对示例部分中提到的所有数据执行。

生命周期状态是否为您的标题名称?您的意思是什么?请检查我的答案。我已经举了类似的例子