@exolar-qa/playwright-reporter
The official Playwright reporter for Exolar QA. Automatically uploads test results to your dashboard.
Installation
npm install -D @exolar-qa/playwright-reporterOr with other package managers:
yarn add -D @exolar-qa/playwright-reporter
pnpm add -D @exolar-qa/playwright-reporterBasic Usage
playwright.config.ts
// playwright.config.ts
import { defineConfig } from "@playwright/test";
import { exolar } from "@exolar-qa/playwright-reporter";
export default defineConfig({
reporter: [
// Keep your existing reporters
["html"],
// Add Exolar QA reporter
[exolar, {
apiKey: process.env.EXOLAR_API_KEY,
}]
],
// Recommended: capture artifacts for failures
use: {
screenshot: "only-on-failure",
video: "retain-on-failure",
trace: "retain-on-failure",
},
});Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | EXOLAR_API_KEY | API key for authentication |
endpoint | string | https://exolar.qa | Dashboard URL (for self-hosted) |
onlyOnFailure | boolean | false | Only upload when tests fail |
includeArtifacts | boolean | true | Include screenshots, videos, traces |
maxArtifactSize | number | 5MB | Max artifact size in bytes |
disabled | boolean | false | Disable the reporter entirely |
Advanced Configuration
[exolar, {
// Required
apiKey: process.env.EXOLAR_API_KEY,
// Self-hosted dashboard
endpoint: "https://your-dashboard.example.com",
// Only send on failure (saves bandwidth)
onlyOnFailure: true,
// Skip artifact uploads (faster)
includeArtifacts: false,
// Allow larger artifacts (10MB)
maxArtifactSize: 10 * 1024 * 1024,
// Disable completely (for debugging)
disabled: process.env.DISABLE_EXOLAR === "true",
}]Environment Variables
Required
EXOLAR_API_KEY | Your Exolar QA API key |
Optional
EXOLAR_URL | Dashboard URL (for self-hosted) |
TEST_SUITE_NAME | Name for the test suite (e.g., "E2E", "Smoke") |
Auto-detected from GitHub Actions
GITHUB_RUN_ID | Unique workflow run ID |
GITHUB_HEAD_REF | Branch name (for PRs) |
GITHUB_SHA | Commit SHA |
GITHUB_ACTOR | User who triggered the workflow |
GITHUB_WORKFLOW | Workflow name |
TypeScript Support
The package includes full TypeScript definitions. Import types as needed:
import type { ExolarReporterOptions } from "@exolar-qa/playwright-reporter";
const options: ExolarReporterOptions = {
apiKey: process.env.EXOLAR_API_KEY,
onlyOnFailure: true,
};