Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-57669

Behat doesn't fail if step is undefined

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Modify any feature file, so that step becomes undefined.
      2. Run feature and ensure exit code is not 0. (echo $?)
      3. On 31 run mod/quiz/tests/behat/editing_section_headings.feature and ensure there is no undefined step and behat pass.
      Show
      Modify any feature file, so that step becomes undefined. Run feature and ensure exit code is not 0. (echo $?) On 31 run mod/quiz/tests/behat/editing_section_headings.feature and ensure there is no undefined step and behat pass.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      wip-mdl-57669-m

      Description

      In MOODLE_31 mod/quiz/tests/behat/editing_section_headings.feature, And I choose "a new section heading" in the open action menu is not defined and behat has been passing.

      To get exit code other than 0 for undefined steps, we need to pass --strict option, but then it will fail if we have skipped tests, which is not expected.

      Best way is to find if step is undefined afterstep is executed and throw exception.

        Attachments

          Activity

            People

            Assignee:
            rajeshtaneja Rajesh Taneja
            Reporter:
            rajeshtaneja Rajesh Taneja
            Peer reviewer:
            Ankit Agarwal
            Integrator:
            Dan Poltawski
            Tester:
            Jun Pataleta
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Mar/17