Xray-App / xray-junit-extensions

Enhanced JUnit 5 integration with Xray Test Management for Jira
Eclipse Public License 2.0
16 stars 8 forks source link

Jest support? #6

Closed ypicard closed 2 years ago

ypicard commented 2 years ago

Hi,

Is there any documentation on how to integrate those features with a NodeJS Jest test suite? If support is already provided, where is the documentation?

Thank you!

bitcoder commented 2 years ago

Hi @ypicard, well, these are more Xray support kinda of questions but let me try to help. Basically what you have to do is just make jest output a JUnit XML report.

For Xray Cloud, you can have a look at some tutorials:

For Xray on Jira server/datacenter, you can also find similar tutorials. https://docs.getxray.app/display/XRAY/Testing+web+applications+using+Playwright https://docs.getxray.app/display/XRAY/Headless+testing+web+applications+using+Jest+and+Puppeteer+in+JavaScript

Regards Sergio

bitcoder commented 2 years ago

closing this as it is not related to this repository.

bitcoder commented 2 years ago

I think that now I've understood your question better @ypicard ; anyway, for Javascript and Jest there's no equivalent stuff (at least official). I've made a PR on the mocha-junit-reporter but I haven't got any feedback the team of that project unfortunately. I've made some PoC code with jest and that mocha-junit-reporter branch and I was able to achieve a working solution, but it's not offical nor it's final. I hope to have time to make it available later on but this is also dependent on the mocha-junit-reporter issue; it would be great if you could go there and vote and leave a comment so perhaps the team answers.

ypicard commented 2 years ago

Just did. This would indeed be perfect. Perhaps as a hint for an early improvement: possibility to link multiple requirements to a single test? 😇

Thanks!

bitcoder commented 2 years ago

@ypicard thanks! That's an interesting idea and I think it can be a viable possibility. I need to work with the upstream project to get that working... but lets keep the discussion there as I think it makes more sense :)

ypicard commented 2 years ago

Indeed. We currently have integration tests that test multiple requirements at once. If we were to use this project, it would be greatly appreciated if we could link multiple issues to a single test.