#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
SpecFlow Section in app.config or content of specflow.json
No response
Issue Description
The plugin generates the references to xunit classes in FQN style , like Xunit.Abstractions.ITestOutputHelper , Xunit.IAsyncLifetime ,ect
Consider the project with RootNamespace defined as X.Y.Z and there are classes under X.Y.Z.Xunit namespace.
What happens during compilation of generated code
public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
{
testRunner.OnScenarioInitialize(scenarioInfo);
testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs<Xunit.Abstractions.ITestOutputHelper>(_testOutputHelper);
}
is
MyFeature.feature(53,49): Error CS0234 : The type or namespace name 'IAsyncLifetime' does not exist in the namespace 'X.Y.Z.Xunit' (are you missing an assembly reference?)
Steps to Reproduce
Create test project with root namespace My.Company referencing xunit runner.
Add class under namespace My.Company.Xunit
Create feature file and try to compile the project.
SpecFlow Version
4.0.31-beta
Which test runner are you using?
xUnit
Test Runner Version Number
2.5.0
.NET Implementation
.NET 6.0
Project Format of the SpecFlow project
Sdk-style project format
.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
Test Execution Method
Visual Studio Test Explorer
SpecFlow Section in app.config or content of specflow.json
No response
Issue Description
The plugin generates the references to xunit classes in FQN style , like
Xunit.Abstractions.ITestOutputHelper
,Xunit.IAsyncLifetime
,ect Consider the project withRootNamespace
defined asX.Y.Z
and there are classes underX.Y.Z.Xunit
namespace. What happens during compilation of generated codeis
Steps to Reproduce
My.Company
referencing xunit runner.My.Company.Xunit
Link to Repro Project
No response