C# 使用示例表的Specflow测试在测试运行程序中显示空参数

C# 使用示例表的Specflow测试在测试运行程序中显示空参数,c#,visual-studio,nunit,specflow,C#,Visual Studio,Nunit,Specflow,我有以下specflow场景: Scenario: CasingMentions When User mentions everyone with <casing> casing Then user should be able to see the message they just sent Examples: | casing | | lower | | mixed | | upper | 这完全可以正常运行,但

我有以下specflow场景:

Scenario: CasingMentions
    When User mentions everyone with <casing> casing
    Then user should be able to see the message they just sent
    Examples: 
    | casing |
    | lower  |
    | mixed  |
    | upper  |
这完全可以正常运行,但在visual studio上的测试运行程序中,它显示有一个空参数,因此上述场景将作为3个单独的测试出现在测试运行程序中,名称如下:

CasingMentions("lower",null)
CasingMentions("mixed",null)
CasingMentions("upper",null)
在feature.cs文件中,如下所示:

    [NUnit.Framework.TestAttribute()]
    [NUnit.Framework.DescriptionAttribute("CasingMentions")]
    [NUnit.Framework.TestCaseAttribute("lower", null)]
    [NUnit.Framework.TestCaseAttribute("mixed", null)]
    [NUnit.Framework.TestCaseAttribute("upper", null)]
    public virtual void CasingMentions(string casing, string[] exampleTags)
    {
我认为这与步骤定义无关,因为我可以将示例粘贴到不带参数的场景中,并且它仍然可以这样做

下面是一段视频,显示了我遇到的问题:

有没有办法摆脱空值?这在我使用示例表的每个场景中都会发生,如果我使用场景或场景大纲,似乎没有什么区别。如果这很重要的话,我会用NUnit作为我的试跑员


我还尝试添加一个具有唯一值的额外列,尝试以这种方式命名测试用例,但它们只是作为括号中的另一个参数出现。

如果使用示例,则必须使用关键字scenario outline。检查一个例子,我将其更改为Scenario Outline,但同样的事情仍然在发生,在名称末尾显示null如果您尝试“只是像您建议的那样尝试使用引号括起来,但在测试名称xmm中的大小写参数之后仍然显示null参数。您是否也可以使用属性发布该方法“当用户提到每个人都使用大小写时”???如果您检查我发布的链接,可能需要修改,例如当用户输入时和[当(@“用户输入”(*))和“(*)”)]
    [NUnit.Framework.TestAttribute()]
    [NUnit.Framework.DescriptionAttribute("CasingMentions")]
    [NUnit.Framework.TestCaseAttribute("lower", null)]
    [NUnit.Framework.TestCaseAttribute("mixed", null)]
    [NUnit.Framework.TestCaseAttribute("upper", null)]
    public virtual void CasingMentions(string casing, string[] exampleTags)
    {