
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
playwright-qase-reporter
Advanced tools
Qase Playwright Reporter enables seamless integration between your Playwright tests and Qase TestOps, providing automatic test result reporting, test case management, and comprehensive test analytics.
npm install --save-dev playwright-qase-reporter
1. Create qase.config.json in your project root:
{
"mode": "testops",
"testops": {
"project": "YOUR_PROJECT_CODE",
"api": {
"token": "YOUR_API_TOKEN"
}
}
}
2. Add Qase ID to your test:
Playwright offers three ways to link tests with Qase test cases:
import { test, expect } from '@playwright/test';
import { qase } from 'playwright-qase-reporter';
// Option 1: Wrapper function (similar to Jest)
test(qase(1, 'User can login with valid credentials'), async ({ page }) => {
await page.goto('https://example.com');
expect(await page.title()).toBe('Example Domain');
});
// Option 2: Method-based (Playwright's unique approach)
test('User can login', async ({ page }) => {
qase.id(1);
qase.title('User can login with valid credentials');
await page.goto('https://example.com');
expect(await page.title()).toBe('Example Domain');
});
// Option 3: Native Playwright annotations
test('User can login', {
annotation: { type: 'QaseID', description: '1' },
}, async ({ page }) => {
await page.goto('https://example.com');
expect(await page.title()).toBe('Example Domain');
});
3. Configure Playwright reporter in playwright.config.ts:
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
[
'playwright-qase-reporter',
{
mode: 'testops',
testops: {
api: {
token: process.env.QASE_API_TOKEN,
},
project: 'YOUR_PROJECT_CODE',
},
},
],
],
});
4. Run your tests:
npx playwright test
The reporter is configured via (in order of priority):
QASE_*)qase.config.json)| Option | Environment Variable | Description |
|---|---|---|
mode | QASE_MODE | Set to testops to enable reporting |
testops.project | QASE_TESTOPS_PROJECT | Your Qase project code |
testops.api.token | QASE_TESTOPS_API_TOKEN | Your Qase API token |
qase.config.json{
"mode": "testops",
"fallback": "report",
"testops": {
"project": "YOUR_PROJECT_CODE",
"api": {
"token": "YOUR_API_TOKEN"
},
"run": {
"title": "Playwright Automated Run"
},
"batch": {
"size": 100
}
},
"report": {
"driver": "local",
"connection": {
"local": {
"path": "./build/qase-report",
"format": "json"
}
}
}
}
playwright.config.tsimport { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['list'],
[
'playwright-qase-reporter',
{
mode: 'testops',
debug: false,
testops: {
api: {
token: process.env.QASE_API_TOKEN,
},
project: 'YOUR_PROJECT_CODE',
uploadAttachments: true,
run: {
title: 'Automated Playwright Run',
description: 'Nightly regression tests',
complete: true,
},
batch: {
size: 100,
},
},
framework: {
browser: {
addAsParameter: true,
parameterName: 'Browser',
},
markAsFlaky: true,
},
},
],
],
});
Full configuration reference: See qase-javascript-commons for all available options including logging, status mapping, execution plans, and more.
Playwright provides multiple patterns for linking tests. Choose the one that fits your style:
import { test, expect } from '@playwright/test';
import { qase } from 'playwright-qase-reporter';
// Pattern 1: Wrapper function with single ID
test(qase(1, 'Test name'), async ({ page }) => {
expect(true).toBe(true);
});
// Pattern 2: Wrapper function with multiple IDs
test(qase([1, 2, 3], 'Test covering multiple cases'), async ({ page }) => {
expect(true).toBe(true);
});
// Pattern 3: Method-based ID assignment
test('Test name', async ({ page }) => {
qase.id(1);
expect(true).toBe(true);
});
Enhance your tests with additional information:
import { qase } from 'playwright-qase-reporter';
test('Login test', async ({ page }) => {
qase.id(1);
qase.title('User can successfully login');
qase.fields({
severity: 'critical',
priority: 'high',
layer: 'e2e',
});
qase.suite('Authentication / Login');
// Test logic
await page.goto('https://example.com/login');
expect(await page.title()).toBe('Login');
});
Exclude specific tests from Qase reporting (test still runs, but results are not sent):
import { qase } from 'playwright-qase-reporter';
test('This test runs but is not reported to Qase', async ({ page }) => {
qase.ignore();
expect(true).toBe(true);
});
| Playwright Result | Qase Status |
|---|---|
| passed | passed |
| failed | failed |
| timedOut | failed |
| skipped | skipped |
| interrupted | skipped |
For more usage examples, see the Usage Guide.
# Run all tests with Qase reporting
npx playwright test
# Run specific test file
npx playwright test tests/auth.spec.ts
# Run tests with specific tag
npx playwright test --grep "@smoke"
# Run tests in headed mode
npx playwright test --headed
# Run with specific browser
npx playwright test --project=chromium
# Run with custom test run title
QASE_TESTOPS_RUN_TITLE="Nightly Regression" npx playwright test
The Network Profiler automatically captures outgoing HTTP requests made during test execution and reports them as REQUEST-type steps in Qase TestOps.
Additional setup: Import test from the reporter's fixture instead of @playwright/test:
// Before
import { test, expect } from '@playwright/test';
// After — enables network profiling
import { test } from 'playwright-qase-reporter/fixture';
import { expect } from '@playwright/test';
The fixture automatically wraps each test to capture HTTP requests. No other code changes are needed.
Enable in qase.config.json:
{
"profilers": ["network"],
"networkProfiler": {
"skip_domains": ["analytics.example.com"],
"track_on_fail": true
}
}
| Option | Description | Default |
|---|---|---|
profilers | Array of profilers to enable. Use ["network"] for HTTP capture | [] |
networkProfiler.skip_domains | Domains to exclude from profiling | [] |
networkProfiler.track_on_fail | Capture response body for failed requests (status >= 400) | true |
Requests to
qase.ioare always excluded automatically.
| Guide | Description |
|---|---|
| Usage Guide | Complete usage reference with all methods and options |
| Attachments | Adding screenshots, logs, and files to test results |
| Steps | Defining test steps for detailed reporting |
| Multi-Project Support | Reporting to multiple Qase projects |
| Upgrade Guide | Migration guide for breaking changes |
See the examples directory for complete working examples.
Apache License 2.0. See LICENSE for details.
FAQs
Qase TMS Playwright Reporter
The npm package playwright-qase-reporter receives a total of 133,162 weekly downloads. As such, playwright-qase-reporter popularity was classified as popular.
We found that playwright-qase-reporter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.