我跑完后
php admin/tool/behat/cli/util.php --enable
我看到了这条消息:
Acceptance tests environment enabled on http://127.0.0.1, to run the test use:
vendor/bin/behat --config /var/www/education/moodle/admin/tool/behat/cli/tests/behat/behat/behat.yml
然后我运行我的behat功能文件:
vendor/bin/behat --config /var/www/education/moodle/admin/tool/behat/cli/tests/behat/behat/behat.yml local/intelliboard/tests/behat/student_dashboard.feature
给我的信息:
Behat only can run if test mode is enabled. More info in http://docs.moodle.org/dev/Acceptance_testing#Running_tests
我读了很多文档,没有任何信息可以解决我的问题,因为我做了util.php --enable甚至检查了一个behat.yml并找到了我的student_dashboard.feature测试和上下文变量并且与之相关带有测试步骤的.php文件名。
我甚至安装了NodeJS Gherkin验证器并检查我的功能是否有错误 - 它是干净的。
答案 0 :(得分:0)
确保您拥有这两个配置条目,behat_dataroot_parent
必须添加到配置文件中并设置为与behat_root
相同的值
$CFG->behat_dataroot_parent = '/var/www/bht_moodledata/';
$CFG->behat_dataroot = '/var/www/bht_moodledata';