How to retry failed tests using SpecFlow.MSTest
Given the announcement about retiring SpecFlow+Runner (https://specflow.org/using-specflow/the-retirement-of-specflow-runner/), it is suggested to use xRetry.SpecFlow which from reading the ReadMe, is for scenarios in SpecFlow.XUnit. following your migration instructions, we are using SpecFlow.MSTest. How do we use retry if we are using SpecFlow.MSTest please?
A community member (Farum) created a version for MSTest: https://www.nuget.org/packages/NUnitRetry.SpecFlowPlugin/3.9.580
Thanks for the quick response. From briefly looking at NUnitRetry.SpecFlowPlugin, the name and ReadMe suggests this is for NUnit (SpecFlow.NUnit) and not MSTest.
Would be great if someone had an MSTestRetry.SpecFlowPlugin Nu~Get package to help with this.0
Sorry, it's looks like it is too early for me.
Yeah, it is for NUnit.
I don't know any for MSTest then. But as the xRetry.SpecFlow and NUnitRetry is open source, it shouldn't be that hard, that you create a MSTest version by yourself.0
Haven't had time to look into this unfortunately. Hopefully someone else has.0
Karl Farley Pls let me know if any solution is there for retrying fail test case in mstest . As specrun support wont be there ,we are moving the existing specflow to mstest .0
If you use Azure DevOps pipeline, the Visual Studio Test Task has rerun/retry capabilities built-in.
rerunFailedTests: True rerunType: 'basedOnTestFailureCount'
That looks pretty good and as it happens, we do use AzDO pipelines.0
Please sign in to leave a comment.