空手道-并行执行失败 [英] Karate -- Parallel execution Failing

查看:95
本文介绍了空手道-并行执行失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我观察到,当我使用Runner.parallel(getClass(),1)在maven构建中运行测试(功能文件)时;它工作正常,但是当我增加诸如Runner.parallel(getClass(),5)之类的线程数量时;它开始失败,因为它正在并行执行功能文件中可用的所有方案. 方案相互依赖,而方案失败则是因为哪种方案需要先执行,最后执行是先执行.

I have observed that when I am running my tests (feature files) in maven build with Runner.parallel(getClass(), 1); it is working fine but when I am increasing number of thread like Runner.parallel(getClass(), 5); it start failing because it is executing all scenarios in parallel which is available in feature file. Scenarios are dependent on each other which are failing because which scenario need to execute in last executing in first.

请为我建议一些选项,这些选项可以并行运行所有功能文件,但不能并行运行功能文件中可用的方案.

Please suggest me some option which run all feature file in parallel but not run scenarios in parallel which available in feature file.

推荐答案

https://github.com /intuit/karate#parallelfalse

如果在无法并行播放场景的每个功能上使用@parallel=false,它将起作用.但是场景应该以任何顺序播放,而不是相互依赖.也许您不应该首先将您所说的场景拆分?

If you use @parallel=false on each feature where scenarios cannot be played in parallel, it'll work. But scenarios should be played in any order and not be dependent on each other. Maybe what you call scenarios shouldn't be split in the first place?

有关脚本结构的更多信息: https://github.com/intuit/karate#script -结构

More information about script structure : https://github.com/intuit/karate#script-structure

这篇关于空手道-并行执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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