如何执行黄瓜特征文件并行 [英] How to execute cucumber feature file parallel

查看:381
本文介绍了如何执行黄瓜特征文件并行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在src / test / resources / feature /中有以下功能文件(独立功能文件),我想并行运行它们。 Like:一个特征文件必须在chrome中执行,另一个特征文件必须在firefox中执行,如@Tags name。

I have below feature files (Separate feature files) in src/test/resources/feature/ and I would like to run them in parallel. Like: One feature file has to execute in chrome and another one has to execute in firefox as mentioned @Tags name.

Feature: Refund item

@chrome
  Scenario: Jeff returns a faulty microwave
    Given Jeff has bought a microwave for $100
    And he has a receipt
    When he returns the microwave
    Then Jeff should be refunded $100

Feature: Refund Money

@firefox
  Scenario: Jeff returns the money
    Given Jeff has bought a microwave for $100
    And he has a receipt
    When he returns the microwave
    Then Jeff should be refunded $100

有人可以帮助我实现这个。我使用cucumber-java 1.2.2版本,和AbstractTestNGCucumberTests使用作为转轮。此外,让我知道如何通过使用功能文件动态创建测试运行器并使它们并行运行。

Can somebody assist me to achieve this.I'm using cucumber-java 1.2.2 version, and AbstractTestNGCucumberTests using as runner. Also, let me know how can I create a Test Runner dynamically by using feature files and make them run in parallel.

推荐答案

不支持并行执行开箱。
我试过了,但它不友好。

Cucumber does not support parallel execution out of the box. I've tried, but it is not friendly.


  1. 我们必须使用maven的能力来并行调用它。请参阅链接

  2. 还有一个github项目,它使用自定义插件来并行执行。
    请参阅 cucumber-jvm-parallel-plugin

  1. We have to use maven's capability to invoke it in parallel. Refer link
  2. Also there is a github project which uses custom plugin to execute in parallel. Refer cucumber-jvm-parallel-plugin

这篇关于如何执行黄瓜特征文件并行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆