Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.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# Specflow-场景大纲测试被忽略_C#_Msbuild_Automated Tests_Nunit_Specflow - Fatal编程技术网

C# Specflow-场景大纲测试被忽略

C# Specflow-场景大纲测试被忽略,c#,msbuild,automated-tests,nunit,specflow,C#,Msbuild,Automated Tests,Nunit,Specflow,我正在使用Selenium和Specflow开发测试自动化,但是当我尝试运行我的场景大纲时,它被完全忽略了。 我已经试过调试它,但是没有一个步骤被执行,我也不知道为什么。 常见的场景很好用。 我在VisualStudio代码中使用.NETCore2.2。我当前的测试运行程序是NUnit版本3.12.0,我的Specflow版本是3.0.225。常规场景没有显示任何类似的问题 @FilterScenario Scenario Outline: Validating filter box and

我正在使用Selenium和Specflow开发测试自动化,但是当我尝试运行我的场景大纲时,它被完全忽略了。

我已经试过调试它,但是没有一个步骤被执行,我也不知道为什么。
常见的场景很好用。

我在VisualStudio代码中使用.NETCore2.2。我当前的测试运行程序是NUnit版本3.12.0,我的Specflow版本是3.0.225。
常规场景没有显示任何类似的问题

@FilterScenario
Scenario Outline: Validating filter box and grid results
    Given I accessed the screen
    And the filter box is on
    When I select the groups <TypeGroup1>, <TypeGroup2>, <TypeGroup3>
    And select the teams <TypeTeam1>, <TypeTeam2>, <TypeTeam3>
    And click the Apply button
    Then the grid should show me only results that match groups <TypeGroup1>, <TypeGroup2>, <TypeGroup3> and teams <TypeTeam1>, <TypeTeam2>, <TypeTeam3>

    Examples:
    | TypeGroup1 | TypeGroup2 | TypeGroup3 | TypeTeam1  | TypeTeam2  | TypeTeam3  |
    | Type 1     |            |            | Type 1     |            |            | 
    | Type 1     | Type 2     | Type 3     | Type 1     | Type 2     | Type 3     |
    |            |            |            | Type 1     |            |            | 
@FilterScenario
场景大纲:验证筛选器框和网格结果
假设我进入了屏幕
过滤盒是开着的
当我选择组时,
然后选择团队,
然后单击应用按钮
然后网格应该只显示匹配组和团队的结果,
示例:
|类型组1 |类型组2 |类型组3 |类型组1 |类型组2 |类型组3|
|类型1 | | |类型1 | | |
|类型1 |类型2 |类型3 |类型1 |类型2 |类型3|
|| | | |类型1 | | |

我的项目中包含的包:

    <PackageReference Include="Microsoft.Extensions.Configuration" Version="3.0.0" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
    <PackageReference Include="nunit" Version="3.12.0" />
    <PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
    <PackageReference Include="Selenium.Support" Version="3.141.0" />
    <PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
    <PackageReference Include="Specflow" Version="3.0.225" />
    <PackageReference Include="Specflow.Assist.Dynamic" Version="1.4.1" />
    <PackageReference Include="Specflow.NUnit" Version="3.0.225" />
    <PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.0.225" />

功能文件中存在问题

@FilterScenario
Scenario Outline: Validating filter box and grid results
    Given I accessed the screen
    And the filter box is on
    When I select the groups '<TypeGroup1>', '<TypeGroup2>', '<TypeGroup3>'
    And select the teams '<TypeTeam1>', '<TypeTeam2>', '<TypeTeam3>'
    And click the Apply button
    Then the grid should show me only results that match groups '<TypeGroup1>', '<TypeGroup2>', '<TypeGroup3>' and teams '<TypeTeam1>', '<TypeTeam2>', '<TypeTeam3>'

    Examples:
    | TypeGroup1 | TypeGroup2 | TypeGroup3 | TypeTeam1  | TypeTeam2  | TypeTeam3  |
    | Type 1     |            |            | Type 1     |            |            | 
    | Type 1     | Type 2     | Type 3     | Type 1     | Type 2     | Type 3     |
    |            |            |            | Type 1     |            |            |
@FilterScenario
场景大纲:验证筛选器框和网格结果
假设我进入了屏幕
过滤盒是开着的
当我选择组“”时
然后选择团队“,”和“
然后单击应用按钮
然后网格应该只显示与组“,”和团队“,”匹配的结果
示例:
|类型组1 |类型组2 |类型组3 |类型组1 |类型组2 |类型组3|
|类型1 | | |类型1 | | |
|类型1 |类型2 |类型3 |类型1 |类型2 |类型3|
|| | |类型1 | ||

重新生成stepdefs并重试

功能文件中存在问题

@FilterScenario
Scenario Outline: Validating filter box and grid results
    Given I accessed the screen
    And the filter box is on
    When I select the groups '<TypeGroup1>', '<TypeGroup2>', '<TypeGroup3>'
    And select the teams '<TypeTeam1>', '<TypeTeam2>', '<TypeTeam3>'
    And click the Apply button
    Then the grid should show me only results that match groups '<TypeGroup1>', '<TypeGroup2>', '<TypeGroup3>' and teams '<TypeTeam1>', '<TypeTeam2>', '<TypeTeam3>'

    Examples:
    | TypeGroup1 | TypeGroup2 | TypeGroup3 | TypeTeam1  | TypeTeam2  | TypeTeam3  |
    | Type 1     |            |            | Type 1     |            |            | 
    | Type 1     | Type 2     | Type 3     | Type 1     | Type 2     | Type 3     |
    |            |            |            | Type 1     |            |            |
@FilterScenario
场景大纲:验证筛选器框和网格结果
假设我进入了屏幕
过滤盒是开着的
当我选择组“”时
然后选择团队“,”和“
然后单击应用按钮
然后网格应该只显示与组“,”和团队“,”匹配的结果
示例:
|类型组1 |类型组2 |类型组3 |类型组1 |类型组2 |类型组3|
|类型1 | | |类型1 | | |
|类型1 |类型2 |类型3 |类型1 |类型2 |类型3|
|| | |类型1 | ||

重新生成stepdefs并重试

您使用的是哪个单元测试提供程序?您使用的是哪个版本的SpecFlow NuGet软件包?如果您更改常规的
场景
,您在运行该测试时是否看到该更改?我使用的是NUnit版本3.12.0,我的Specflow版本是3.0.225。是的,我知道,常规情况下没有出现类似的问题。你能把这些信息添加到你的问题中吗?在添加注释时很容易错过。您安装了哪些NuGet软件包?当然!我也在问题中添加了包。您使用的是哪个单元测试提供程序?您使用的是哪个版本的SpecFlow NuGet软件包?如果您更改常规的
场景
,您在运行该测试时是否看到该更改?我使用的是NUnit版本3.12.0,我的Specflow版本是3.0.225。是的,我知道,常规情况下没有出现类似的问题。你能把这些信息添加到你的问题中吗?在添加注释时很容易错过。您安装了哪些NuGet软件包?当然!就这么做了:)我也在问题中添加了这些包。