ciaranmcnulty / behat-stepthroughextension
behat的扩展,用于帮助调试失败的场景
1.0.2
2016-10-15 09:48 UTC
Requires
- behat/behat: ~3.0
Requires (Dev)
- phpspec/phpspec: dev-master
- symfony/filesystem: ~2.3
- symfony/process: ~2.3
This package is auto-updated.
Last update: 2024-08-24 03:23:12 UTC
README
Behat-StepThroughExtension 通过在步骤之间暂停执行来帮助您调试 Behat 场景。
这允许您观察数据库状态、查看浏览器自动化套件中打开的页面、检查磁盘上创建的文件等,同时仍然能够恢复场景执行并运行任何场景后的清理钩子。
用法
当调试特定场景时,在命令行中使用 --step-through
标志
bin/behat --step-through features/my-failing-feature
在每个步骤之后,您将看到消息 [在 "<步骤文本>" 之后暂停 - 按回车键继续]
。Behat 测试套件将保持这种暂停状态,直到收到回车键,以便您进行必要的检查。
注意:在背景步骤的每个步骤之后也会暂停执行,但具体取决于所使用的格式化程序,可能没有其他指示表明已经运行了背景步骤。
安装
通过将其添加到您的 composer.json
中进行安装
{ "require-dev": { "ciaranmcnulty/behat-stepthroughextension" : "dev-master" } }
配置
没有配置参数,只需在 behat.yml
中启用扩展即可
default: extensions: Cjm\Behat\StepThroughExtension: ~