Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.x
    • Component/s: Core
    • Labels:
    • Number of attachments :
      0

      Description

      In order to be more effective in communication and in scenario development
      As a non-technical scenario writer
      I want to compose steps using existing steps in text format like my stories

      At the moment composite steps have to be implemented in Java code with an empty body. They could be defined and used in text format like stories (maybe with the extension .step?). This would be also an alternative for GivenStories.

        Activity

        Hide
        Bart De Neuter added a comment -

        Maybe some more background information why I posted this feature request. We started using the Gherkin syntax for our stories in order to talk about features instead of stories. Gherkin is missing the givenStories feature and I was looking for an alternative for our customer to write the setup of their scenarios (description of transportation infrastructure: ex. Given a Route R between endpoint A and endpoint B ... And Route R has distance 1500m ...).
        With this feature he could write Given the infrastructure (followed by a more functional explanation and hide the low level setup of the infrastructure in a separate composite step file)

        Show
        Bart De Neuter added a comment - Maybe some more background information why I posted this feature request. We started using the Gherkin syntax for our stories in order to talk about features instead of stories. Gherkin is missing the givenStories feature and I was looking for an alternative for our customer to write the setup of their scenarios (description of transportation infrastructure: ex. Given a Route R between endpoint A and endpoint B ... And Route R has distance 1500m ...). With this feature he could write Given the infrastructure (followed by a more functional explanation and hide the low level setup of the infrastructure in a separate composite step file)
        Mauro Talevi made changes -
        Field Original Value New Value
        Fix Version/s 4.x [ 18279 ]
        Hide
        Mauro Talevi added a comment -

        Could you share some ideas on the possible syntaxes that could be used?

        Show
        Mauro Talevi added a comment - Could you share some ideas on the possible syntaxes that could be used?
        Hide
        Bart De Neuter added a comment -

        The syntax could be very similar as @Composite but in a <my_composite>.step file:

        Composite: Given %customer has previously bought a %product
        Alias: <customer> has previously bought a <product>

        Steps:
        Given <customer> is logged in
        Given <customer> has a cart
        When a <product> is added to the cart

        I suppose a special InjectableStepsFactory could locate these .step files, load them and process them similar as @Composite?

        Show
        Bart De Neuter added a comment - The syntax could be very similar as @Composite but in a <my_composite>.step file: Composite: Given %customer has previously bought a %product Alias: <customer> has previously bought a <product> Steps: Given <customer> is logged in Given <customer> has a cart When a <product> is added to the cart I suppose a special InjectableStepsFactory could locate these .step files, load them and process them similar as @Composite?
        Hide
        Mauro Talevi added a comment -

        We could have the composite step file in a textual format but it would still need to declared in a steps class, e.g.

        @Composite("<my_composite>.step")
        public void myComposite(){
        }
        

        The InjectableStepsFactory creates steps classes, which are then used to find annotated methods that match the textual steps.

        Would that work for you?

        Show
        Mauro Talevi added a comment - We could have the composite step file in a textual format but it would still need to declared in a steps class, e.g. @Composite( "<my_composite>.step" ) public void myComposite(){ } The InjectableStepsFactory creates steps classes, which are then used to find annotated methods that match the textual steps. Would that work for you?
        Hide
        Bart De Neuter added a comment -

        If you can declare multiple composite steps in the file, it would work for me. Otherwise a non-technical person still depends on a programmer to do a code change and add for every new composite step a class.
        Or maybe we can add a directory to the annotation? Jbehave can search in this directory for composite steps?

        Show
        Bart De Neuter added a comment - If you can declare multiple composite steps in the file, it would work for me. Otherwise a non-technical person still depends on a programmer to do a code change and add for every new composite step a class. Or maybe we can add a directory to the annotation? Jbehave can search in this directory for composite steps?

          People

          • Assignee:
            Unassigned
            Reporter:
            Bart De Neuter
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: