使用TestDriven.Net的Specflow错误 - 找不到类型

Mar*_*rty 3 testdriven.net specflow

我是第一次尝试Specflow,并创建了一个VS2010项目,引用了TechTalk.SpecFlow,以及nunit.framework.我添加了一个示例功能文件:

Feature: Addition
    In order to avoid silly mistakes
    As a math idiot
    I want to be told the sum of two numbers

@mytag
Scenario: Add two numbers
    Given I have entered 50 into the calculator
    And I have entered 70 into the calculator
    When I press add
    Then the result should be 120 on the screen
Run Code Online (Sandbox Code Playgroud)

当我执行测试(使用TestDriven.Net)时,我收到以下错误:

Test 'T:SpecFlowFeature1' failed: Couldn't find type with name 'SpecFlowFeature1'
System.Exception: Couldn't find type with name 'SpecFlowFeature1'
at MutantDesign.Xml.Documentation.MemberInfoUtilities.FindMemberInfo(Assembly assembly, String cref)
at TestDriven.TestRunner.AdaptorTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)
at TestDriven.TestRunner.ThreadTestRunner.Runner.Run()
Run Code Online (Sandbox Code Playgroud)

谁知道我错过了什么?

Mar*_*rty 5

实际上追溯到我如何运行测试.右键单击" .feature"文件(或该文件中的任何位置)并选择"运行测试"会导致错误.右键单击基础" .feature.cs"文件并选择"运行测试"正确执行.看起来TestDriven.Net无法"理解""*.feature"文件.