Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for a JUnit reporter #65

Open
antoine1fr opened this issue May 2, 2016 · 2 comments
Open

Support for a JUnit reporter #65

antoine1fr opened this issue May 2, 2016 · 2 comments

Comments

@antoine1fr
Copy link

It would be nice to have an alternative JUnit reporter.

It would allow me interface my test suites in Atlassian's Bamboo.

@gwynjudd
Copy link
Contributor

@antoine1fr I figured out how to get this working using the junit-reporter from https://github.com/larrymyers/jasmine-reporters.

.pipe(jasmine({
                integration: true, // or false
                vendor: 'node_modules/jasmine-reporters/src/junit_reporter.js'
            }));
var junitReporter = new jasmineReporters.JUnitXmlReporter({
    savePath: '..',
    consolidateAll: false
});
jasmine.getEnv().addReporter(junitReporter);

You have to be able to inject a __phantom_writeFile function into the window namespace when running under phantomJS (integration is true). I found that the jasmine-runner.js file wasn't quite suitable for this task because it calls phantom.exit() too soon before the test output files were written out. With a small modification to index.js, it was possible to substitute my own and have that working.

If you were running your tests under node then you probably wouldn't have to worry about that previous paragraph.

@gwynjudd gwynjudd mentioned this issue May 22, 2016
@gwynjudd
Copy link
Contributor

Here is my jasmine-runner.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants