Rayrun

How do I customize the name of the report folder generated by the blob reporter in Playwright?

Answer

Sure, you can customize the name of the report folder generated by the blob reporter in Playwright. By default, the blob reporter writes the report into the playwright-report folder in the current working directory.

You can change this by using the PLAYWRIGHT_HTML_REPORT environment variable. Here's how you can do it:

PLAYWRIGHT_HTML_REPORT=my-custom-report npx playwright test --reporter=blob

This command will create a folder named my-custom-report for the report.

Alternatively, you can also set the output folder directly in your playwright.config.ts file. Here's how:

import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: [['blob', { outputFolder: 'my-custom-report' }]],
});

This configuration will also create a folder named my-custom-report for the report.

So, whether you prefer using environment variables or setting it directly in your configuration file, you have the flexibility to set a custom name for your report folder.

References

Thank you!
Was this helpful?
Still have questions?

If you still have questions, please ask a question and I will try to answer it.

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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].