(Specflow+Resharper) Run Specflow Scenarios= Error "No tests found in file"

4,278 views
Skip to first unread message

Andy

unread,
Dec 16, 2013, 10:00:03 AM12/16/13
to spec...@googlegroups.com
Hi there

I use specflow and resharper with nunit and normally it's fine but I have one project that, when I right click a scenario and select Run Specflow Scenarios I get the error "No tests found in file".

When I look in the feature.cs, the method for the scenario does not have the [Test] style attribute to signify a unit test, but they do in my other projects.

Any ideas?

Andy

unread,
Dec 16, 2013, 12:21:07 PM12/16/13
to spec...@googlegroups.com
Just to add, this is also now happening in other projects in other environments.

If the tests are ran with Specrun as test executor instead of Resharper it works, which is fine when we want to parallelise but we don't want to do that by default.

Oliver Friedrich

unread,
Dec 16, 2013, 12:26:25 PM12/16/13
to spec...@googlegroups.com
If you've just set up SpecRun, you might want to use this:
<unitTestProvider name="SpecRun+NUnit" />
Also, in the VS -> Tools -> Options -> SpecFlow menu, you can choose the test provider you want to use by default - I chose ReSharper there because we use the command line to run the tests with SpecRun.

An explanation for the odd behavior you were seeing would be that only one project after another had their code-behind files regenerated and SpecRun does not generate nunit test cases by default.

--
Rodziną do Jana Pawła II. - www.rodzinadojp2.pl


2013/12/16 Andy <4ndrew...@gmail.com>

--
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/groups/opt_out.

Andy

unread,
Dec 16, 2013, 12:54:15 PM12/16/13
to spec...@googlegroups.com
Oh what a moron I am, thanks for that.

Oliver Friedrich

unread,
Dec 16, 2013, 1:01:13 PM12/16/13
to spec...@googlegroups.com
Not even close to a moron. Just coding in an ever more complex environment ;-)

Lucas

unread,
Feb 5, 2015, 7:00:20 PM2/5/15
to spec...@googlegroups.com
I don't want to bring up an old topic but I'm having this issue now. My team was using VS2012 + Resharper + Specflow + NUnit with no issues. We recently upgraded to VS2013 + Resharper 9 + Specflow + NUnit and now we cannot right click and select "Run Specflow Scenarios".

I've tried setting the Test Runner to ReSharper with no luck. It does not even display an error message of any kind.

Anyone have any ideas?

Artyom K

unread,
Feb 7, 2015, 5:38:11 AM2/7/15
to spec...@googlegroups.com
Hello,
The same here. Steps:

1. Having `mystories.feature` and `mystories.feature.cs` files generated using SpecFlow 1.9.0 and SpecFlow.xUnit 1.0.2 packages.
2. Open `mystories.feature` files and run "Resharper / Unit tests / Run Unit Tests" with Reshaper 9.0 Update 1.
3. Result: "No tests found in file." message got.

In R# 8 it worked. How can I get it running the tests from *.feature files?

Note. It works from *.feature.cs files. Thanks !

Lucas

unread,
Feb 10, 2015, 12:57:07 PM2/10/15
to spec...@googlegroups.com
I contacted Resharper about this and they came back with:

ReSharper does not support running/debugging SpecFlow tests. "Run Specflow Scenarios" item is not ReSharper one and ReSharper does not support *.feature files, it is provided by SpecFlow plugin for Visual Studio. And it seems like such plugin does not support ReSharper 9.0 yet. So please contact SpecFlow authors about it. 

Richard Slaughter

unread,
Mar 15, 2015, 7:12:32 AM3/15/15
to spec...@googlegroups.com
I'm also experiencing this issue under VS2013 + Resharper 9.

I believe this is because the Resharper unit test context commands have changed from
- Resharper.Reharper_ReSharper_UnitTest_RunContext and Resharper.Reharper_ReSharper_UnitTest_DebugContext
to
- Resharper.Reharper_ReSharperUnitTestRunContext and Resharper.Reharper_ReSharperUnitTestDebugContext

Looks like it should be a reasonably straight forward fix in SpecFlow/IdeIntegration/Vs2010Integration/TestRunner/ReSharper6TestRunnerGateway.cs.

I'd love to submit a pull request to fix this, but haven't been able to get the solution to build. Are pre-requisites documented anywhere?

Sam Holder

unread,
Mar 16, 2015, 4:09:12 PM3/16/15
to specflow
Try building the v2 branch. I've found this much simpler to build out of the box (as it were)

--
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.

Gáspár Nagy

unread,
Mar 17, 2015, 3:46:13 AM3/17/15
to spec...@googlegroups.com
Almost. The VS stuff has been extracted to https://github.com/techtalk/SpecFlow.VisualStudio. Use the master branch there.

If you use that, the only prerequisite is VS2013 + VS2013 SDK.

Br,
Gaspar


On Monday, March 16, 2015 at 9:09:12 PM UTC+1, Sam Holder wrote:
Try building the v2 branch. I've found this much simpler to build out of the box (as it were)
On Sun, Mar 15, 2015 at 12:34 AM, Richard Slaughter wrote:
I'm also experiencing this issue under VS2013 + Resharper 9.

I believe this is because the Resharper unit test context commands have changed from
- Resharper.Reharper_ReSharper_UnitTest_RunContext and Resharper.Reharper_ReSharper_UnitTest_DebugContext
to
- Resharper.Reharper_ReSharperUnitTestRunContext and Resharper.Reharper_ReSharperUnitTestDebugContext

Looks like it should be a reasonably straight forward fix in SpecFlow/IdeIntegration/Vs2010Integration/TestRunner/ReSharper6TestRunnerGateway.cs.

I'd love to submit a pull request to fix this, but haven't been able to get the solution to build. Are pre-requisites documented anywhere?

--
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+unsubscribe@googlegroups.com.

Nuno Filipe Costa

unread,
Apr 8, 2015, 8:53:27 AM4/8/15
to spec...@googlegroups.com
Is there going to be any update on the "Specflow for Visual Studio 2013" extension ?

Cheers,
Nuno Costa
To unsubscribe from this group and stop receiving emails from it, send an email to specflow+u...@googlegroups.com.

Gáspár Nagy

unread,
Apr 8, 2015, 11:49:34 AM4/8/15
to spec...@googlegroups.com
Yes. But I'm still working on finalizing it.

Matt Miller

unread,
Apr 29, 2015, 11:46:47 AM4/29/15
to spec...@googlegroups.com
Any news on the updates to the extension for VS 2013?

Gáspár Nagy

unread,
Apr 30, 2015, 4:24:09 AM4/30/15
to spec...@googlegroups.com
Created a ticket: https://github.com/techtalk/SpecFlow/issues/435
See follow-ups there (no good news).
Reply all
Reply to author
Forward
0 new messages