Home
Reporter/npm Package

@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-reporter

Or with other package managers:

yarn add -D @exolar-qa/playwright-reporter
pnpm add -D @exolar-qa/playwright-reporter

Basic 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

OptionTypeDefaultDescription
apiKeystringEXOLAR_API_KEYAPI key for authentication
endpointstringhttps://exolar.qaDashboard URL (for self-hosted)
onlyOnFailurebooleanfalseOnly upload when tests fail
includeArtifactsbooleantrueInclude screenshots, videos, traces
maxArtifactSizenumber5MBMax artifact size in bytes
disabledbooleanfalseDisable 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_KEYYour Exolar QA API key

Optional

EXOLAR_URLDashboard URL (for self-hosted)
TEST_SUITE_NAMEName for the test suite (e.g., "E2E", "Smoke")

Auto-detected from GitHub Actions

GITHUB_RUN_IDUnique workflow run ID
GITHUB_HEAD_REFBranch name (for PRs)
GITHUB_SHACommit SHA
GITHUB_ACTORUser who triggered the workflow
GITHUB_WORKFLOWWorkflow 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,
};

Next Steps