node-qunit-phantomjs
node-qunit-phantomjs copied to clipboard
Write a XML File for jUnit
I'm using a CI System and would be nice to see what tests are run. Maybe integration options with qunit-reporter-junit?
Similar: https://github.com/jonkemp/qunit-phantomjs-runner/pull/8
👍
I'm having issues with writing a PR to use the xml runner. Passing the parameters through to call the right runner is trivial but the runner is having issues injecting the code.
if (page.injectJs('./node_modules/qunit-reporter-junit/qunit-reporter-junit.js') === false) {
console.error('Could not inject `qunit-reporter-junit.js`.');
exit(1);
}
I'm assuming it's a path issue since qunit-reporter-junit isn't in the scope of the node package that's requiring node-qunit-phantomjs.
As an alternative, adding qunit-reporter-junit.js to the test runner html and executing:
./node_modules/.bin/node-qunit-phantomjs qunit.html --verbose --timeout=10 | tee /dev/stderr | grep '^<' > qunit-junit-report.xml
Works quite well.