apiaryio/dredd — pull request #2 by ecordell (2013-09-27 18:45:16+00:00)
Title: Adds xUnit reporting as an option

This pull request adds a `--junitreport` flag to the command line options and generates a very basic output in xUnit format.

Although the feature is "complete" in that it does actually output the test results to xUnit, there's a good bit left to do:

* There's no way to specify a path for the output file through the command line
* The output is minimal at best, just shows the test name and pass/fail.
* The file is never written if any of tests fail (!!)

It should be pretty obvious that this feature is crippled at the moment. There are several things about the way dredd is architectured that cause problems:

* Additional arguments to the tool aren't handled very well
* I started some work on improving this, but there's more to be done. I like the way [jasmine-node](https://github.com/mhevery/jasmine-node/blob/master/lib/jasmine-node/cli.js) handles this.
* Gavel doesn't seem to be very verbose. In the case of a failing test, it would be nice to have stacktraces to display.
* Testing stops at the first failing test! I feel at the very least, there should be a flag to control this behavior. And in general, the app exits far too eagerly - exits are forced deep in the app rather than passing errors back up.
* The reporting should be refactored. This pull request hacks in a junit reporter to output to a file in addition to the command line. There should probably be a `reporters` property on the configuration so that you can choose which reporters you want, and then they handle writing (instead of dumping to the console all over the place).

These are all fixable problems, but I didn't want to start refactoring if this project is going in a different direction. Thoughts/comments would be appreciated.

Dredd didn't meet my needs at the moment (running api tests and outputting xunit), so I wrote [bluefrisby](https://github.com/localmed/bluefrisby) as well. I see it as a stopgap, assuming dredd becomes, at some point, robust enough for production use.

Thanks!