我正在尝试为 behat 测试设置一个 ant 构建脚本,以便我可以从 jenkins 运行它们。当我使用 bin/behat 或 ./bin/behat 从命令行运行 behat 时,输出按预期工作。但是当我使用以下 ant 脚本时
<project name="behat" basedir=".">
<exec dir="bin" executable="./behat">
</exec>
</project>
我收到此错误:
Buildfile: <mydir>/build.xml
[exec]
[exec]
[exec]
[exec] [RuntimeException]
[exec] Context class not found.
[exec] Maybe you have provided wrong or no `bootstrap` path in your behat.yml:
[exec] http://docs.behat.org/guides/7.config.html#paths
[exec]
[exec]
[exec]
[exec] behat [--init] [-f|--format="..."] [--out="..."] [--lang="..."] [--[no-]ansi] [--[no-]time] [--[no-]paths] [--[no-]snippets] [--[no-]snippets-paths] [--[no-]multiline] [--[no-]expand] [--story-syntax] [-d|--definitions="..."] [--name="..."] [--tags="..."] [--cache="..."] [--strict] [--dry-run] [--rerun="..."] [--append-snippets] [--append-to="..."] [features]
[exec]
[exec]
[exec] Result: 1
BUILD SUCCESSFUL
Total time: 0 seconds