JBehave
  1. JBehave
  2. JBEHAVE-156

Allow running of multiple textual stories using a single Java entry point

    Details

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

      Description

      In order to avoid the need to define a Java class for each textual story
      As a story runner
      I want to be able to run multiple textual stories from the same Java entry point, provided all stories use the same StoryConfiguration and the same CandidateSteps.

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Description As a scenario runner, I want to be able to run multiple textual scenarios from the same Java Scenario class, using a single Steps class instance that contains all my steps.

        We'd need to provide some way to configure which textual scenarios are to run.

        This would be useful as a start of a web or wiki-based scenario runner.

        As a scenario runner, I want to be able to run multiple textual scenarios from the same Java Scenario class, using a single Steps class instance that contains all my steps.

        The main refactor (backward-compatible) would be to add a method to ScenarioNameResolver

        List<String> resolveAll(Class<? extends Scenario> scenarioClass);

        which as a special case returns a single path. In the implementation we'd also need to provide some way to configure which textual scenarios are to run.

        This would be useful as a start of a web or wiki-based scenario runner.

        Mauro Talevi made changes -
        Affects Version/s 2.1 [ 14547 ]
        Affects Version/s 2.3 [ 14941 ]
        Mauro Talevi made changes -
        Affects Version/s 2.3 [ 14941 ]
        Fix Version/s 2.2 [ 14670 ]
        Affects Version/s 2.0 [ 14456 ]
        Mauro Talevi made changes -
        Fix Version/s 3.0 [ 16302 ]
        Issue Type Improvement [ 4 ] New Feature [ 2 ]
        Mauro Talevi made changes -
        Summary Allow resolution of multiple textual scenarios from a single Java scenario Allow running of multiple textual stories using a single Java RunnableStory
        Description As a scenario runner, I want to be able to run multiple textual scenarios from the same Java Scenario class, using a single Steps class instance that contains all my steps.

        The main refactor (backward-compatible) would be to add a method to ScenarioNameResolver

        List<String> resolveAll(Class<? extends Scenario> scenarioClass);

        which as a special case returns a single path. In the implementation we'd also need to provide some way to configure which textual scenarios are to run.

        This would be useful as a start of a web or wiki-based scenario runner.

        I want to be able to run multiple textual stories from the same Java RunnableStory, provided they use the same StoryConfiguration and the same CandidateSteps instances.

        This would avoid the need to define a Java RunnableStory class for each textual story.
        Mauro Talevi made changes -
        Comment [ Bumping out of 2.2 release until consensus is reached on how to approach problem. ]
        Mauro Talevi made changes -
        Comment [ This feature may or may not be relevant any more - e.g. the JBehave Web Runner by-passes the Scenario and uses the Configuration and Steps directly. Still useful to discuss if this one-to-one mapping for IDE integration - simple and effective - may not be overcome while still preserving the same simplicity and effectiveness for scenarios that use the same Steps instance.
         


        ]
        Mauro Talevi made changes -
        Assignee Mauro Talevi [ maurotalevi ]
        Mauro Talevi made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Mauro Talevi made changes -
        Summary Allow running of multiple textual stories using a single Java RunnableStory Allow running of multiple textual stories using a single Java entry point
        Affects Version/s 2.0 [ 14456 ]
        Description I want to be able to run multiple textual stories from the same Java RunnableStory, provided they use the same StoryConfiguration and the same CandidateSteps instances.

        This would avoid the need to define a Java RunnableStory class for each textual story.
        In order to avoid the need to define a Java class for each textual story
        As a story runner
        I want to be able to run multiple textual stories from the same Java entry point, provided all stories use the same StoryConfiguration and the same CandidateSteps.

        Hide
        Mauro Talevi added a comment -

        Now that StoryEmbedder is responsible for story running, we can have multiple entry points, including any IDE and framework-specific ones (JUnit, TestNG, Spring ...).

        Show
        Mauro Talevi added a comment - Now that StoryEmbedder is responsible for story running, we can have multiple entry points, including any IDE and framework-specific ones (JUnit, TestNG, Spring ...).
        Mauro Talevi made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Mauro Talevi
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: