larrymyers / jasmine-reporters

Reporter classes for the jasmine test framework. Includes JUnitXmlReporter for generating junit xml output for running in CI environments like Jenkins.
MIT License
393 stars 180 forks source link

NUnitXmlReporter needed #55

Closed psech closed 10 years ago

psech commented 10 years ago

I am using jasmine-reporters with Protractor e2e testing framework and JUnit reporting it works perfect.

require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('e2e/test-report/', true, true));

What I need is NUnitXmlReporter which will work in the same way. This is for TeamCity, but I have got independent test results in xml format which are merged to one common report. That is why I cannot use ready TeamCity reporter.

I have done some research on web and discovered gmusick / jasmine-reporters project, which looks prommising, but I am unable to use it with your reporter.

Would it be possible to create NUnitXmlReporter?

putermancer commented 10 years ago

I took the reporter from gmusick and adapted it to work with our runners (also fixed a few bugs and added a few options to control the output). I've created some basic unit tests around it and verified that it works with Protractor and generates the output file appropriately.

Version 0.4.0 has been pushed to npm with this new reporter.

I don't have experience with NUnit reports, but the output seems to largely conform with the examples I've seen. If you find that it needs to be tweaked a bit to work for your case (or for a general case), please consider submitting a pull request with the appropriate changes and applicable test cases.

Good luck!