Closed swakita14 closed 3 years ago
Ok, what is now the issue? That no tests are in the test explorer or that the context menu entry is not there?
The main problem would be that the tests are not showing up in the test explorer. This is what the Senario options are if that helps
Please create a small repro project. From the info I have now, I don't know why the scenarios aren't showing up in the test explorer.
The context menu was removed with the 2019.* VS Extension. See https://specflow.org/2019/changes-to-the-specflow-visual-studio-extension/
This the way I have to project orgaznied as of now.
If I have the features and the steps in a different folder, the test explorer doesnt recognize them, but once I drag them out of the folder in this manner, I get the tests to be recognized by the test explorer
Ok, thats a good hint with the folder.
I had a look at it, but I couldn't reproduce the behaviour.
Here is the test project for it: https://github.com/SabotageAndi/SpecFlow_OldCSProj_FeatureInSubfolder
Could you check this project if it is working for you?
With your project @SabotageAndi they appear in the Test Explorer (also works with mine project) although sometimes in takes more time or need 1-2 build/rebuilds.
But I have another issue that I can't resolve. Same env like the author (VS 2017 latest, .net 4.5+, SpecFlow 3.0.213 NUnit test provider. All seems to be working correctly but double-click from test explorer no longer redirect me to the scenario like before. Any ideas about that?
@Rain9333 the issue with the navigation is here: https://github.com/techtalk/SpecFlow/issues/1457
Hi,
I am facing same issue that new project created in VS 2017, test's are not appearing in test explorer after building project ?
I am experiencing the same problem that I created a new project in Visual Studio 2017,tests are not displaying in test explorer.
Same issue
Having the same issue in VS2019
@jwmxyz @JigeshShah @bincygijo Hi All, I was able to resolve this issue by following below steps. .NET Core
@chaturvediankit I think i just needed to include the SpecFlow.Tools.MsBuild.Generation
. That seems to resolve the issue.
Having the same issue in VS2019
Please let me know what is the solution Thanks in advance
Having the same issue in VS2019
Please let me know what is the solution Thanks in advance
after installed package SpecFlow.Tools.MsBuild.Generation. working fine as able to see the tests in test exolorer
Thanks
Hi ,
"No source is available" is displaying in Test Explorer in VS2019 for Feature file tests I had gone through goggle and and did some workarounds but no luck Please help on this
Hello!
Is this issue being looked at ? I am facing the same on VS 2019. When I create a new feature file, it just creates a .feature
file but does not come with a code behind file (.feature.cs
) and these tests don't show up on the test runner as well. I already have the package SpecFlow.Tools.MsBuild.Generation
installed but it still doesn't work.
In my case, I had both the generated steps and the feature file in the same folder.
Visual Studio: 2019 (latest updates installed) Specflow extension: 2019.0.42.36358 SpecFlow.Tools.MsBuild.Generation: 2.4.1 NUnit: 3.11.0
Regards, Srikanth
@srikanthse Which project format are you using? Classic or sdk-style?
Solution for me was for the projects concerned to delete the SpecFlow.Tools.MsBuild.Generation and reinstall them again. I was upgrading specflow 2.X to 3.X, and also from VS2017 to 2019 so no idea where problem occured but that seems to solve it. Some projects have no problems, some do. I have scenarios and steps in different folders, doesn't seem to matter.
After updating SpecFlow packages up to v.3.1.67 had the same problems.
I was trying to downgrade version but it's not working. Extension is up to date:
@JorisDeKloris solution did not help :( Uninstall all packages => rebot MVS => install again => reboot => the same result
Visual studio info below:
Microsoft Visual Studio Community 2019 Version 16.4.1 VisualStudio.16.Release/16.4.1+29609.76 Microsoft .NET Framework Version 4.7.03062 Installed Version: Community ASP.NET and Web Tools 2019 16.4.457.38025 ASP.NET and Web Tools 2019 ASP.NET Web Frameworks and Tools 2019 16.4.457.38025 Azure App Service Tools v3.0.0 16.4.457.38025 Azure App Service Tools v3.0.0 Azure Functions and Web Jobs Tools 16.4.457.38025 Azure Functions and Web Jobs Tools C# Tools 3.4.1-beta4-19607-02+52d275c4f82f329a9732b078c7f7fa0e45cd3e84 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools. IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.21016.1 Microsoft Continuous Delivery Tools for Visual Studio 0.4 Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE. Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines Microsoft Library Manager 2.0.87+gbb515bf382 Install client-side libraries easily to any web project Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container. NuGet Package Manager 5.4.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/ ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info SQL Server Data Tools 16.0.61912.09160 Microsoft SQL Server Data Tools TypeScript Tools 16.0.11031.2001 TypeScript Tools for Microsoft Visual Studio Visual Basic Tools 3.4.1-beta4-19607-02+52d275c4f82f329a9732b078c7f7fa0e45cd3e84 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Visual F# Tools 10.4 for F# 4.6 16.4.0-beta.19556.5+e7597deb7042710a7142bdccabd6f92b0840d354 Microsoft Visual F# Tools 10.4 for F# 4.6 Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio Visual Studio Container Tools Extensions (Preview) 1.0 View, manage, and diagnose containers within Visual Studio. Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers
For me looks like the same as in https://github.com/techtalk/SpecFlow/issues/1809
Short explainer about the feature.cs
files in the solution explorer:
In the old csproj format (the big xml) the feature.cs files aren't displayed in the solution explorer. This is a limitation in the old project system. It works in the new sdk-style format.
But that doesn't matter, because the files are compiled and the classes are in the compiled assembly. This is all done in the SpecFlow.Tools.MSBuild.Generation package.
In the above mentioned issue, the test adapter NuGet package was missing. Adding it and the scenarios were displayed in the test explorer.
For me looks like the same as in #1809
Short explainer about the
feature.cs
files in the solution explorer: In the old csproj format (the big xml) the feature.cs files aren't displayed in the solution explorer. This is a limitation in the old project system. It works in the new sdk-style format. But that doesn't matter, because the files are compiled and the classes are in the compiled assembly. This is all done in the SpecFlow.Tools.MSBuild.Generation package.In the above mentioned issue, the test adapter NuGet package was missing. Adding it and the scenarios were displayed in the test explorer.
thanks. will check
vediankit I think i just needed to include the
SpecFlow.Tools.MsBuild.Generation
. That seems to resolve the issue.
This worked well for me!
For me looks like the same as in #1809
Short explainer about the
feature.cs
files in the solution explorer: In the old csproj format (the big xml) the feature.cs files aren't displayed in the solution explorer. This is a limitation in the old project system. It works in the new sdk-style format. But that doesn't matter, because the files are compiled and the classes are in the compiled assembly. This is all done in the SpecFlow.Tools.MSBuild.Generation package.In the above mentioned issue, the test adapter NuGet package was missing. Adding it and the scenarios were displayed in the test explorer.
It doesn't work for me. still stuck at test explorer doesn't show the tests.
For me looks like the same as in #1809 Short explainer about the
feature.cs
files in the solution explorer: In the old csproj format (the big xml) the feature.cs files aren't displayed in the solution explorer. This is a limitation in the old project system. It works in the new sdk-style format. But that doesn't matter, because the files are compiled and the classes are in the compiled assembly. This is all done in the SpecFlow.Tools.MSBuild.Generation package. In the above mentioned issue, the test adapter NuGet package was missing. Adding it and the scenarios were displayed in the test explorer.thanks. will check
I have the same problem with you. Did you manage to solve it ? Kindly share it to me. Thank you.
Having the same issue in VS2019
Please let me know what is the solution Thanks in advance
after installed package SpecFlow.Tools.MsBuild.Generation. working fine as able to see the tests in test exolorer
Thanks
Had same issue with: VS 19 Specflow.Xunit 3.1.97
Installing this resolved the issue and can see my tests now
Looks like it is solved => closing issue
In case someone else using the "classic" (legacy) project structure stumbles on this.
As mentioned in the #1809 , the workaround is to include the *.feature.cs
files into the project file.
I overlooked that reference and it took me almost a day to find the solution.
Hi, I was using Specflow with xunit. And I tried many options but nothing worked. At last I casually saw a nuget package called xunit.runner.visualstudio and installed it. And it worked for me :-)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Specflow Tests not appearing in Test Explorer
SpecFlow Version:
Used Test Runner
Version number: 3.0
Visual Studio Version
Are the latest Visual Studio updates installed?
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config or content of specflow.json
packages.config
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