0.2.1 • Published 13 days ago

@bdellegrazie/playwright-sonar-reporter v0.2.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
13 days ago

Playwright Reporter for Sonarqube

Simplified version of XrayApp's playwright-junit-report to support Sonarqube's Generic Data Test Execution format.

npm version build workflow license Gitter chat npm downloads

Installation

Run the following commands:

npm

npm install @bdellegrazie/playwright-sonar-reporter --save-dev

yarn

yarn add @bdellegrazie/playwright-sonar-reporter --dev

Usage

Most likely you want to write the report to an xml file. When running with --reporter=@bdellegrazie/playwright-sonar-reporter, use PLAYWRIGHT_SONAR_OUTPUT_NAME environment variable:

PLAYWRIGHT_SONAR_OUTPUT_NAME=results.xml npx playwright test --reporter=@bdellegrazie/playwright-sonar-reporter
set PLAYWRIGHT_SONAR_OUTPUT_NAME=results.xml
npx playwright test --reporter=@bdellegrazie/playwright-sonar-reporter
$env:PLAYWRIGHT_SONAR_OUTPUT_NAME="results.xml"
npx playwright test --reporter=@bdellegrazie/playwright-sonar-reporter

In configuration file, pass options directly:

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

export default defineConfig({
  reporter: [['@bdellegrazie/playwright-sonar-reporter', { outputFile: 'results.xml' }]],
});

The Sonar reporter has no options beyond the outputFile property.

TO DOs

  • implement code coverage

Contact

Any questions related with this code, please raise issues in this GitHub project. Feel free to contribute and submit PR's.

References

LICENSE

Based on code from Playwright project and Xray-App's playwright-junit-report

Apache License v2.0

0.2.1

13 days ago

0.2.0

13 days ago

0.1.1

3 months ago