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

Allow Behat feature directories to be specified outside the dirroot

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Initialise Behat (using admin/tool/behat/cli/init.php)

      Add to config.php:

      $CFG->behat_additionalfeatures = array('/example/path');
      

      In /example/path, add the file "test.feature" with the content:

      @mdl43087
      Feature: Don't use this
          Scenario: This actually works!
      

      Now run init.php again (to pick up the feature path)
      Now run the actual tests, specifying the @mdl43087 tag.
      It should find the test and run it!

      Show
      Initialise Behat (using admin/tool/behat/cli/init.php) Add to config.php: $CFG->behat_additionalfeatures = array('/example/path'); In /example/path, add the file "test.feature" with the content: @mdl43087 Feature: Don't use this Scenario: This actually works! Now run init.php again (to pick up the feature path) Now run the actual tests, specifying the @mdl43087 tag. It should find the test and run it!
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:

      Description

      Sometimes it is inconvenient, difficult or impossible to write and/or develop Behat tests in the dirroot.

      This patch adds a config variable allowing to specify additional feature directories.

        Attachments

          Activity

            People

            Assignee:
            sry_not4sale Aaron Barnes
            Reporter:
            sry_not4sale Aaron Barnes
            Peer reviewer:
            David Monllaó
            Integrator:
            Sam Hemelryk
            Tester:
            Rossiani Wijaya
            Participants:
            Component watchers:
            Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/May/14