node-qunit-phantomjs icon indicating copy to clipboard operation
node-qunit-phantomjs copied to clipboard

Write a XML File for jUnit

Open wedneyyuri opened this issue 10 years ago • 2 comments

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

wedneyyuri avatar Dec 02 '15 17:12 wedneyyuri

👍

BenjaminVanRyseghem avatar May 06 '16 11:05 BenjaminVanRyseghem

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.

johnjiang avatar Dec 03 '16 15:12 johnjiang