haven-playwright-integration
Version:
Seamless Playwright integration with HAVEN test case management
47 lines (37 loc) • 1.42 kB
Markdown
# haven-playwright-integration
Seamless Playwright integration with HAVEN test case management. Mirrors the Cypress integration so the HAVEN runner and inputs remain unchanged.
## Key Features
- Automatic report generation (Playwright html + json)
- Tag-based filtering using `@TC-AUTO-XXXX` via `--grep`
- S3 artifact upload to `artifacts/{PRODUCT}/{PLAN_ID}/automation/{RUN_ID}`
- Posts results and summary to HAVEN API using shared files:
- `/shared/result-post-url.txt`
- `/shared/automation-cases.json`
- `/shared/triggered-by.txt`
- ECR push with product+version tagging (version from consumer `package.json`)
## Install
```bash
npm install haven-playwright-integration @playwright/test
```
## Usage
```bash
# Build locally
npx haven-playwright build --product=BE
# Build and push to ECR
npx haven-playwright build --product=BE --push
# Run filtered (used by HAVEN runner inside the image)
npx haven-playwright run --automationIds=TC-AUTO-123,TC-AUTO-124
```
## Expected Test Tagging
```ts
import { test, expect } from '@playwright/test';
test('login @TC-AUTO-123', async ({ page }) => {
// ...
});
```
## Artifacts
- ZIP: `artifacts/{PRODUCT}/{PLAN_ID}/automation/{RUN_ID}/{PRODUCT}_{TIMESTAMP}.zip`
- HTML: `artifacts/{PRODUCT}/{PLAN_ID}/automation/{RUN_ID}/index.html`
## Notes
- Works with existing HAVEN runner; no changes required
- Container base image: `mcr.microsoft.com/playwright:jammy`