【问题标题】:How to run multiple selenium processes at a time with nightwatch?如何使用 nightwatch 一次运行多个 selenium 进程?
【发布时间】:2016-08-16 06:29:07
【问题描述】:

我正在使用 nightwatch 并行运行测试。我希望能够在不同的硒进程中一次运行多个测试。我怎样才能做到这一点?

我所做的是创建一个 selenium 集线器:

java -jar /opt/selenium-server-standalone-2.53.0.jar -Dwebdriver.chrome.driver=/usr/bin/chromedriver -Dwebdriver.chrome.bin=/usr/bin/google-chrome  -log /home/jenkins-user/log/selenium.log  -role hub & 

当每个测试运行时,我都会创建一个节点:

java -jar /opt/selenium-server-standalone-2.53.0.jar -Dwebdriver.chrome.driver=/usr/bin/chromedriver -Dwebdriver.chrome.bin=/usr/bin/google-chrome  -log /home/jenkins-user/log/selenium.log  -role node  -browser browserName=chrome -hub http://localhost:4444/grid/register & 

不幸的是,这使我无法并行运行守夜测试。

我做错了什么?

【问题讨论】:

  • 好吧,您没有使用可用的本机并行支持(而是尝试在构成 Nightwatch 的“正常”并行测试范围之外做一些事情)。如果对每个运行的测试使用单个 selenium 会话,并且每个 CPU 分发测试 (nightwatchjs.org/getingstarted#basic-settings),那么每个 CPU 的每个测试将有一个 selenium 会话。这不是你想要的吗?

标签: selenium nightwatch.js


【解决方案1】:

为什么要启动多个 selenium 进程?你不应该那样做。

查看我对类似问题的回答:Running multiple nightwatch instances

【讨论】:

    猜你喜欢
    • 2020-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-28
    • 1970-01-01
    相关资源
    最近更新 更多