You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Expand retryStrategy to test.describe.configure() #43194
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.
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?
Activity
pavelfeldman commentedon Oct 7, 2026
Please use the
lockproperty on a test, suite or file.toduyemi commentedon Oct 7, 2026
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
lockcan't provide runner-wide isolation without serializing the entire suite?retryStrategy: 'isolated'in test.describe.configure() for tests requiring zero background workers #43351 as a duplicate of this issueretryStrategy: 'isolated'in test.describe.configure() for tests requiring zero background workers #43351 as a duplicate of this issue