JBehave
  1. JBehave
  2. JBEHAVE-1043

GivenStories are not working for me in jbehave-web-selenium [3.6-beta-2]

    Details

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

      Description

      Hi

      I am new in Jbehave and trying to setup automation framework using Jbehave[3.9.3] and selenium[2.42.2]. I am using Ivy to execute the test. I could able to do that successfully.

      GivenStories are not working for me. I am sorry if this is not the right place to ask this question. After trying for couple days and looking into the comments that GivenStories works for everyone. Just sharing my example with experts if they help me out and point me what I am doing wrong.

      1.) Ivy.xml - Code
      <dependencies>
      <!-- TODO: The jbehave-web-selenium module uses an older selenium that doesn't support modern firefox.
      Trying to stay on the latest selenium. -->
      <!-- The beta below supports the new version of selenium. We'll see how buggy it is. -->
      <dependency org="org.jbehave.web" name="jbehave-web-selenium" rev="3.6-beta-2"/>
      <dependency org="org.jbehave" name="jbehave" rev="3.9.3"/>
      <dependency org="org.jbehave" name="jbehave-core" rev="3.9.3">
      <artifact name="jbehave-core" type="jar"/>
      </dependency>
      <dependency org="org.jbehave" name="jbehave-ant" rev="3.9.3"/>
      <dependency org="org.jbehave" name="jbehave-distribution" rev="3.9.3"/>
      <dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.42.2"/>
      <dependency org="org.seleniumhq.selenium" name="selenium-support" rev="2.42.2"/>
      </dependencies>

      2.) BaseTest.java is attached which extends JUnitStories

      3.) RunAsStories.java is attached which extends BaseTest.java ---- This the entry point for me to execute

      4.) Stories file are attached

      • Common.story (This will be executed before some of the scenarios)
      • Page1.story (This will use GivenStories to call Common.Story. This is present in a different package. I tried keeping them in same package.)
      • Page2.story(This will use GivenStories to call Common.Story for some of the scenarios)

      5.)What is happening here

      • It open the browser and execute steps in Common.Story. Then closes the browsers
      • It open another browser and try to execute Page1.Story and it do not execute Common.Story even path specified for GivenStories. It starts from and try to execute "first page of application appears"

      6.)Can someone please help in this and let me know if I need to updage any thing here.

        Activity

        Hide
        Mauro Talevi added a comment -

        Can you please provide a self-contained project reproducing the issue?

        http://jbehave.org/how-to-contribute.html

        Show
        Mauro Talevi added a comment - Can you please provide a self-contained project reproducing the issue? http://jbehave.org/how-to-contribute.html
        Amrish Jain made changes -
        Field Original Value New Value
        Attachment BaseTest.Java [ 66352 ]
        Amrish Jain made changes -
        Attachment Common.story [ 66353 ]
        Amrish Jain made changes -
        Attachment Page1.story [ 66354 ]
        Amrish Jain made changes -
        Attachment Page2.story [ 66355 ]
        Amrish Jain made changes -
        Attachment RunAsStories.java [ 66356 ]
        Hide
        Amrish Jain added a comment -

        Thanks I got it working. Please close this card. This is the problem at my end.

        Show
        Amrish Jain added a comment - Thanks I got it working. Please close this card. This is the problem at my end.
        Amrish Jain made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Amrish Jain
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: