SpecFlow.xUnitAdapter icon indicating copy to clipboard operation
SpecFlow.xUnitAdapter copied to clipboard

Tests not discovered after updating xunit package from 2.3.1 to 2.4.0 (new csproj)

Open PiotrBrzezianski opened this issue 6 years ago • 2 comments

We're using xUnitAdapter with new csproj targeting net461 framework. Everything was working fine until recent update of xUnit NuGet package to version 2.4.0. Since then no tests are being discovered.

I'm attaching MyCalculator sample project converted to new csproj format with SpecFlow.xUnitAdapter.Config.cs file added and using SpecFlowEmbeddedFeature to add feature files. Specflow.xUnitAdapter.xUnit24.Repro.zip

If I switch the package version back to 2.3.1 all test are discovered and pass as expected.

PiotrBrzezianski avatar Aug 06 '18 09:08 PiotrBrzezianski

Hi @PiotrBrzezianski,

https://github.com/gasparnagy/SpecFlow.xUnitAdapter/blob/master/src/SpecFlow.xUnitAdapter.SpecFlowPlugin/TestArtifacts/ScenarioTestCase.cs does not implement the new IXunitTestCase interface in 2.4.0 (https://github.com/xunit/xunit/blob/dabc047ce181813b886a3d0493bbeddbabf23a16/src/xunit.core/Sdk/IXunitTestCase.cs), so new two properties are missing (InitializationException and Timeout) in current version.

Regards,

mtrcn avatar Aug 06 '18 09:08 mtrcn

Same problem here. Tried with .NET 4.5 to 4.7.2.

@mtrcn or @gasparnagy what might the solution be? Does it require a PR or does it require our intervention?

davidzwa avatar Nov 16 '18 10:11 davidzwa