0.4.0 • Published 8 months ago

@bdellegrazie/playwright-sonar-reporter v0.4.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months 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

If using SonarCloud, either set the sonarcloud option as shown below or set the PLAYWRIGHT_SONAR_SONARCLOUD environment variable to true.

In configuration file, pass options directly:

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

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

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

8 months ago

0.4.0

8 months ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago