JBehave
  1. JBehave
  2. JBEHAVE-810

use steps from multiple step definition class for a single story

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 3.6.8
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      I like to organize my steps in multiple class files. (because we have many steps in our application)

      Question is: how can we use the steps from multiple step definition classes to execute a single story.

      I use webdriver, I tried the following:

      BaseClass.java
      Instantiates the driver and opens the browser.

      LoginSteps.java inherit from BaseClass.java
      steps to login in application

      SearchSteps.java inherit from BaseClass.java
      Verify is elements is present.
      BUT here is my driver instance suddenly null.

      I think it has something to do with the way I execute my tests:
      @Override
      public InjectableStepsFactory stepsFactory()

      { return new InstanceStepsFactory(configuration(), new LoginSteps(), new searchPageSteps()); }

      Please tell what other information you need or what I have to do differently.
      Thanks

        Activity

        Hide
        Mauro Talevi added a comment -

        This is not a bug but a request for information.

        As such, the mailing lists should be used: http://jbehave.org/mailing-lists.html

        You can also base your setup on one of the tutorials or archetypes:

        http://jbehave.org/tutorials.html
        http://jbehave.org/reference/web/stable/archetypes.html

        Show
        Mauro Talevi added a comment - This is not a bug but a request for information. As such, the mailing lists should be used: http://jbehave.org/mailing-lists.html You can also base your setup on one of the tutorials or archetypes: http://jbehave.org/tutorials.html http://jbehave.org/reference/web/stable/archetypes.html
        Mauro Talevi made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.6.8 [ 18557 ]
        Resolution Not A Bug [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            roy de kleijn
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: