jbehave/jbehave-core — pull request #25 by cressie176 (2011-12-15 15:37:35+00:00)
Title: Extracting failure handling code in Embedder to overridable method

I want to debug JBehave scenarios failures using the Eclipse JUnit view pane. This has two advantages...

1. I can double click on the stack trace and be taken to the equivalent line of code
2. I can double click on ComparisonFailure lines and am presented with a nice comparison view making it easy to spot the difference.

This is not possible with the current Embedder because AssertionFailedExceptions / ComparisonExceptions are wrapped in a RunningStoryException and the failure information is displayed as text on the console. Setting verbose = true adds a full stack trace to the console, but still doesn't help with the above.

In order to get my desired behaviour I need to be able to get the Embedder to throw the first raw exception instead of RunningStoryException. I appreciate that with the batching this might be tricky, and it only makes sense if I have one junit test per scenario, so I'm not sure it's something that you'd want to support from the JBehave code, but the change that allows me to extend the Embedder and do this on my project is so trivial I though you might be able to include it in a future JBehave release. Please see Embedder.java in the associated pull request for more details.

Thanks.

Steve