Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Built-in Reporters in Playwright https://playwright.dev/docs/test-reporters#built-in-reporters

Playwright comes with several built-in reporters that help you visualize, log, and analyze test results. Here's a brief overview:

  1. List Reporter (list):

    • This is the default reporter.

    • It provides a simple, human-readable output in the terminal, listing each test as it runs.

    • Shows test results (pass/fail) with clear indicators.

  2. Dot Reporter (dot):

    • Displays a minimal output where each test result is shown as a single dot.

    • Good for situations where you want very concise feedback.

  3. Line Reporter (line):

    • Similar to the dot reporter, but each test is displayed on a single line.

    • Provides more information than dot but still remains compact.

  4. JSON Reporter (json):

    • Outputs test results in JSON format.

    • Useful for processing test results programmatically or for integrating with other tools.

  5. JUnit Reporter (junit):

    • Generates an XML report in the JUnit format.

    • This is often used in CI/CD pipelines for integrating with test reporting tools.

  6. HTML Reporter (html):

    • Generates a detailed HTML report.

    • Includes test results, screenshots, and videos (if configured).

    • Allows you to drill down into each test case and step.

  7. Third-Party Reporters (Allure, GitHub Actions, Report Portal etc.):

    • Third-party reporters are community-contributed plugins that extend Playwright's reporting capabilities.

    • These reporters often integrate with popular testing and CI/CD tools, offering additional features or customizations that aren't available in Playwright's built-in reporters.

For more details: https://playwright.dev/docs/test-reporters#introduction

Custom Reporter using Playwright API

Playwright Offers API to write custom test reports. A custom reporter is a class that implements specific methods to handle events during the test run.

  • No labels