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

Behat doesn't fail if step is undefined

XMLWordPrintable

    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • wip-mdl-57669-m
    • 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.

      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.

            rajeshtaneja Rajesh Taneja
            rajeshtaneja Rajesh Taneja
            Ankit Agarwal Ankit Agarwal
            Dan Poltawski Dan Poltawski
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.