Playwright is a powerful tool for automating browser tests, but sharing reports with team members or clients can be challenging.
This blog post will guide you through using GitHub Pages and GitHub Actions to publish and share your Playwright reports easily.
Like videos instead? Checkout our YouTube video on publishing Playwright reports to GitHub pages.
While you can run local reports using the command npx playwright show-report
, which opens a port on your computer, sharing these reports with others requires a different approach. Here are some common methods and their drawbacks:
At Loop, we use GitHub Actions to publish reports to a GitHub Page. This approach allows anyone with internet access and the necessary credentials to view the report. Additionally, all trace files are hosted within the report itself.
In your GitHub Actions YAML file, use the configure-pages
and pages-artifact
actions to upload your artifact and deploy it to GitHub Pages.
Using GitHub Actions to publish Playwright reports to a GitHub Page is a convenient way to share test results with team members or clients. It allows easy access to all trace files and eliminates the hassle of dealing with multiple trace files for different tests. Plus, being hosted by GitHub means you don't need to worry about hosting or maintenance.
If you're working with Playwright and need a reliable way to share reports, consider using GitHub Actions to publish them to a GitHub Page.