Skip to content

[Feature] Add Retries #2316

Closed
Closed

Description

Retries got reverted since there were bugs in it which would prevent users from using it efficiently.

Open items:

Activity

  1. bheemreddy181 commented on Sep 19, 2022

    @bheemreddy181

    Really looking forward into this - we are missing retries at this moment

  2. bheemreddy181 commented on Sep 19, 2022

    @bheemreddy181

    Can we also make retries differ based on the tag - like say if we have API tests then set retries to 0 and set retries to number n for web tests ?

  3. mxschmitt commented on Sep 19, 2022

    @mxschmitt
    ContributorAuthor

    Retries would be for the whole project, so you can define <Retries>1</Retries> inside your runsettings file or when defining it via --settings to dotnet test. This is the same way how it's done for Node.js.

    Just a question out of curiosity, are you using NUnit or MSTest?

  4. bheemreddy181 commented on Sep 19, 2022

    @bheemreddy181

    We are using Nunit - makes sense you can ignore the tag request. It’s better to have different run settings for different tag runs

  5. nicolaiarocci commented on Mar 21, 2023

    @nicolaiarocci

    Looking forward to this one too.

  6. masaplecas commented on Mar 27, 2023

    @masaplecas

    Is there any ETA about this one?

  7. DavinderZilo commented on Mar 30, 2023

    @DavinderZilo

    Any update on this, it will really help where tests at times fail duty flakey backend

  8. 3 remaining items

  9. gauravkhuraana commented on Feb 29, 2024

    @gauravkhuraana

    Dotnet is lagging compared to nodejs in many perspective. Can we please bring it to speed and bring on these features

  10. ashleybissell commented on Apr 10, 2024

    @ashleybissell

    Do we have any timescales for when this might be looked at again? It appears to be a popular issue and would be a big help to a lot of users.

  11. ertiusmeo commented on May 29, 2024

    @ertiusmeo

    Is there any plan for this feature? It would be nice to have it.

  12. mxschmitt commented on May 29, 2024

    @mxschmitt
    ContributorAuthor

    ertiusmeo we are actively exploring options for NUnit and MSTest and collaborate with the MSTest maintainers. (no eta unfortunately)

  13. Ozkanil commented on Jan 9, 2025

    @Ozkanil

    Hello Max Schmitt (@mxschmitt) is there any update on retry support for .net? Thanks!

  14. jfuinsure commented on Jan 20, 2025

    @jfuinsure

    Any updates?

  15. mattvb91 commented on Jan 27, 2025

    @mattvb91

    Looks like this is dead so we have no other option than to go to cypress. How is anyone using this in a CI CD environment currently?

  16. ac-ekm commented on Jan 31, 2025

    @ac-ekm

    Until the feature is implemented, the following workarounds are available. Perhaps it might help someone.
    dotnet-test-rerun
    Rerun with Powershell script

  17. HakamFostok commented on Jun 30, 2025

    @HakamFostok

    Depending on the comments provided, I think it is clear that this should have priority. I hope it will be implemented soon, we really need this, Thanks a lot

  18. Youssef1313 commented on Jul 3, 2025

    @Youssef1313
    Member

    Latest MSTest already provides a RetryAttribute for test methods. And for advanced scenarios where the features of RetryAttribute aren't enough, you can implement your own implementation based on RetryBaseAttribute.

  19. alexaka1 commented on Jul 4, 2025

    @alexaka1
  20. dcrousso commented on Oct 21, 2026

    @dcrousso
    Contributor

    Hi, the Playwright bot investigated this on my behalf.

    This remains a valid request for a shared Playwright .NET retry policy. Actionability waiting and assertion polling already exist, but neither reruns a failed test. The old retry attributes were deliberately withdrawn, and restoring them would also restore unresolved lifecycle and timeout behavior.

    Should this issue define a project wide Playwright policy across the supported runners, or document the retry facilities those runners now provide? That decision should precede another implementation.

    Current behavior and available runner options
    Implementation history and remaining design work
    Evidence and validation limits

    Source and history were inspected on local main at 9eac4c84, package version 1.64.0. All 21 issue comments and the paginated timeline were read, together with linked PR discussions, official documentation, and NUnit source. Source was unchanged. No builds or tests were run, no dependencies were installed, and no reporter projects were executed. Runner APIs above were verified from documentation and source, not by running compatibility tests with Playwright.

    The distinct action and assertion behavior is documented at https://playwright.dev/dotnet/docs/actionability and https://playwright.dev/dotnet/docs/test-assertions.

  21. dgozman commented on Nov 10, 2026

    @dgozman
    Collaborator

    Documented existing retry facilities for .net test runners in microsoft/playwright#43920. Not planning to introduce retries into playwright code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions