Skip to content

Commit d6a123f

Browse files
committed
docs(testing): add a note on flaky tests to usage instructions
1 parent 5768762 commit d6a123f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/core/testing/usage-instructions.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,21 @@ test.describe.only('group of tests', () => {
186186
> [!IMPORTANT]
187187
> After debugging, make sure to remove the `.only` suffix to ensure all tests run again during normal execution.
188188
189-
#### 3. Pausing Test Execution
189+
#### 3. Repeating Tests to Reproduce Flaky Failures
190+
191+
Flaky tests may not fail consistently. To help reproduce intermittent failures locally, you can use Playwright's `--repeat-each` flag to run the same test multiple times in a row.
192+
193+
This is especially useful when CI reports a failure you cannot reproduce on your first local run.
194+
195+
**Example:**
196+
197+
```shell
198+
npm run test.e2e.docker.update-snapshots src/components/radio/test/a11y/radio.e2e.ts -- --repeat-each=10
199+
```
200+
201+
This runs the test 10 times, increasing the chance of catching the flaky behavior.
202+
203+
#### 4. Pausing Test Execution
190204

191205
Additionally, you can pause execution of a test by using the `page.pause()` method. This pauses the script execution and allows you to manually inspect the page in the browser.
192206

0 commit comments

Comments
 (0)