How to retry failed tests using SpecFlow.MSTest
Hello.
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?
Thanks,
Karl.
-
A community member (Farum) created a version for MSTest: https://www.nuget.org/packages/NUnitRetry.SpecFlowPlugin/3.9.58
0 -
Hello Andreas.
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.
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/vstest?view=azure-devops
rerunFailedTests: True rerunType: 'basedOnTestFailureCount'
rerunFailedTestCasesMaxLimit
: '5'
rerunMaxAttempts: '2'1 -
That looks pretty good and as it happens, we do use AzDO pipelines.
0
Please sign in to leave a comment.
Comments
7 comments