Playwright
Post Playwright E2E test results directly to your PRs — test counts, failure details, and suite breakdowns in a single sticky comment.
Configure Playwright
Add the json reporter to your playwright.config.ts:
export default defineConfig({
reporter: [
['list'],
['json', { outputFile: 'playwright-results/results.json' }],
],
})Add the Workflow Step
- name: Run E2E tests
run: pnpm test:e2e
- name: Post Test Results
if: always()
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_KEY }}
pr-number: ${{ github.event.pull_request.number }}
sticky-id: test-results
signal: 'TEST_RESULTS'
test-results: |
- name: E2E Tests
path: playwright-results/results.jsonif: always() ensures the comment posts even when tests fail — that’s when you need the visibility most.
Combining with Vitest
If you also run Vitest unit tests, you can pass both suites to the same step and they’ll appear together in one comment:
- name: Run unit tests
run: pnpm test:unit
- name: Run E2E tests
run: pnpm test:e2e
- name: Post Test Results
if: always()
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_KEY }}
pr-number: ${{ github.event.pull_request.number }}
sticky-id: test-results
signal: 'TEST_RESULTS'
test-results: |
- name: Unit Tests
path: vitest-results/results.json
- name: E2E Tests
path: playwright-results/results.jsonNext Steps
- See the Vitest guide to set up unit test reporting
- See the Test Results signal for all available options
- Learn how sticky comments work under the hood
Last updated on