Open akalcik opened 1 year ago
Any movement on this? Its affecting our team as well.
I have the same issue any help
I had the same problem. I was running SpecFlow with xUnit.
My philosophy is: If you want Microsoft stuff to work, put as much microsoft stuff in the equation as possible. (When in doubt, choose a microsoft component...)
Obviously, you'll need to make sure every generated *.feature.cs file that contains xunit tests has been removed after building the solution.
Now, when I run dotnet test
, it discovers and runs the tests.
Hope this helps anyone!
SpecFlow Version
3.9.42
Which test runner are you using?
xUnit
Test Runner Version Number
2.4.3
.NET Implementation
.NET 6.0
Project Format of the SpecFlow project
Classic project format using
<PackageReference>
tags.feature.cs files are generated using
Unknown
Test Execution Method
Command line – PLEASE SPECIFY THE FULL COMMAND LINE
SpecFlow Section in app.config or content of specflow.json
Issue Description
We switched our solution to NuGet Central Package Management. Now we are unable to execute the tests with
dotnet test
on the test project using SpecFlow. Runningdotnet test
does not build the project, runningdotnet build
builds butdotnet test
afterward still does not execute the tests.TestExecution.json
is also not created. It runs withdotnet vstest
, withvstest.console.exe
and with Visual Studio 2022 17.4 test runner. All other tests not using SpecFlow (UnitTests) are running withdotnet test
.Steps to Reproduce
Create
Directory.Packages.props
with package versions and remove package version fromcsproj
. Examples below.Directory.Packages.props
Tests.csproj
Run
dotnet test
. Project do not compile,bin
Folder is empty. Rundotnet build
, project compile butTestExecution.json
is not created, afterward rundotnet test
, tests are not executed.Link to Repro Project
No response