Details
-
Type: Improvement
-
Status: Resolved
-
Priority: 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 :
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 ] |
Ricardo S.A. Silva
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
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.