JBehave
  1. JBehave
  2. JBEHAVE-276

Clarify the Scenario Reporters example and API

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.5.2
    • Component/s: Documentation
    • Labels:
      None
    • Environment:
      Maven and Selenium
    • Number of attachments :
      0

      Description

      The example for configuration of 'Scenario Reporters' on http://jbehave.org/reference/stable/reports.html is not clear. The code appear to be outdated and I am not able to use it.

      One other point: Is it really necessary use 9 different classes just to save my reports to a TXT file ? It's a common task and it will help a lot if it was more simple.

      (The classes on examples are: ScenarioNameResolver, UnderscoredCamelCaseResolver, PropertyBasedConfiguration, ScenarioDefiner, ClasspathScenarioDefiner, PatternScenarioParser, ScenarioReporter, ScenarioReporterBuilder, FilePrintStreamFactory)

      I really want to use JBehave, but the Factory/Definer/Builder hell is really boring.

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Summary Clearify the Scenario Reporters example and API Clarify the Scenario Reporters example and API
        Mauro Talevi made changes -
        Fix Version/s 2.5.2 [ 16238 ]
        Mauro Talevi made changes -
        Assignee Mauro Talevi [ maurotalevi ]
        Affects Version/s 2.5.1 [ 16283 ]
        Affects Version/s 2.5.2 [ 16238 ]
        Hide
        Mauro Talevi added a comment -

        Hi Ricardo,

        the reports page has been updated to reflect the example code (and a link to the example code has been added for good measure).

        On the point of the number of classes, there is a balance to be struck between configurability and ease of use. JBehave uses a default-oriented approach, in that all component are configurable but have a default. The problem in your case is that file-reporting is not the default (writing to System.out is).

        But as emphasised in the documentation, and shown in the example code, this configuration only needs to be done in one place, i.e. the parent Scenario.

        Show
        Mauro Talevi added a comment - Hi Ricardo, the reports page has been updated to reflect the example code (and a link to the example code has been added for good measure). On the point of the number of classes, there is a balance to be struck between configurability and ease of use. JBehave uses a default-oriented approach, in that all component are configurable but have a default. The problem in your case is that file-reporting is not the default (writing to System.out is). But as emphasised in the documentation, and shown in the example code, this configuration only needs to be done in one place, i.e. the parent Scenario.
        Hide
        Ricardo S.A. Silva added a comment -

        Thank you Mauri for your attention. It helps me a lot.

        Show
        Ricardo S.A. Silva added a comment - Thank you Mauri for your attention. It helps me a lot.
        Ricardo S.A. Silva made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Ricardo S.A. Silva
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: