Details
Description
As a developer using jBehave running in JUnit in Eclipse, I would like to easily determine
1. how many individual scenarios have passed or failed, and
2. which steps failures occur in
What springs to mind, is to wire each scenario up as separate JUnit TestCase (rather than the single 'testScenario()' method). Doing so, I would easily be able to drill down to the individually failing scenarios more easily. Regarding finding out which step failed, short of writing a fully-fledged plug-in, this would be a simple matter of retaining the actual failure exception and setting this in JUnit's test result - the failed step should be in the stack trace reported by JUnit.
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 3.0 [ 16302 ] |
Mauro Talevi
made changes -
Fix Version/s | 3.1 [ 16511 ] | |
Fix Version/s | 3.0 [ 16302 ] |
Mauro Talevi
made changes -
Component/s | Core [ 11086 ] |
Mauro Talevi
made changes -
Fix Version/s | 3.2 [ 16757 ] | |
Fix Version/s | 3.1 [ 16511 ] |
Mauro Talevi
made changes -
Assignee | Mauro Talevi [ maurotalevi ] |
Mauro Talevi
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Mauro Talevi
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Since I wrote several different JUnit runners (and it is very painful experience unfortunately...) I can tell you that you have 2 options:
1. Write your own plugin. Most robust but requires lots of work and it will bind you to specific IDE. This way you can fully control how the feedback from scenarios execution is provided. You can even provide a way of running a text scenario without creating a corresponding Scenario class.
2. Write jUnit runner. This way you can control how 'TestCases' are created and you can create a TestCase per scenario, then a test method per step. This way all IDEs will show very nicely which scenario failed, which step failed, etc.