porscheinformatik / cucumber-report-db

Stores results of BDD tests with Cucumber-JVM in a database and provides reporting capabilities
18 stars 21 forks source link

If an Exception is thrown during a @before hook, in the report, the scenario is displayed as "passed" #34

Closed jaubuchon closed 9 years ago

jaubuchon commented 9 years ago

If an Exception is thrown during a @before hook, in the report, the scenario is displayed as "passed".

feature-view

But when I'm looking at the console, the scenario is marked as failed. console-view

Also, if all the scenarios inside the feature are having the same problem, the feature status is marked as "Ok" and the time spent is marked as "Nan:Nan:Nan".

report-view

klausbayrhammer commented 9 years ago

Thanks for reporting the issue - I'll take a at it this weekend.

klausbayrhammer commented 9 years ago

The fix is deployed on Heroku and released in 1.1.0.RC21

jaubuchon commented 9 years ago

Just tested and it's working perfectly!

Thank you klausbayrhammer!

klausbayrhammer commented 9 years ago

Glad to hear! I'm not 100% satisfied with the solution because the errormessage/stacktrace is not shown in the report but I'm not quite sure where to intercept the @before exceptions. I'll put some thoughts - maybe there's an elegant solution.

jaubuchon commented 9 years ago

On my side, I attach a log file to each scenario in order to make them available inside the report. But I had a problem with the exceptions thrown during a scenario, I didn't know how to append them in log4j. I ask the question on the cukes group and someone propose me a solution that I will implement soon:

https://groups.google.com/forum/#!topic/cukes/briGKl5ZEcg