Skip to main content

Specflow + NUnit runner (retry failed tests)

Comments

7 comments

  • Vitaliy Dolotov

    Hi Andreas, none of the above packages are not working with the recent SpecFlow. Is there any plans to support retry functionality for nUnit as it does in xRetry.SpecFlow?

    0
  • Andreas Willich

    No, no plans to do it by ourselves.

    In the meantime a community member created https://github.com/farum12/NUnitRetry.SpecFlowPlugin

    0
  • Nithiya Subramanian

    Hi,

    I couldn't get the retry working with this NUnitRetry.SpecFlowPlugin package either. Any help would be much appreciated

    0
  • Vitaliy Dolotov

    Hi Nithiya,

    As far as I know there is no good implementation of retry functionality for nUnit. I've found that the only one package that is still working is NUnitRetry.SpecFlowPlugin. It brings retry functionality to tests but they will retry only on assertion fail but not when an unhandled exception happens. This is nUnit limitation, there is nothing to do with this.

    You can switch to xUnit and use xRetry.SpecFlow. It is working perfectly. Of course this won't be possible if you are using Playwright as you will have issues with parallel test execution.

    0
  • Daniel Melao

    Hi Vitaliy,

    I have a specflow+nunit project, but because of the lack of retry mechanisms for nunit, I'm also thinking of migrating to xunit. Have you tried it with specflow livingdoc?

    For example, if a test is retried (because of failure) and it passes, it appears in livingdoc as just 1 test (passed) or  as 2 tests (1 passed and 1 failed)?

    Thanks,

    Daniel

    0
  • Vitaliy Dolotov

    Hi Daniel,

    We do not use SpecFlow LivingDoc's so I can’t tell you exactly how it will work. But on Azure DevOps and TeamCity you will have only one mention of the test even if it will be retried. So if one test failed during the first execution but passed on retry in the report you will have just one green test.

     

    Thanks,

    Vitalii

    0

Please sign in to leave a comment.

Powered by Zendesk