Playwright Integration
Use @katalon/playwright-reporter to generate Playwright test result files and upload them to your Katalon True Platform project.
Prerequisites​
- Node.js version
18or later. @playwright/testversion1.0.0or later.- A Katalon API key if you want to upload results. If you have not set one up yet, follow this guide to generate your API key.
- Access to the Katalon True Platform project that will receive the uploaded results.
- Your Katalon project ID. You can find it in the URL after
/project/.
Upload Playwright test reports to Katalon True Platform​
-
Install dependencies: Open your Playwright project and run one of the following commands:
npm install --save-dev @katalon/playwright-reporterpnpm add -D @katalon/playwright-reporter -
Configure Playwright: Open
playwright.config.ts, then add the reporter and the global setup helper:import { defineConfig } from '@playwright/test';
import { getGlobalSetupPath } from '@katalon/playwright-reporter';
export default defineConfig({
globalSetup: getGlobalSetupPath(),
reporter: [
['list'],
[
'@katalon/playwright-reporter',
{
outputDir: './reports',
...(process.env.KATALON_API_KEY && {
platform: {
apiKey: process.env.KATALON_API_KEY,
projectId: process.env.KATALON_PROJECT_ID,
baseUrl: process.env.KATALON_BASE_URL,
executionUuid: process.env.KATALON_EXECUTION_UUID,
authUrl: process.env.KATALON_AUTH_URL,
},
}),
},
],
],
}); -
Run tests: Run the following command:
npx playwright testPlaywright runs your tests and the reporter stores Katalon logs in
./reports/. -
Upload reports: Choose an uploading method:
-
Separate upload: Add a script to
package.json, then run it after your test execution finishes:{
"scripts": {
"upload": "playwright-reporter upload --output ./reports --api-key $KATALON_API_KEY --project-id $KATALON_PROJECT_ID"
}
}Full CLI options:
Option Required Description --output <path>Yes Path to the reports directory. --api-key <key>Yes Your Katalon API key. --project-id <id>Yes The Katalon project ID that receives the results. --base-url <url>No Platform base URL. Default: https://testops.katalon.io.--auth-url <url>No Separate authentication URL. Default: https://api.katalon.com.--execution-uuid <uuid>No Associates the uploaded results with an existing execution. -
Upload during test execution: Specify
KATALON_API_KEYand other environment variables before you run - Reports are automatically uploaded, no separate uploading required.KATALON_API_KEY=your-key \
KATALON_PROJECT_ID=your-project-id \
KATALON_BASE_URL=https://qagen3platform.qa.katalon.com/ \
npx playwright test
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
KATALON_API_KEY | For upload | — | Your Katalon API key. |
KATALON_PROJECT_ID | For upload | — | The target Katalon project ID. |
KATALON_BASE_URL | For upload | https://testops.katalon.io | The Katalon True Platform base URL. |
KATALON_AUTH_URL | No | https://api.katalon.com | Overrides the authentication endpoint. |
KATALON_EXECUTION_UUID | No | Auto-generated | Groups results under an existing execution. |
Result​
Playwright test results are sent to Katalon True Platform, including:
- Test name, file path, status, and duration.
- Screenshots, videos, and trace files as attachments.
- Browser and project metadata, such as Chromium, Firefox, and WebKit.
- Error messages and stack traces.
Once the upload finishes successfully, navigate to Test Runs to view your Playwright runs alongside Katalon Studio runs.
Playwright tests can then be viewed separately in any report, using filters by Testing Framework.