When viewing Playwright progress in a GitHub Actions run, where the start of the output is usually truncated if you 'tune in' late, the following output:
121) Title of test
... is not very helpful in terms of showing progress, without something like:
121/300) Title of test
How do I tune the line reporter to include the total amount of tests in each line?
This thread is trying to answer question "How do I tune the line reporter to include the total amount of tests in each line?"
Related Ask AI answer for "How can I modify the line reporter in Playwright Test to display the total number of tests?".
You can customize the line reporter in Playwright Test to display the total number of tests. This can be done by modifying the playwright.config.ts
file.
Here's how you can do it:
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [['line', { printSummary: true }]],
});
The printSummary: true
option will make the line reporter display the total number of tests at the end of each line. This gives you a detailed overview of your test suite progress.
When you run your tests using npx playwright test --reporter=line
, your output will look something like this:
Running 124 tests using 6 workers
1) dot-reporter.spec.ts:20:1 › render expected (1/124)
The (1/124)
indicates that this is the first out of 124 total tests being executed. This way, you can track how many tests have been executed out of the total number.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].