如何在Junit的BDD黄瓜中进行平行执行

发布于 2025-01-26 07:40:23 字数 44 浏览 5 评论 0 原文

我有可能使用Junit在BDD Cucumber框架中进行并行执行的可能性

I there any possibilities to do parallel execution in BDD cucumber framework using JUnit

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可可 2025-02-02 07:40:23

如果使用Junit 5的Cucumber,则可以添加 cucumber.execution.parallel.enabled = true junit-platform.properties file。

有关线程数的更多控制,您可以使用一些额外的选项

cucumber.execution.parallel.enabled=                          # true or false.
                                                              # default: false

cucumber.execution.parallel.config.strategy=                  # dynamic, fixed or custom.
                                                              # default: dynamic

cucumber.execution.parallel.config.fixed.parallelism=         # positive integer.
                                                              # example: 4

cucumber.execution.parallel.config.dynamic.factor=            # positive double.
                                                              # default: 1.0

如果您没有Junit 5的Cucumber的工作例子Noreferrer“> Cucumber-Java-Skeleton 。

If you are using cucumber with JUnit 5, you can add cucumber.execution.parallel.enabled=true to the junit-platform.properties file.

For more control on the number of threads you can use some extra options from the documentation:

cucumber.execution.parallel.enabled=                          # true or false.
                                                              # default: false

cucumber.execution.parallel.config.strategy=                  # dynamic, fixed or custom.
                                                              # default: dynamic

cucumber.execution.parallel.config.fixed.parallelism=         # positive integer.
                                                              # example: 4

cucumber.execution.parallel.config.dynamic.factor=            # positive double.
                                                              # default: 1.0

If you don't have a working example of Cucumber with JUnit 5 start with the cucumber-java-skeleton.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文