Can behat check that steps are defined before trying to run anything?

巧了我就是萌 提交于 2019-12-11 13:17:10

问题


I've got a behat scenario that takes a long time to run. If I've written a step incorrectly, I have to wait for the test to hit that step before I find out my mistake when it tells me I've got an undefined step.

Is there a way to get behat to check that all the steps it's going to try and run are defined, before it tries to run anything?


回答1:


Use dry run option to prevent step execution:

bin/behat --dry-run

In the long run, you should rather fix your tests and make them quicker. For example, only execute end-to-end tests for small number of smoke tests (critical paths), and run most of your acceptance tests against your business objects.



来源:https://stackoverflow.com/questions/29032687/can-behat-check-that-steps-are-defined-before-trying-to-run-anything

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!