@testmonitor/playwright-reporter
v1.0.1
Published
The TestMonitor Playwright Reporter is a custom Playwright reporter that automatically sends your test results to TestMonitor.
Readme
TestMonitor Playwright Reporter
The TestMonitor Playwright Reporter (@testmonitor/playwright-reporter) is a custom Playwright reporter that automatically sends your test results to TestMonitor. It integrates directly with the Playwright test runner and requires minimal configuration.
Table of Contents
Installation
Install the package using your preferred package manager:
npm install @testmonitor/playwright-reporterUsage
To get started, you’ll need a token from your Playwright integration. You can find it on the Playwright integration page of your TestMonitor project.
Configure the reporter
Add the TestMonitor reporter @testmonitor/playwright-reporter to your playwright.config.ts file:
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
[
"@testmonitor/playwright-reporter",
{
domain: "example.testmonitor.com",
token: "token",
// Optional parameters
milestoneId: 12, // Use this if you want to link to an existing milestone
milestoneName: 'Release 2025.4', // Or use this to create or match a milestone by name
testEnvironmentId: 3 // ID of the target test environment in TestMonitor
},
],
],You can use either milestoneId or milestone, but not both. If both are provided, milestoneId will take precedence.
Run your tests
Run Playwright as usual. The reporter will automatically create a test run and submit the results to TestMonitor:
npx playwright testConsole output will show the progress:
✔ TestMonitor: All Playwright tests finished.
✔ TestMonitor: Uploaded test results.
✔ TestMonitor: Uploaded 2 attachments.
╔════════════════════════════╤═════════════════════════════════════════════════════╗
║ Playwright Test Status │ failed ║
║ Playwright Test Start Time │ 2025-07-31 14:37:36 ║
║ Playwright Test Duration │ 6.70s ║
║ Link to Test Run │ https://example.testmonitor.com/ex/plan/test-runs/6 ║
╚════════════════════════════╧═════════════════════════════════════════════════════╝Documentation
Please refer to our knowledge base for more information.
License
Copyright (c) TestMonitor | we are Cerios B.V. All rights reserved.
