SolvedSpecFlow Specflow Test not appearing in Test Explorer

Specflow Tests not appearing in Test Explorer

SpecFlow Version:

  • 3.0
  • 2.4
  • 2.3
  • 2.2
  • 2.1
  • 2.0
  • 1.9

Used Test Runner

  • SpecFlow+Runner
  • MSTest
  • NUnit
  • Xunit

Version number:
3.0

Visual Studio Version

  • VS 2019
  • VS 2017
  • VS 2015

Are the latest Visual Studio updates installed?

  • Yes
  • No

.NET Framework:

  • >= .NET 4.5
  • before .NET 4.5
  • .NET Core 2.0
  • .NET Core 2.1
  • .NET Core 2.2
  • .NET Core 3.0

Test Execution Method:

  • Visual Studio Test Explorer
  • TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
  • Command line – PLEASE SPECIFY THE FULL COMMAND LINE

<SpecFlow> Section in app.config or content of specflow.json

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  
</configuration>

packages.config

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="BoDi" version="1.4.1" targetFramework="net472" />
  <package id="FluentAssertions" version="5.6.0" targetFramework="net472" />
  <package id="Gherkin" version="6.0.0" targetFramework="net472" />
  <package id="NUnit" version="3.11.0" targetFramework="net472" />
  <package id="NUnit.Console" version="3.9.0" targetFramework="net472" />
  <package id="NUnit.ConsoleRunner" version="3.9.0" targetFramework="net472" />
  <package id="NUnit.Extension.NUnitProjectLoader" version="3.5.0" targetFramework="net472" />
  <package id="NUnit.Extension.NUnitV2Driver" version="3.6.0" targetFramework="net472" />
  <package id="NUnit.Extension.NUnitV2ResultWriter" version="3.5.0" targetFramework="net472" />
  <package id="NUnit.Extension.TeamCityEventListener" version="1.0.3" targetFramework="net472" />
  <package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net472" />
  <package id="NUnit3TestAdapter" version="3.13.0" targetFramework="net472" />
  <package id="Selenium.Chrome.WebDriver" version="74.0.0" targetFramework="net472" />
  <package id="Selenium.Support" version="3.141.0" targetFramework="net472" />
  <package id="Selenium.WebDriver" version="3.141.0" targetFramework="net472" />
  <package id="SpecFlow" version="3.0.213" targetFramework="net472" />
  <package id="SpecFlow.NUnit" version="3.0.213" targetFramework="net472" />
  <package id="SpecFlow.NUnit.Runners" version="3.0.213" targetFramework="net472" />
  <package id="SpecFlow.Tools.MsBuild.Generation" version="3.0.213" targetFramework="net472" />
  <package id="System.Reflection.Emit" version="4.3.0" targetFramework="net472" />
  <package id="System.Reflection.Emit.Lightweight" version="4.3.0" targetFramework="net472" />
  <package id="System.Threading.Tasks.Extensions" version="4.4.0" targetFramework="net472" />
  <package id="System.ValueTuple" version="4.4.0" targetFramework="net472" />
  <package id="Utf8Json" version="1.3.7" targetFramework="net472" />
</packages>

Repro Project

Issue Description

Seems to be the case that there is an option that runs/tests the senario, but the option is not available (not there) when I right click the Senario

Steps to Reproduce

32 Answers

✔️Accepted Answer

@chaturvediankit I think i just needed to include the SpecFlow.Tools.MsBuild.Generation. That seems to resolve the issue.

Other Answers:

@jwmxyz @JigeshShah @bincygijo Hi All, I was able to resolve this issue by following below steps.
.NET Core

  1. Create New Project as Class Library
  2. Added only Below Dependency
    image
  3. Added Extension "SpecFlow for Visual Studio 2019"
  4. Build Solution and started reflecting
    .NET Framework
  5. Create New Project as Class Library
  6. Added only sameDependency
  7. Added Extension "SpecFlow for Visual Studio 2017/2019"
  8. Single File Generator-> False (You Can find in feature file Property)
  9. Enable Tracing (Tools--> Options--> SpecFlow)

More Issues: