0

I have node.js project and I'd like to run test cases written mocha (visionmedia.github.io/mocha/) in our bamboo (atlassian product), but mocha does not provide any reported for bamboo, ie. JUnit reporter.

I'm thinking about coverting xUnit to JUnit formart, but so far I've not found any solution for this.

Can any one advice?

3

2 Answers 2

1

so far I fixed this by subunit combo:

mocha -R tap ./test/*.js > ./test-reports/result.tap

cd ./test-reports

cat ./result.tap | \
  tap2subunit | subunit2junitxml > result.junit && \
  xmllint --pretty 1 result.junit > result.junit.xml
0

use https://www.npmjs.com/package/mocha-bamboo-reporter there is a task "Mocha Test Parser" which is installed when you install the nodejs bamboo plugin.

Pickup the results written from the mocha-bamboo-reporter with this task in "final tasks" of your build stage

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.