The angles-playwright-reporter contains the custom reporter which can be used to store your playwright test results in the Angles Dashboard.
npm install angles-playwright-reporter --save-dev
To integrate the Angles Dashboard with your playwright tests, add the AnglesPlaywrightReporter to the reporter array in your playwright.config.ts.
Unlike the angles-wdio-reporter, no additional service is required. Playwright runs the reporter in a single process and awaits its onBegin/onEnd hooks, so the build is created and completed by the reporter itself.
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
[
'angles-playwright-reporter',
{
enabled: true,
buildName: 'Automated Test Run',
baseUrl: 'http://127.0.0.1:3000/rest/api/v1.0/',
reportingUrl: 'http://127.0.0.1:3001',
userToken: 'my-angles-api-token',
team: 'angles',
environment: 'qa',
component: 'playwright-example',
phase: 'crossbrowser',
artifacts: [
{
groupId: 'anglesHQ',
artifactId: 'angles-ui',
version: '1.0.0'
}
]
}
]
],
});
| Option | Default | Description |
|---|---|---|
enabled |
true |
When false, no build is created and no results are sent to Angles. |
baseUrl |
http://127.0.0.1:3000/rest/api/v1.0/ |
The Angles API url. |
reportingUrl |
http://127.0.0.1:3001 |
The Angles dashboard url, used to log a link to the results. |
buildName |
Test Automation Run |
The name the build is given in the dashboard. |
team |
angles |
The Angles team the build belongs to. |
environment |
qa |
The environment the tests ran against. |
component |
playwright-example |
The component being tested. |
phase |
undefined |
An optional phase to group the build under. |
userToken |
undefined |
An Angles api token, sent as the x-api-key header on every request. |
artifacts |
undefined |
Artifacts (groupId/artifactId/version) to record against the build. |
| Playwright | Angles |
|---|---|
| Run | Build |
| Test | Execution |
describe blocks (or the spec file name when a test is not in a describe block) |
Suite |
test.step() |
Step (PASS/FAIL) |
Test tags (e.g. @smoke) |
Execution tags (the leading @ is stripped) |
Project use config (browser, viewport, user agent) |
Platform |
Tests that timedOut or were interrupted are recorded as failures, since Angles has no equivalent state. Skipped tests are recorded with an INFO step. Each retry is sent as its own execution.
If the Angles build cannot be created (for example the API is unreachable), the reporter logs a warning, disables itself, and lets the test run continue — a reporting outage will not fail your test suite.
Once the build is created, its id is exposed as process.env.ANGLES_ID, so it can be picked up by other tooling within the run.