bdellegrazie / playwright-sonar-reporter

Playwright reporter for Sonarqube
Apache License 2.0
0 stars 0 forks source link

Code coverage and other features #3

Open sanchit3008 opened 1 month ago

sanchit3008 commented 1 month ago

hi brett, thanks for this package. i am in the process of integrating playwright to my own codebase and i cant find any other sonar reporter than this package.

are you currently actively maintaining this repo? i think adding coverage metrics would be a great first step towards adoption. also, it'd be nice if we can explore merging the reports from this package with other reports from unit test metrics.

bdellegrazie commented 1 month ago

Hi @sanchit3008,

are you currently actively maintaining this repo? Yes, to an extent, although Typescript / Javascript is not my forte. This is, as noted in the README.md, a combination of another attempt at the same thing via post-processing and the stock JUnit processor in playwright. Ideally I'd like to maintain similarity with Playwright's JUnit reporter implementation because it's pretty much just a simplification of that.

This is why I haven't set up testing, code-coverage etc., because I wanted to keep the code compatible with Playwright's to ensure easy fixing if that was updated.

i think adding coverage metrics would be a great first step towards adoption

In my case I used either: https://github.com/mxschmitt/playwright-test-coverage (Babel) https://www.npmjs.com/package/playwright-test-coverage (Vite) or https://www.npmjs.com/package/playwright-test-coverage-native although I didn't get good results at the time I tried this ^ (about a year ago)

it'd be nice if we can explore merging the reports from this package with other reports from unit test metrics

I'm not if I have understood what you're trying to do, but typically I'd just output JUnit as well and merge that instead since it's well supported.

sanchit3008 commented 1 month ago

I'm not if I have understood what you're trying to do, but typically I'd just output JUnit as well and merge that instead since it's well supported.

my endgoal is to have 2 set of tests - unit tests using jest and e2e using playwright. i am looking for sonar reports to be generated by both test runs, and then for them to be merged. perhaps merging is not in the scope for this project, but code coverage would be something it should have.