[Feature]: Allow `retryStrategy: 'isolated'` in test.describe.configure() for tests requiring zero background workers
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 22/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- testing
Direzione di ricerca
The payload names only the retryStrategy option, the global playwright.config.ts setting, and test.describe.configure(), so start by finding where the global 'isolated' retry strategy is applied in the runner's scheduling. The open question is how a per-describe override can defer retries to a single-worker phase while other workers run. Done means a describe-level retryStrategy: 'isolated' queues only that suite's failed retries for isolation, with a test covering the mixed case. Maintainer design input is needed first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🚀 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.
Existing features do not solve this
- Why
lockdoesn't work:
lock is an opt-in named mutex, not a runner-wide exclusive lock:
If Test A has { lock: 'foo' }, it only blocks other tests that also declare { lock: 'foo' }.
All other unlocked tests in the repository still run concurrently in background workers alongside Test A.
To achieve true isolation with lock, we would have to add { lock: 'foo' } to every single test in the entire codebase, which would completely eliminate parallel execution for the whole test run. - Why global retryStrategy: 'isolated' in playwright.config.ts is insufficient:
It is currently an all-or-nothing global flag.
It forces every failed test across thousands of unrelated files to defer its retries to the single-worker tail phase, even if 99% of tests are completely stateless and should just retry immediately.
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('exclusive test', 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 Behaviour:
Global/default retry strategy remains 'immediate' (or whatever is set in playwright.config.ts).
Test files configured with override, retryStrategy: 'isolated' at the test.describe level are queued to run in isolation (one worker, no other concurrent tests running) upon failure.
Motivation
We have specific tests that require zero-concurrency isolation (meaning no other worker threads can be running anywhere in the runner at the same time) to pass as the nature of these tests make them extremely vulnerable to cross-test interference. We want our test suite to run in parallel by default but if these specific tests fail under concurrency, we want their retries to run in isolation without background workers.
- Lingua principale
- TypeScript
- Stelle
- 97.4k
- Fork
- 6.6k
- Merge medio
- 18h 15m
- PR unite (30g)
- 318
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/playwright
-
[Feature]: Set `this.name` in `TargetClosedError` constructorForse di nuovo libera @LeonxLJX l’ha presa 42 giorni fa e non c’è nessuna pull request aperta. ApertaP3-collecting-feedback
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
microsoft/playwright#42522 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: ariaSnapshot() emits \uXXXX / \b escapes in role names that toMatchAriaSnapshot() parses back incorrectlyForse già presa @alok-108 l’ha presa oggi. Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 22/100
microsoft/playwright#43489 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Chromium – locale is not applied to Accept-Language / navigator.languages inside dedicated WorkersForse già presa @yury-s l’ha presa oggi. Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 25/100
microsoft/playwright#43484 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: fill() on a paragraph inside a contenteditable body in an iframe resolves but inserts nothingForse già presa @yury-s l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
microsoft/playwright#43483 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Python sync API logs CancelledError when exiting sync_playwright() with an unanswered routeForse già presa @yury-s l’ha presa oggi. Aperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 18/100
microsoft/playwright#43463 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/playwright
Issue simili
-
`cf complete zsh >> .zshrc` fails on vanilla zshForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#340 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Rename Madson cameraAperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 75/100
StoDevX/AAO-React-Native#8785 ·
I maintainer di solito rispondono entro 1 giorno
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitForse già presa @myOmikron l’ha presa oggi. Apertabug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100