Using the new build system in TFS2015/VSTS, my SpecFlow tests aren't getting picked up. Within the same project, classes and methods decorated with [TestClass]
and [TestMethod]
, respectively, are picked up and tested by TFS. What are the basic requirements for TFS2015/VSTS to run a SpecFlow 2.0 test?
EDIT: Adding packages.config
contents. As you can see, I have SpecRun
installed, and from within Visual Studio, I'm able to run SpecFlow tests as I'd expect (i.e. they all appear in Test Explorer)
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.0.1" targetFramework="net452" />
<package id="SpecFlow" version="2.0.0" targetFramework="net452" />
<package id="SpecRun.Runner" version="1.3.0" targetFramework="net452" />
<package id="SpecRun.SpecFlow" version="1.3.0" targetFramework="net452" />
</packages>
Already looked at this answer? Built tests are not added to the Visual Studio Test Explorer window
- Close all Visual Studio instances
- Go to %TEMP%\VisualStudioTestExplorerExtensions\
- Delete all the folders in here
- Try again
This helped me out this morning (VS2017, SpecFlow Version:2.1.0.0, SpecFlow+ Excel Version:1.4.2.0).
来源:https://stackoverflow.com/questions/35184417/specflow-vsts-tfs-2015