Viewing test reports and running in CI
After successfully creating some end-to-end tests for our blog application, let’s wrap up the chapter by learning how to view HTML test reports and how to run Playwright in CI.
Viewing an HTML report
Playwright automatically generates HTML reports of test runs. We can generate these by executing the following command to run all tests:
$ npx playwright test
Then, run the following command to serve and view the HTML report of the last run:
$ npx playwright show-report
The report should open in a new browser window, and look as follows:
Figure 9.5 – An HTML test report generated by Playwright
As we can see, our three tests were successfully run on all three browsers. Click on one of the test runs to view all executed test steps in detail.
Running Playwright tests in CI
When we initialized Playwright, we were asked if we want to generate a GitHub Actions CI file. We agreed, so Playwright...