cucumber-attic / cucumber-html

Cross platform HTML formatter for all implementations of Cucumber
Other
40 stars 49 forks source link

Missing stack trace within the HTML output for steps that are in error #12

Closed restagner closed 12 years ago

restagner commented 12 years ago

If the test run encounters an error, the resulting HTML file generated formats the step correctly (i.e., red color for failed step), however, I'm not seeing a stack trace of the error as I use to see in Cuke4Duke.

NOTE: I am seeing the error message, as it appears on the command-line, within the report.js file. It looks like

formatter.result({
  "duration": 13452758,
  "status": "failed",
  "error_message": "junit.framework.ComparisonFailure: expected:\u003c[Cookies]\u003e but was:\u003c[Google]\u003e\n\tat junit.framework.Assert.assertEquals(Assert.java:85)\n\tat junit.framework.Assert.assertEquals(Assert.java:91)\n\tat org.stag.hello.StepDefs.thePageTitleReturnedShouldBe(StepDefs.java:92)\n\tat ✽.Then the page title returned should be \"Cookies\"(cheese.feature:8)\n"
});

It would be helpful to embed the stack trace within the index.html file for each of the failed steps.

aslakhellesoy commented 12 years ago

Have you tried modifying formatter.js to do this?

restagner commented 12 years ago

I'm not sure where to begin. I'll speak with one of our developers about this and see what we can come up with.

restagner commented 12 years ago

It appears as though #6 has addressed this issue. So, I'm going to go ahead and close this issue.