@bdellegrazie/playwright-sonar-reporter
v0.2.1
Published
generate Sonarqube Generic Text Execution XML report with the playwright test results
Downloads
183
Readme
Playwright Reporter for Sonarqube
Simplified version of XrayApp's playwright-junit-report to support Sonarqube's Generic Data Test Execution format.
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