Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucgagan/playwright-havoc
A tool for automatically identifying and analyzing flaky tests in your Playwright test suite.
https://github.com/lucgagan/playwright-havoc
flaky playwright test
Last synced: about 2 months ago
JSON representation
A tool for automatically identifying and analyzing flaky tests in your Playwright test suite.
- Host: GitHub
- URL: https://github.com/lucgagan/playwright-havoc
- Owner: lucgagan
- License: mit
- Created: 2023-11-11T23:54:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-13T16:14:40.000Z (about 1 year ago)
- Last Synced: 2024-10-31T09:50:30.926Z (2 months ago)
- Topics: flaky, playwright, test
- Language: TypeScript
- Homepage: https://ray.run/
- Size: 53.7 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Playwright Flakiness Detector (Havoc)
A tool for automatically identifying and analyzing flaky tests in your Playwright test suite.
## Setup
1. Install `playwright-havoc` dependency:
```bash
$ npm install playwright-havoc -D
```2. Import and use the `havoc` function:
```ts
import { test } from "@playwright/test";
import { havoc } from "playwright-havoc";test.beforeEach(async ({ page }) => {
await havoc(page);
});
```> [!WARNING]
> `havoc` must be used only while troubleshooting or trying to identify flaky tests. It must not be used in your CI/CD pipeline as it will cause your tests to run a lot longer than needed.## How does it work?
In short, it is designed to cause havoc in your test suite. It does this by intercepting and randomly modifying HTTP response times. It then analyzes the results to determine if any tests are flaky.