问题
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