黄瓜测试场景并行运行? [英] Cucumber test scenarios running in parallel?

查看:377
本文介绍了黄瓜测试场景并行运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的项目中的几个测试功能,到目前为止,我运行他们并行使用线程计数的转轮类。但这里的问题是优化执行时间,因为这些线程需要更长的时间完成测试场景

I've couple test features in my project and so far i'm running them in parallel using runner classes with thread count.. but the problem here is optimising execution time because on of these threads taking longer time to finish test scenarios

有没有更好的方法来并行执行测试场景

Is there any better approach to execute test scenarios in parallel??

任何帮助..非常感谢! !

Any help.. much appreciated!!

推荐答案

尝试使用 QAF gherkin 它运行场景并行而不是功能。你需要使用框架提供的工厂类,并使用testNG xml配置你的执行。下面是示例配置文件:

Try using QAF gherkin it runs scenario in parallel rather than feature. you need to use factory class provided by the framework and configure your execution using testNG xml. Below is the sample config file:

<test name="Gherkin-QAF-Test" parallel="methods">
   <parameter name="step.provider.pkg" value="com.qmetry.qaf.automation.impl.step.qaf" />
   <parameter name="scenario.file.loc" value="resources/features" />
   <classes>
      <class name="com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory" />
   </classes>
</test>


$ b

Above configuration will run scenarios available in feature files under resources/features in parallel.

这篇关于黄瓜测试场景并行运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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