JBehave
  1. JBehave
  2. JBEHAVE-1035

@BeforeStory steps not performed before GivenStories

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: Core
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      There seems to be a bug in 4.0-beta-8 concerning the usage of GivenStories.

      If I have a story which uses "GivenStories" then I get this exception:

      org.jbehave.web.selenium.DelegatingWebDriverProvider$DelegateWebDriverNotFound: WebDriver has not been found for this thread.
      Please verify you are using the correct WebDriverProvider, with the appropriate credentials if using remote access, e.g. to SauceLabs: -DSAUCE_USERNAME=xxxxxx -DSAUCE_ACCESS_KEY=xxx-xxxx-xxxx-xxxx-xxx 
      	at org.jbehave.web.selenium.DelegatingWebDriverProvider.get(DelegatingWebDriverProvider.java:24)
      	at example.pages.PageObject.getDriver(PageObject.java:30)
      	at example.pages.LoginPage.isLoggedIn(LoginPage.java:15)
      	at example.steps.LoginSteps.userLoggedIn(LoginSteps.java:15)
      

      If I use JBehave 3.9.3 then it works as expected.

      You can reproduce it with this example: https://github.com/OttoDiesel/jbehave-selenium-example.git

      In class "example/SeleniumStories.java" change story filter to:
      String includes = System.getProperty("story.filter", "**/Stammdaten-Mutation.story");

      It would be nice if you could fix it this week since this is the example for the second part of the paper on JBehave.

        Activity

        Hide
        Mauro Talevi added a comment -

        Does it happen only with GivenStories?

        Show
        Mauro Talevi added a comment - Does it happen only with GivenStories?
        Hide
        Mauro Talevi added a comment -

        Please pull latest 4.x and try out snapshot.

        Show
        Mauro Talevi added a comment - Please pull latest 4.x and try out snapshot.
        Hide
        Otto Diesel added a comment -

        It seems to happen only with GivenStories since I use a lot of other JBehave features in the example stories.

        It works with the latest snapshot from today, thank you!

        Could you please release a new beta version until the 5th of August since then the new edition of the Javamagazin will be published with the examples?

        By the way, first I tried to download the snapshot, but as it seems I have to build it. There is a snapshot at this place, but an old one: https://nexus.codehaus.org/content/groups/public/org/jbehave/jbehave-core/4.0-SNAPSHOT/

        Do you deploy snapshots? It could be easier to use snapshots if they don't have to be build by each JBehave user (just an idea, don't know how practical it would be overall).

        Show
        Otto Diesel added a comment - It seems to happen only with GivenStories since I use a lot of other JBehave features in the example stories. It works with the latest snapshot from today, thank you! Could you please release a new beta version until the 5th of August since then the new edition of the Javamagazin will be published with the examples? By the way, first I tried to download the snapshot, but as it seems I have to build it. There is a snapshot at this place, but an old one: https://nexus.codehaus.org/content/groups/public/org/jbehave/jbehave-core/4.0-SNAPSHOT/ Do you deploy snapshots? It could be easier to use snapshots if they don't have to be build by each JBehave user (just an idea, don't know how practical it would be overall).
        Mauro Talevi made changes -
        Field Original Value New Value
        Affects Version/s web-3.5.5 [ 18692 ]
        Affects Version/s 4.x [ 18279 ]
        Fix Version/s 4.x [ 18279 ]
        Fix Version/s 4.0 [ 18486 ]
        Summary DelegateWebDriverNotFound: WebDriver has not been found for this thread. @BeforeStory steps not performed before GivenStories
        Hide
        Mauro Talevi added a comment -

        4.0-beta-9 has been released.

        4.0-SNAPSHOT has also been deployed. The deployment is not automatic as yet because we need to find a way of securing the credentials on the CI server.

        Show
        Mauro Talevi added a comment - 4.0-beta-9 has been released. 4.0-SNAPSHOT has also been deployed. The deployment is not automatic as yet because we need to find a way of securing the credentials on the CI server.
        Mauro Talevi made changes -
        Resolution Fixed [ 1 ]
        Assignee Mauro Talevi [ maurotalevi ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Otto Diesel added a comment -

        Thank you!

        Show
        Otto Diesel added a comment - Thank you!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: