有没有办法通过为每个测试打开一个浏览器实例来并行运行量角器测试? [英] Is there a way to run protractor tests in parallel by opening a browser instance for each test?

查看:84
本文介绍了有没有办法通过为每个测试打开一个浏览器实例来并行运行量角器测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临着我的量角器测试的同步问题,我希望与我的实际设置相比,并行运行我的测试。事实上,目前我的测试一个接一个地进行。
我知道如何使用TestsNG不确定如何使用Jasmin Framework?

I am facing synchronisation issues with my protractor tests and I would like to run my tests in parallel in contrast to my actual settings. In fact at the moment my tests run one after the other. I know how to this with TestsNG not sure how to do it with Jasmin Framework?

推荐答案

自0.19.0起在Protractor版本中,您可以使用 multiCapabilities 选项并行运行测试:

Since 0.19.0 version of Protractor, you can run tests in parallel using the multiCapabilities option:

protractor.conf。 js

multiCapabilities: [{
  'browserName': 'chrome'
}, {
  'browserName': 'chrome'
}]

来自浏览器设置 - 量角器文档

此问题似乎适合您的情况。

目前,Protractor不允许设置Webdriver maxSessions 选项,有一个更多全球讨论将此功能纳入其中ERS。

For now, Protractor doesn't allow to set Webdriver maxSessions option, there is a more global discussion to include this feature among others.

编辑:引入了multiCapabilities以在不同浏览器下并行运行测试,但在您的情况下,您可以使用它来运行多个实例相同;)

multiCapabilities was introduced to run tests in parallel under different browsers, but in your case, you can use it to run multiple instances of the same ;)

这篇关于有没有办法通过为每个测试打开一个浏览器实例来并行运行量角器测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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