user3807713
user3807713

Reputation: 3

Specflow+ Xunit Running every case twice in visual studio

I am using specflow with xunit and i am facing the issue as if i right click and run one selenium test case from the test explorer, all the other test cases also runs and both run twice. i have installed the following dependencies:

<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.5.0" />
    <PackageReference Include="DotNetSeleniumExtras.WaitHelpers" Version="3.11.0" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
    <PackageReference Include="Microsoft.TestPlatform.TestHost" Version="17.0.0" />
    <PackageReference Include="MongoDB.Driver" Version="2.14.1" />
    <PackageReference Include="Selenium.WebDriver" Version="4.1.0" />
    <PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="96.0.4664.4500" />
    <PackageReference Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" />
    <PackageReference Include="FluentAssertions" Version="6.2.0" />
    <PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.40" />
    <PackageReference Include="SpecFlow.xUnit" Version="3.9.40" />
    <PackageReference Include="xunit" Version="2.4.1" />
    <PackageReference Include="xunit.assert" Version="2.4.1" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">

i have tried removing packages folder from users/nuget folder and build again but that also did not helped.. However i did not faced this problem with Nunit

Upvotes: 0

Views: 201

Answers (1)

JSwat
JSwat

Reputation: 1

SpecFlow.Plus.LivingDocPlugin is a plugin for Specflow not Xunit. If you need to use both Specflow plus and Xunit you should also include the main Specflow libraries needed to interface with Xunit.

SpecFlow
SpecFlow.xUnit
SpecFlow.Tools.MsBuild.Generation

Upvotes: 0

Related Questions