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

Allow to analyse exceptions in behat

    • MOODLE_310_STABLE
    • MDL-70255-master
    • Hide
      1. Copy the attached testexceptions.feature file into any tests/behat/ directory in moodle
      2. Run behat with tag @testing
      3. Makes sure it fails in three scenarios out of four exactly in the lines 16, 30 and 42 (as specified in the comments in the test file)
      Show
      Copy the attached testexceptions.feature file into any tests/behat/ directory in moodle Run behat with tag @testing Makes sure it fails in three scenarios out of four exactly in the lines 16, 30 and 42 (as specified in the comments in the test file)

      Currently if an exception happens during Behat run, the scenario fails since the "I look for exceptions" step is automatically executed after each step.

      However sometimes I need to test situations when an exception must be thrown, usually to prevent security issues. These situations are not possible to test with unittests because the exceptions are often raised by the non-internal php scripts

            Unassigned Unassigned
            marina Marina Glancy
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m

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