I am trying to run a behat test feature that comes with moodle.
- behat configuration set in config.php
require_once dirname(__FILE__) . '/moodle-browser-config/init.php';
$CFG->wwwroot = 'http://localhost/moodle404';
$CFG->dataroot = '/var/moodledata';
$CFG->behat_wwwroot = 'http://127.0.0.1/moodle404';
$CFG->behat_dataroot = '/var/moodledata_behat';
$CFG->behat_prefix = 'behat_';
- php admin/tool/behat/cli/init.php executed sucessfully.
- Selenium is running with the correct version of chromedriver
- When I try to run this single feature (below) I receive the message "Behat only can modify the test database and the test dataroot!":
vendor/bin/behat --config /var/moodledata_behat/behatrun/behat/behat.yml `pwd`/mod/forum/tests/behat/private_replies.feature
Debugging I found that BEHAT_SITE_RUNNING is not defined in behat_hooks.php, method before_suite_final_checks().
So my question is, what I need to do to enable BEHAT_SITE_RUNNING, the correct way.
Note: $CFG->wwwroot and $CFG->behat_wwwroot are both accessible, and even behat website shows me the title "Acceptance test site".