Tests not discovered in Visual Studio Test Explorer Window

3,455 views
Skip to first unread message

OstenL

unread,
Jun 20, 2014, 4:28:35 AM6/20/14
to spec...@googlegroups.com
Hi, 

I'm having problem with Test Explorer Window not discovering tests when SpecFlow is configured to run with SpecRun.

I have a simple project created according to the setup instructions and it works perfectly in VS2013 Premuim on Windows 8.1. with an App.Config file like this.

  <specFlow>
    <unitTestProvider name="SpecRun" />
    <plugins>
      <add name="SpecRun" />
    </plugins>
  </specFlow>

However, when i copy the same project to a machine with Windows 7 the test discovery fails, no tests are found in the Test Explorer Window.
I have tried this on several combinations of Visual Studio and OS on different computers.

Specflow1.9.0, SpecRun 1.2.0 and 1.3.0-alpha1 (same result for both versions), .NET4.5

Windows 8.1 x64, VS2012 Premium, Update 4 : Works
Windows 8.1 x64, VS2013 Premium, Update 2 : Works
Windows 7, x64, VS2010 Pro, SP1 (.Net4.0) : Fails.
Windows 7, x86, VS2012 Premium :  Fails.
Windows 7, x64, VS2013 Pro, Update2 : Fails.

In all cases the "Run Specflow Scenarios" command  works just fine and runs the test with SpecRun so SpecRun itself works ok.

If I set unitTestProvider = "SpecRun+MsTest" the MSTest versions of the test scenarios are discovered in all cases but SpecRun is not used when running the tests from the Test Explorer.

Has anyone experienced this and have a clue to how to solve this problem?

carlin scott

unread,
Apr 6, 2015, 4:25:56 PM4/6/15
to spec...@googlegroups.com, ost...@hotmail.com
How are you copying the project to another machine? There are dll depencies that must be copied with the source code for SpecRun to work: TechTalk.SpecRun.dll, TechTalk.SpecFlow.dll and SpecRun.SpecFlowPlugin.dll.

Gáspár Nagy

unread,
Apr 8, 2015, 11:44:25 AM4/8/15
to spec...@googlegroups.com, ost...@hotmail.com
Sometimes VS test explorer cache gets corrupted. In this case deleting all SpecRun related folders from %TEMP%\VisualStudioTestExplorerExtensions might help (close all VS first).

Also I have heard about a ReSharper issue that caused such behavior. This has been fixed, so upgrading to a newer version might help.

Br,
Gaspar

Truong Nguyen

unread,
Feb 8, 2017, 1:42:46 AM2/8/17
to SpecFlow, ost...@hotmail.com
I'm facing with this issue although i have been followed up Gaspar's suggestion to clear temp files.Unfortunately,It did not work :(

Truong Nguyen

unread,
Feb 10, 2017, 5:02:55 AM2/10/17
to SpecFlow, ost...@hotmail.com
Fixed this issue with below adding in app.config file

<unitTestProvider name="Mstest" /></specFlow>

I would suggest to whom using SpecFlow 1.9.0 ,we can change the version as below in case of Test Explorer not displayed the output result:

<assemblyIdentity name="TechTalk.SpecFlow" publicKeyToken="0778194805d6db41" culture="neutral" /> 
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="1.9.0.77" /> 


On Friday, June 20, 2014 at 3:28:35 PM UTC+7, OstenL wrote:

Andreas Willich

unread,
Feb 10, 2017, 6:57:04 AM2/10/17
to SpecFlow, ost...@hotmail.com
Hi

Adding the unitTestProvider to the app.config this way configures SpecFlow to use MsTest. This is supported by the Test Explorer Window by default.
If you do not have this, SpecFlow uses NUnit as default. For NUnit the Test Explorer Window has no support. You need an Test Adapter for that. They are available as NuGet package or VS Extension.

To the binding redirect:
This is simple wrong. This binding redirect, redirects from newer versions to an old version. There can no be need to add this to the app.config.

Best regards
Andreas

--
You received this message because you are subscribed to the Google Groups "SpecFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specflow+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages