From e8e30030a5016c9694a9e81c030e7beb8fe1dcd0 Mon Sep 17 00:00:00 2001 From: snomiao Date: Tue, 9 Sep 2025 23:43:57 +0000 Subject: [PATCH] fix: generate JSON reports alongside HTML for test count extraction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add JSON reporter to Playwright test runs - Generate report.json alongside HTML reports - Store JSON report in playwright-report directory - This enables accurate test count extraction from CI artifacts The HTML reports alone don't contain easily extractable test statistics as they use a React app with dynamically loaded data. JSON reports provide direct access to test counts. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/test-ui.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-ui.yaml b/.github/workflows/test-ui.yaml index f8f6cf955..ae6552bfa 100644 --- a/.github/workflows/test-ui.yaml +++ b/.github/workflows/test-ui.yaml @@ -229,8 +229,10 @@ jobs: - name: Run Playwright tests (${{ matrix.browser }}) id: playwright - run: npx playwright test --project=${{ matrix.browser }} --reporter=html + run: npx playwright test --project=${{ matrix.browser }} --reporter=html --reporter=json working-directory: ComfyUI_frontend + env: + PLAYWRIGHT_JSON_OUTPUT_NAME: playwright-report/report.json - uses: actions/upload-artifact@v4 if: always() @@ -275,8 +277,13 @@ jobs: merge-multiple: true - name: Merge into HTML Report - run: npx playwright merge-reports --reporter html ./all-blob-reports + run: | + npx playwright merge-reports --reporter html --reporter json ./all-blob-reports + # Move JSON report to the HTML report directory for easier access + [ -f "report.json" ] && mv report.json playwright-report/report.json working-directory: ComfyUI_frontend + env: + PLAYWRIGHT_JSON_OUTPUT_NAME: report.json - name: Upload HTML report uses: actions/upload-artifact@v4