Rayrun

How do I customize the name of an HTML report in Playwright?

Answer

Sure, you can customize the name of your HTML report in Playwright. This is done through the outputFolder option in the playwright.config.ts file.

Here's how you can do it:

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

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

In this example, Playwright will generate an HTML report named "my-custom-report.html" instead of "index.html". The report will be saved in a folder called "my-custom-report".

Remember, when renaming the HTML report, make sure that you provide a valid and unique filename with the ".html" extension. Also, ensure that there are no conflicting filenames or folders with the same name within your project directory.

This way, you can organize and name your test reports according to your preferences or project requirements.

For more detailed information or specific use cases related to renaming an HTML report using Playwright, I recommend referring directly to their official documentation.

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

Related Questions

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 luc@ray.run.