【问题标题】:Jenkins selenium plugin - how to differentiate nodes using labelJenkins selenium 插件 - 如何使用标签区分节点
【发布时间】:2016-07-12 14:35:37
【问题描述】:

我在 jenkins 中安装了 selenium 插件(带有 selenium 网格)。我正在触发我的 selenium 脚本以在具有所需功能的节点上运行。

有人可以澄清如何使用标签来区分插件摘要中提到的节点

wiki.jenkins-ci.org/display/JENKINS/Selenium+Plugin

DesiredCapabilities capability = DesiredCapabilities.firefox();
// say you use the redhat5 label to indicate RHEL5 and the amd64 label to specify the architecture
capability.setCapability("jenkins.label","redhat5 && amd64");
// Say you want a specific node to thread your request, just specify the node name (it must be running a selenium configuration though)
capability.setCapability("jenkins.nodeName","(master)");

如何设置上述所需的功能?

我所需要的只是当它们具有相同的操作系统和浏览器配置时,能够区分运行我的测试的节点。

【问题讨论】:

  • 欢迎来到 Stack Overflow!很难说出这里问的是什么,而且这个问题不能以目前的形式得到合理的回答。请提供您所做工作的上下文和/或邮政编码示例(即:What have you tried?)。

标签: selenium jenkins selenium-grid


【解决方案1】:

按照以下步骤操作:

  1. 在节点的 '配置' 页面 (Configure -> Labels) 上为您的节点添加标签。

  2. 然后,在您的项目配置中,您可以通过转到可以运行此项目的(Your Project)->Configure->Restrict 将其设置为在特定节点上运行(打勾)。

  3. 'Label Expression' 上添加您的节点标签。

希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多