Cucumber how to find if a feature file has executed? Any Java method?

淺唱寂寞╮ 提交于 2019-12-02 02:46:22

Cucumber scenarios should not be dependent on each other.

According to the Cucumber best practices, there shouldn’t be any sort of coupling between scenarios. Or in other words, there should be no state that persists between scenarios.

Just as an example why this is a bad practice consider a case when one scenario step adds a record to a database, while the subsequent scenarios depend on the existence of that record. This may work, but will create a problem if the order in which scenarios run changes, or they are run in parallel.

Try to review your approach and see how can you define your scenarios differently to avoid coupling. Good luck.

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