Package name showing as “root” in Jenkin pipeline with cypress junit reporter
sabf81 opened this issue · 6 comments
Hi currently there isn't an option for that, I had the same issue :/
Created PR to fix this #138
For now, you can use this patched reporter directly if you don't want to wait.
For example, I have this reporter in cypress/reporters/jenkins.js
and here is part of my cypress.json:
"reporter": "cypress/reporters/jenkins.js",
"reporterOptions": {
"mochaFile": "cypress/reports/cypress-report-[hash].xml",
"jenkinsMode": true,
"jenkinsClassnamePrefix": "E2E Tests",
"toConsole": true
},
Released patched version for those who are impatient as I am :)
https://www.npmjs.com/package/@prnsml/mocha-junit-reporter
npm install @prnsml/mocha-junit-reporter@2.1.1 --save-dev
- Set reporter to
@prnsml/mocha-junit-reporter
- Add
jenkinsClassnamePrefix
with your prefered prefix toreporterOptions
- 😎
@michaelleeallen can please accept the PR #138 to fix it?
Thanks.
Bump :) Love this project and that it caters to Jenkins, and this would be a nice QoL improvement.
Bump too : this would make it way easier to easily split different test levels / sources / suites in Jenkins :)
#138 was merged about a month age, this should be available now