Reputation: 339
I am using Playwright Specflow in Nunit to automate web applications. There are some flaky tests and I want to retry them automatically.
I've tried using NUnitRetry.SpecFlowPlugin but it doesn't retry the failed test.
Is there someone who can help me?
Following is the package I am using.
<PackageReference Include="Allure.SpecFlow" Version="2.11.0" />
<PackageReference Include="Microsoft.Playwright.NUnit" Version="1.42.0" />
<PackageReference Include="SpecFlow.NUnit" Version="3.9.74" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
Upvotes: 1
Views: 86
Reputation: 51
Install the following nuget package.
xRetry.SpecFlow
Once installed , at the feature level add following tag
@retry(2,5000)
Feature: <Feature Name>
2 -- number of times to retry 5000 -- time in ms between each retry.
Upvotes: 0