Enovea / fitnesse-launcher-maven-plugin

Automatically exported from code.google.com/p/fitnesse-launcher-maven-plugin
0 stars 0 forks source link

Make Exception from FitNesse runs available to Maven console #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The config option might be something like:
<showTestExceptions>true|false</showTestExceptions>

Data about Exceptions are available in 'target/fitnesse/reports/*.html'

This output can be captured and logged to the console during the 'verify' goal.

Fit Exceptions look like this:
<td class="error">setPostcode<hr/> <span 
class="fit_label">java.lang.IllegalStateException: TEST EXCEPTION</span></td>

Slim Exceptions look like this:

        </tr><tr class="exception-detail closed-detail"><td colspan="5"><pre>__EXCEPTION__:java.lang.IllegalStateException: TEST EXCEPTION
        at anubhava.Address.setPostcode(Address.java:139) [file:/home/stewart/workspace/fitnesse-launcher/fitnesse-launcher-java-example/target/classes/]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0]
        at fitnesse.slim.fixtureInteraction.DefaultInteraction.methodInvoke(DefaultInteraction.java:16) [fitnesse-20130530.jar]
        at fitnesse.slim.MethodExecutor.callMethod(MethodExecutor.java:43) [fitnesse-20130530.jar]
        at fitnesse.slim.MethodExecutor.invokeMethod(MethodExecutor.java:30) [fitnesse-20130530.jar]
        at fitnesse.slim.MethodExecutor.findAndInvoke(MethodExecutor.java:52) [fitnesse-20130530.jar]
        at fitnesse.slim.FixtureMethodExecutor.execute(FixtureMethodExecutor.java:20) [fitnesse-20130530.jar]
        at fitnesse.slim.StatementExecutor.getMethodExecutionResult(StatementExecutor.java:120) [fitnesse-20130530.jar]
        at fitnesse.slim.StatementExecutor.call(StatementExecutor.java:98) [fitnesse-20130530.jar]
        at fitnesse.slim.instructions.CallInstruction.executeInternal(CallInstruction.java:35) [fitnesse-20130530.jar]
        at fitnesse.slim.instructions.Instruction.execute(Instruction.java:30) [fitnesse-20130530.jar]
        at fitnesse.slim.ListExecutor$Executive.executeStatement(ListExecutor.java:50) [fitnesse-20130530.jar]
        at fitnesse.slim.ListExecutor$Executive.executeStatements(ListExecutor.java:44) [fitnesse-20130530.jar]
        at fitnesse.slim.ListExecutor.execute(ListExecutor.java:84) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.executeInstructions(SlimServer.java:107) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.processTheInstructions(SlimServer.java:94) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.processOneSetOfInstructions(SlimServer.java:68) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.tryProcessInstructions(SlimServer.java:54) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.serve(SlimServer.java:40) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimService.accept(SlimService.java:112) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimService$1.run(SlimService.java:50) [fitnesse-20130530.jar]
Caused by: java.lang.NullPointerException: NESTED
        at anubhava.Address.setPostcode(Address.java:139) [file:/home/stewart/workspace/fitnesse-launcher/fitnesse-launcher-java-example/target/classes/]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0]
        at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0]
        at fitnesse.slim.fixtureInteraction.DefaultInteraction.methodInvoke(DefaultInteraction.java:16) [fitnesse-20130530.jar]
        at fitnesse.slim.MethodExecutor.callMethod(MethodExecutor.java:43) [fitnesse-20130530.jar]
        at fitnesse.slim.MethodExecutor.invokeMethod(MethodExecutor.java:30) [fitnesse-20130530.jar]
        at fitnesse.slim.MethodExecutor.findAndInvoke(MethodExecutor.java:52) [fitnesse-20130530.jar]
        at fitnesse.slim.FixtureMethodExecutor.execute(FixtureMethodExecutor.java:20) [fitnesse-20130530.jar]
        at fitnesse.slim.StatementExecutor.getMethodExecutionResult(StatementExecutor.java:120) [fitnesse-20130530.jar]
        at fitnesse.slim.StatementExecutor.call(StatementExecutor.java:98) [fitnesse-20130530.jar]
        at fitnesse.slim.instructions.CallInstruction.executeInternal(CallInstruction.java:35) [fitnesse-20130530.jar]
        at fitnesse.slim.instructions.Instruction.execute(Instruction.java:30) [fitnesse-20130530.jar]
        at fitnesse.slim.ListExecutor$Executive.executeStatement(ListExecutor.java:50) [fitnesse-20130530.jar]
        at fitnesse.slim.ListExecutor$Executive.executeStatements(ListExecutor.java:44) [fitnesse-20130530.jar]
        at fitnesse.slim.ListExecutor.execute(ListExecutor.java:84) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.executeInstructions(SlimServer.java:107) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.processTheInstructions(SlimServer.java:94) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.processOneSetOfInstructions(SlimServer.java:68) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.tryProcessInstructions(SlimServer.java:54) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimServer.serve(SlimServer.java:40) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimService.accept(SlimService.java:112) [fitnesse-20130530.jar]
        at fitnesse.slim.SlimService$1.run(SlimService.java:50) [fitnesse-20130530.jar]</pre></td></tr>

Original issue reported on code.google.com by stewart@javahelp.co.uk on 10 Jul 2014 at 10:24

GoogleCodeExporter commented 8 years ago
Fix committed to /trunk at r442.

Log of exceptions from FitNesse to Maven console is controllable with param 
'fitnesse.maxErrorsToConsole'

1.5.0-SNAPSHOT deployed to snapshot repo.

Original comment by stewart@javahelp.co.uk on 25 Jul 2014 at 4:52