JBehave
  1. JBehave
  2. JBEHAVE-433

Screenshot should be taken on every example failure if a scenario has an example table

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: web-3.6
    • Component/s: Web Selenium
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Assume a scenario has a example table with 4 examples
      Lets say the scenario fails for 2nd and 3rd example set.

      The screenshot is taken only after the execution for the last example set. (And in the above case its of no use as the scenario passed with the last example set).

      the screenshot should be taken everytime the scenario failes with a particular example set.

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Fix Version/s web-3.x [ 17273 ]
        Hide
        Jackie Noi added a comment -

        This issue still exists. We are using JBehave 3.7.5.

        Show
        Jackie Noi added a comment - This issue still exists. We are using JBehave 3.7.5.
        Hide
        Mauro Talevi added a comment -

        Can you provide an sample project reproducing this issue?

        Show
        Mauro Talevi added a comment - Can you provide an sample project reproducing this issue?
        Hide
        Jackie Noi added a comment - - edited

        The below story file a sample story file that will reproduce this issue

        Scenario: Login
        Given I am in gmailLoginPage
        When I login to gmail with <username> and <password>
        Then I should be logged in
        Examples:

        username password
        xxxx yyyy
        Jack kkkk

        In the above story file, there are two example sets.

        Lets assume that the first example set consists of the wrong credentials and the second one consists of the correct credentials. While running the above scenario, the first scenario would fail, but the screen shot will not be taken since the last(second) example set will pass.

        I am expecting screen shot to be taken for each example set if it gets failed.

        Show
        Jackie Noi added a comment - - edited The below story file a sample story file that will reproduce this issue Scenario: Login Given I am in gmailLoginPage When I login to gmail with <username> and <password> Then I should be logged in Examples: username password xxxx yyyy Jack kkkk In the above story file, there are two example sets. Lets assume that the first example set consists of the wrong credentials and the second one consists of the correct credentials. While running the above scenario, the first scenario would fail, but the screen shot will not be taken since the last(second) example set will pass. I am expecting screen shot to be taken for each example set if it gets failed.
        Hide
        Elena Kudryashova added a comment -
        Show
        Elena Kudryashova added a comment - I had such issue and fixed it in cloned repo by following commit https://github.com/Tigrenka/jbehave-web/commit/3ad13eeb4997976ba017fdeb98fc3c2cc59c6b91#diff-0f9b78b63ba51c0d2973e6254482b865
        Mauro Talevi made changes -
        Fix Version/s web-3.6 [ 18388 ]
        Fix Version/s web-3.x [ 17273 ]
        Component/s Web Selenium [ 14124 ]
        Component/s Core [ 11086 ]
        Component/s Web Runner [ 14122 ]
        Hide
        Brent Barker added a comment -

        Elena,
        Your fix worked for me. Thank you for posting it.

        Show
        Brent Barker added a comment - Elena, Your fix worked for me. Thank you for posting it.

          People

          • Assignee:
            Unassigned
            Reporter:
            kk sure
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: