Skip to content

[Feature]: Expand retryStrategy to test.describe.configure() #43194

Closed

Description

@toduyemi

🚀 Feature Request

Playwright recently introduced retryStrategy: 'isolated', however, it is currently restricted to the global testConfig. It'd be very helpful if retryStrategy was implemented at the test file level in test.describe.configure() so isolated retries can be targeted only to tests that require zero concurrency to pass.

Example

import { test, expect } from '@playwright/test';

// Only this suite will be retried in isolation if concurrency causes a failure
test.describe.configure({
retries: 1,
retryStrategy: 'isolated',
});

test.describe('tests that fail under concurrent execution', () => {
test('state-sensitive operation', async ({ page }) => {
/* Runs in parallel initially.
If it collides with another worker and fails, it is retried
at the end of the run with no other tests running concurrently. */
});
});

Expected Behavior:

  • Global/default retry strategy remains 'immediate' (or whatever is set in playwright.config.ts).
  • Tests marked with retryStrategy: 'isolated' at the test.describe level are queued to run in isolation (one worker, no other concurrent tests running) upon failure.

Motivation

I have some tests that will never pass when run concurrently alongside other tests. The nature of these tests make them extremely vulnerable to cross-test interference but pass reliably when run completely in isolation. This new feature provides an avenue to start seeing some reliable results. It would provide an avenue to designate only the concurrency-sensitive tests for isolated retries.

Activity

  1. pavelfeldman commented on Oct 7, 2026

    @pavelfeldman
    Member

    I have some tests that will never pass when run concurrently alongside other tests

    Please use the lock property on a test, suite or file.

  2. toduyemi commented on Oct 7, 2026

    @toduyemi
    Author

    Pavel Feldman (@pavelfeldman) That doesn't work in this scenario unfortunately. Because locks are opt-in mutexes, I would have to apply the same lock to every single other test in my large test suite. That's not only unmaintainable, it means that the rest of the test suite won't run concurrently with each other as well, serializing the whole test suite. That's why being able to scope retryStrategy at the test file level is needed here.

    Could you please reopen this issue, given that lock can't provide runner-wide isolation without serializing the entire suite?

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

Metadata

Metadata

Assignees

No one assigned

    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