且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在黄瓜junit中动态传递黄瓜选项?

更新时间:2022-06-12 00:03:07

这个问题现在已经很老了,但答案是肯定的.

This question is quite old now, but the answer is yes you can.

例如,如果您使用的是 maven,只需像这样添加它.

If you are using maven for example just add it like this.

mvn test -Dcucumber.options="--tags @your_tag"

您可以在运行时过滤您的场景.

You can filter yous scenarios that way when running them.

希望这会有所帮助.