Visual studio 2015 添加“时Specflow自定义工具错误”;示例:“引用;

Visual studio 2015 添加“时Specflow自定义工具错误”;示例:“引用;,visual-studio-2015,specflow,Visual Studio 2015,Specflow,我有以下规格: Feature: Homepage As a webiste user I want to see a pretty homepage Scenario: Homepage Display Given I am on an ecommerce <website> When I look at the content Then I should see a swiper Examples: | Description | w

我有以下规格:

Feature: Homepage
    As a webiste user
    I want to see a pretty homepage

Scenario: Homepage Display
    Given I am on an ecommerce <website>
    When I look at the content
    Then I should see a swiper

Examples: 
| Description | website             |
| Local       | localhost:9000      |
| Development | dev.mysite.com      |
功能:主页
作为webiste用户
我想看一个漂亮的主页
场景:主页显示
考虑到我在做电子商务
当我看内容的时候
那我应该去看游泳运动员
示例:
|说明|网站|
|本地|本地主机:9000|
|开发| dev.mysite.com|
但Visual Studio 2015不会构建它,它说:

自定义工具错误:(10:1):应为:#EOF、#TableRow、#DocStringSeparator、#StepLine、#TagLine、#ScenarioLine、#ScenarioOutlineLine、#Comment、#Empty、Get'Examples:'

如果我删除示例:没关系

据我所知,规范看起来是正确的语法,但我昨天才开始研究,所以我可能犯了一个基本错误。我可以右键单击场景并生成步骤代码OK,这看起来都很合理

我正在使用,来自NuGet:

  • SpecFlow 2.0.0
  • SpecFlow.MsTest 2.0.0
以及从扩展和更新:

  • Visual Studio 2015的SpecFlow,版本2015.1.2
我使用“单元测试项目”,框架4.5.1来创建我的项目



我做错了什么?

示例只能用于场景大纲。场景大纲是使用不同数据集运行场景的方法

如果您将
场景
更改为
场景大纲
,您的示例将起作用:

Feature: Homepage
    As a webiste user
    I want to see a pretty homepage

Scenario Outline: Homepage Display
    Given I am on an ecommerce <website>
    When I look at the content
    Then I should see a swiper

Examples: 
| Description | website             |
| Local       | localhost:9000      |
| Development | dev.mysite.com      |
功能:主页
作为webiste用户
我想看一个漂亮的主页
场景大纲:主页显示
考虑到我在做电子商务
当我看内容的时候
那我应该去看游泳运动员
示例:
|说明|网站|
|本地|本地主机:9000|
|开发| dev.mysite.com|
GitHub Cumber页面对场景概要有很好的解释: