From 07b9f63ac83546f585168afc3791115014e47fa1 Mon Sep 17 00:00:00 2001 From: William Shepherd Date: Mon, 18 Aug 2025 19:41:40 -0500 Subject: [PATCH] Updates Playwright Docs --- flaky-tests/get-started/frameworks/playwright.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/flaky-tests/get-started/frameworks/playwright.md b/flaky-tests/get-started/frameworks/playwright.md index d5c5572d..62219a9d 100644 --- a/flaky-tests/get-started/frameworks/playwright.md +++ b/flaky-tests/get-started/frameworks/playwright.md @@ -20,7 +20,11 @@ After correctly generating reports following the above steps, you'll be ready to ### Generating Reports -Playwright has multiple built-in reporters, including JUnit XML which Trunk can ingest. To get XML reports, add the following to your Playwright config: +Playwright has multiple built-in reporters, including JUnit XML, but we recommend using the [@trunkio/trunk-playwright-reporter](https://www.npmjs.com/package/@trunkio/trunk-playwright-reporter) reporter, which is purpose-built for Trunk and offers better integration. To get started, install the package from npm: + +``` +npm install @trunkio/trunk-playwright-reporter --save-dev +``` {% code title="playwright.config.ts" %} ```typescript @@ -28,7 +32,7 @@ import { defineConfig } from '@playwright/test'; export default defineConfig({ reporter: [ - ['junit', { outputFile: 'junit.xml' }] + [['@trunkio/trunk-playwright-reporter']] ], }); ``` @@ -37,7 +41,7 @@ export default defineConfig({ Alternatively, you can specify reporting behavior inline in your CI: ```sh -npx playwright test --reporter=junit +npx playwright test --reporter=@trunkio/trunk-playwright-reporter ``` #### Report File Path