JBehave

Improve terminology, the distinction between a story and a scenario

Details

  • Number of attachments :
    0

Description

I think it's unfortunate that a scenario file contains several other scenarios. This leads to some ambiguities in the system, such as the meaning of a GivenScenario, and also in communication (is a scenario a collection or a scenario?).

It also is somewhat a violation of the literal meaning of scenario - which by definition contains other stories or scenes, not scenarios.

I think while the framework is still relatively young it would be worth addressing this design choice. Perhaps a scenario should contain stories, or something like that.

The main concern is removing the ambiguity about what a scenario is.

Activity

Hide
Mauro Talevi added a comment -

A story is made of multiple scenarios, not the other way around. A scenario may depend on other scenarios as a precondition, hence the GivenScenarios keyword.

That said, yours is a fair issue being raised as in JBehave 2.x the scenario is the central element, while upon retrospective placing it at story level might serve the purpose better. Most like this cannot be done without breaking backward compat, so we'll address it as part of 3.x.

We still need to ensure that the the ability to execute a single scenario, i.e. a sequence of steps, without lots of unnecessary scaffolding around it, is satisfied.

Show
Mauro Talevi added a comment - A story is made of multiple scenarios, not the other way around. A scenario may depend on other scenarios as a precondition, hence the GivenScenarios keyword. That said, yours is a fair issue being raised as in JBehave 2.x the scenario is the central element, while upon retrospective placing it at story level might serve the purpose better. Most like this cannot be done without breaking backward compat, so we'll address it as part of 3.x. We still need to ensure that the the ability to execute a single scenario, i.e. a sequence of steps, without lots of unnecessary scaffolding around it, is satisfied.
Hide
Mauro Talevi added a comment -

Terminology in the Java classes in 3.x has been completely overhauled, shifting from Scenario to Story to reflect what was de facto already the case in 2.x.

So e.g.

RunnableScenario -> RunnableStory
JUnitScenario -> JUnitStory
ScenarioRunner -> StoryRunner
... the list continues.

The root package of the core module has also changed from org.jbehave.scenario to org.jbehave.core.

Note that from a textual story point of view, almost nothing has changed, and textual input will be backward compatible, with the minor exception of the keyword GivenScenarios -> GivenStories.

Details on how to ensure a smooth migration path on:

http://jbehave.org/reference/latest/migrating-from-2.x.html

Show
Mauro Talevi added a comment - Terminology in the Java classes in 3.x has been completely overhauled, shifting from Scenario to Story to reflect what was de facto already the case in 2.x. So e.g. RunnableScenario -> RunnableStory JUnitScenario -> JUnitStory ScenarioRunner -> StoryRunner ... the list continues. The root package of the core module has also changed from org.jbehave.scenario to org.jbehave.core. Note that from a textual story point of view, almost nothing has changed, and textual input will be backward compatible, with the minor exception of the keyword GivenScenarios -> GivenStories. Details on how to ensure a smooth migration path on: http://jbehave.org/reference/latest/migrating-from-2.x.html

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: