JBehave
  1. JBehave
  2. JBEHAVE-788

Parsing recursive composite steps fail if the composite steps don't use any parameters

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.4
    • Fix Version/s: 3.6.8, 3.7
    • Component/s: Core
    • Labels:
      None
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      Problem Statement:
      When I have a composite step that takes parameters for some of the steps but not others, then the StepCreator doesn't take that into account, and the Matcher throws and IllegalState exception because it has no groups.

      Steps to Reproduce:
      See attached TestCase

      Recommended Change:
      Only two changes in the StepCreator class, matchedParameters method.
      Move the Hashmap creation to the beginning of the method, and put an if statement around the stepMatcher.find() statement. See altered method also attached.

      1. CorrectedMethod.txt
        1 kB
        David Tanner
      2. JBehave Test Case.txt
        2 kB
        David Tanner

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Assignee Mauro Talevi [ maurotalevi ]
        Fix Version/s 3.6.8 [ 18557 ]
        Hide
        Mauro Talevi added a comment -

        Applied patch with thanks.

        Show
        Mauro Talevi added a comment - Applied patch with thanks.
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mauro Talevi made changes -
        Fix Version/s 3.7 [ 18390 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            David Tanner
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: