如何使用 Cucumber 重新运行失败的场景? [英] How to rerun the failed scenarios using Cucumber?
本文介绍了如何使用 Cucumber 重新运行失败的场景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Cucumber 进行测试.如何仅重新运行失败的测试?
I'm using Cucumber for my tests. How do I rerun only the failed tests?
推荐答案
用 rerun formatter 运行 Cucumber:
Run Cucumber with rerun formatter:
cucumber -f rerun --out rerun.txt
它将所有失败场景的位置输出到这个文件.
It will output locations of all failed scenarios to this file.
然后您可以使用重新运行它们
Then you can rerun them by using
cucumber @rerun.txt
这篇关于如何使用 Cucumber 重新运行失败的场景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文