Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      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 ]
        Hide
        Szczepan Faber added a comment -

        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.

        Show
        Szczepan Faber added a comment - 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.
        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 ]
        Hide
        Mauro Talevi added a comment -

        Provided AnnotatedPathRunner as an extension of AnnotatedEmbedderRunner which creates a JUnit suite containing each story path and resolving the path to a human readable form that plays nicely with any IDE that provides JUnit integration.

        Show
        Mauro Talevi added a comment - Provided AnnotatedPathRunner as an extension of AnnotatedEmbedderRunner which creates a JUnit suite containing each story path and resolving the path to a human readable form that plays nicely with any IDE that provides JUnit integration.
        Mauro Talevi made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Olmo Rigolo added a comment -

        Hi Mauro,

        could you please provide a better example how to integrate the AnnotatedEmbedderRunner?
        The example only contains two classes and not its usage.

        Thank you in advance.

        Show
        Olmo Rigolo added a comment - Hi Mauro, could you please provide a better example how to integrate the AnnotatedEmbedderRunner? The example only contains two classes and not its usage. Thank you in advance.

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Jonathan Ross
          • Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: