Some checks are pending
Go Benchmark / Performance Regression Check (push) Waiting to run
Cerberus Integration / Cerberus Security Stack Integration (push) Waiting to run
Upload Coverage to Codecov / Backend Codecov Upload (push) Waiting to run
Upload Coverage to Codecov / Frontend Codecov Upload (push) Waiting to run
CodeQL - Analyze / CodeQL analysis (go) (push) Waiting to run
CodeQL - Analyze / CodeQL analysis (javascript-typescript) (push) Waiting to run
CrowdSec Integration / CrowdSec Bouncer Integration (push) Waiting to run
Docker Build, Publish & Test / build-and-push (push) Waiting to run
Docker Build, Publish & Test / Security Scan PR Image (push) Blocked by required conditions
Quality Checks / Auth Route Protection Contract (push) Waiting to run
Quality Checks / Codecov Trigger/Comment Parity Guard (push) Waiting to run
Quality Checks / Backend (Go) (push) Waiting to run
Quality Checks / Frontend (React) (push) Waiting to run
Rate Limit integration / Rate Limiting Integration (push) Waiting to run
Security Scan (PR) / Trivy Binary Scan (push) Waiting to run
Supply Chain Verification (PR) / Verify Supply Chain (push) Waiting to run
WAF integration / Coraza WAF Integration (push) Waiting to run
5.7 KiB
Executable File
5.7 KiB
Executable File
name, version, description, author, license, tags, compatibility, requirements, environment_variables, parameters, outputs, metadata
| name | version | description | author | license | tags | compatibility | requirements | environment_variables | parameters | outputs | metadata | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| test-e2e-playwright-coverage | 1.0.0 | Run Playwright E2E tests with code coverage collection using @bgotink/playwright-coverage | Charon Project | MIT |
|
|
|
|
|
|
|
Test E2E Playwright Coverage
Overview
Runs Playwright end-to-end tests with code coverage collection using @bgotink/playwright-coverage. This skill collects V8 coverage data during test execution and generates reports in LCOV, HTML, and JSON formats suitable for upload to Codecov.
IMPORTANT: This skill starts the Vite dev server (not Docker) because V8 coverage requires access to source files. Running coverage against the Docker container will result in 0% coverage.
| Mode | Base URL | Coverage Support |
|---|---|---|
Docker (localhost:8080) |
❌ No - Shows "Unknown% (0/0)" | |
Vite Dev (localhost:5173) |
✅ Yes - Real coverage data |
Prerequisites
- Node.js 18.0 or higher installed and in PATH
- Playwright browsers installed (
npx playwright install) @bgotink/playwright-coveragepackage installed- Charon application running (default:
http://localhost:8080, usedocker-rebuild-e2ewhen app/runtime inputs change or the container is not running) - Test files in
tests/directory using coverage-enabled imports
Usage
Basic Usage
Run E2E tests with coverage collection:
.github/skills/scripts/skill-runner.sh test-e2e-playwright-coverage
Browser Selection
Run tests in a specific browser:
# Firefox (default)
.github/skills/scripts/skill-runner.sh test-e2e-playwright-coverage --project=firefox
# Firefox
.github/skills/scripts/skill-runner.sh test-e2e-playwright-coverage --project=firefox
CI/CD Integration
For use in GitHub Actions or other CI/CD pipelines:
- name: Run E2E Tests with Coverage
run: .github/skills/scripts/skill-runner.sh test-e2e-playwright-coverage
env:
PLAYWRIGHT_BASE_URL: http://localhost:8080
CI: true
- name: Upload E2E Coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: ./coverage/e2e/lcov.info
flags: e2e
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| project | string | No | firefox | Browser project: chromium, firefox, webkit |
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
| PLAYWRIGHT_BASE_URL | No | http://localhost:8080 | Application URL to test against |
| PLAYWRIGHT_HTML_OPEN | No | never | HTML report auto-open behavior |
| CI | No | "" | Set to "true" for CI environment behavior |
Outputs
Success Exit Code
- 0: All tests passed and coverage generated
Error Exit Codes
- 1: One or more tests failed
- Non-zero: Configuration or execution error
Output Directories
- coverage/e2e/: Coverage reports (LCOV, HTML, JSON)
lcov.info- LCOV format for Codecov uploadcoverage.json- JSON format for programmatic accessindex.html- HTML report for visual inspection
- playwright-report/: HTML test report with results and traces
- test-results/: Test artifacts, screenshots, and trace files
Viewing Coverage Reports
Coverage HTML Report
# Open coverage HTML report
open coverage/e2e/index.html
Playwright Test Report
npx playwright show-report --port 9323
Coverage Data Format
The skill generates coverage in multiple formats:
| Format | File | Purpose |
|---|---|---|
| LCOV | coverage/e2e/lcov.info |
Codecov upload |
| HTML | coverage/e2e/index.html |
Visual inspection |
| JSON | coverage/e2e/coverage.json |
Programmatic access |
Related Skills
- test-e2e-playwright - E2E tests without coverage
- test-frontend-coverage - Frontend unit test coverage with Vitest
- test-backend-coverage - Backend unit test coverage with Go
Notes
- Coverage Source: Uses V8 coverage (native, no instrumentation needed)
- Performance: ~5-10% overhead compared to tests without coverage
- Sharding: When running sharded tests in CI, coverage files must be merged
- LCOV Merge: Use
lcov -a file1.info -a file2.info -o merged.infoto merge
Last Updated: 2026-01-18 Maintained by: Charon Project Team