注意:“无法识别的选项" [英] Behat "Unrecognized options"

查看:558
本文介绍了注意:“无法识别的选项"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行Behat(对我来说是第一次),并且有效.

I'm trying to run Behat (first time for me) and it worked.

但是我有一个配置问题.我试图像这样更改功能和引导程序的路径:

But i have a configuration problem. I tried to change the paths of features and bootstrap like so:

#behat.yml
default:
    paths:
        features: app/tests/features
        bootstrap: %behat.paths.features%/bootstrap

现在我要例外:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] Unrecognized options "paths" under "testwork"

我做错了什么?

推荐答案

Behat 3现已发布.您可以如下配置路径:

Behat 3 is out by now. You configure paths as follows:

#behat.yml
default:
  autoload:
    '': %paths.base%/tests/features/bootstrap
  suites:
    default:
      paths:
        - %paths.base%/tests/features

autoload部分中给出的路径设置了Behat查找上下文类的路径. suites部分中的路径是功能定义(在本例中为default套件)所在的位置.

The path given in the autoload section sets the path where Behat looks for context classes. The paths in the suites section are where the feature definitions (of the default suite in this case) live in.

这篇关于注意:“无法识别的选项"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆