java - 如何在远程 RC 服务器上启动 Selenium htmlSuite?

标签 java selenium continuous-integration selenium-rc htmlsuite

我们有大量由业务分析师设计的 htmlsuite,我们希望在持续集成期间(或每天晚上)自动启动它们。问题是带有selenium-RC的机器与持续集成的机器不是同一台:

在java中,我们使用了客户端驱动程序,它工作得很好:

selenium = new DefaultSelenium(serverAddress, SERVER_PORT, browser, url);
selenium.start();

然后selenium.click(..)等..

如果我使用我在java中创建并启动的seleniumServer,我可以启动HTMLSuite,它也工作得很好:

RemoteControlConfiguration rcc = new RemoteControlConfiguration();
rcc.setPort(SelHelper.SERVER_PORT);
seleniumServer = new SeleniumServer(rcc);
seleniumServer.start();
HTMLLauncher launcher = new HTMLLauncher(seleniumServer);

如果我独立启动一个selenium服务器(例如远程服务器)并且我尝试使用htmlLauncher,我不会这样做,因为它使用我无法访问的SeleniumServer作为参数...

谁有解决办法吗?

B 计划是通过持续集成在 SSH 中启动 selenium RC 机器上的 .cmd 文件,其中包含以下内容:

java -jar "X:\01_Robot\SELENIUM_RC\selenium-server-1.0.1\selenium-server.jar" -htmlSuite "*firefox" "http://www.myapplication.com" "X:\mytestsuite.html" 

但这会很丑陋,只有在我别无选择的情况下我才想这样做。

最佳答案

我终于在:https://github.com/takamori/selenium-html-client-driver/wiki上找到了“HtmlClientDriver”(类似于javaClientDriver)它解析 html selenese 并在 rc 服务器上启动命令。

关于java - 如何在远程 RC 服务器上启动 Selenium htmlSuite?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4122888/

相关文章:

java - SBT:如何防止自动将 scala-library 添加到 pom?

selenium - 使用 webdriver 查找元素的最佳和最快方法是什么? By.XPath 或 By.ID 还是其他?为什么?

c# - 你如何从 Jenkins 运行 NUnit 测试?

java - JSF 日期格式

java - 如何创建不同模型的 JTable?

java - Spring Boot 应用程序未在 openWRT 上运行

php - 如何使用 PEAR 安装程序完全删除 PHPUnit?

javascript - Nightwatch 中的 setValue 方法不起作用

c# - 如何将 msbuild 升级到 C# 6?

testing - http-server 阻止 travis CI 上的脚本