如何使用 selenium rc 在 hudson 中执行 Selenium IDE 脚本

发布于 2024-12-16 01:08:56 字数 2062 浏览 2 评论 0原文

我已经在 html 中导出了一个录制的脚本,现在尝试从 Hudson 执行该脚本,但是每次我收到下面提到的消息时,请让我知道我缺少什么或者我的错在哪里

11:58:08.851 INFO - Java: Sun Microsystems Inc. 20.1-b02
11:58:08.852 INFO - OS: Windows 7 6.1 x86
11:58:08.859 INFO - v2.2.0, with Core v2.2.0. Built from revision 13073
11:58:08.972 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:58:08.973 INFO - Version Jetty/5.1.x
11:58:08.974 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:58:08.974 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:58:08.975 INFO - Started HttpContext[/,/]
11:58:08.995 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@186d4c1
11:58:08.995 INFO - Started HttpContext[/wd,/wd]
11:58:08.998 INFO - Started SocketListener on 0.0.0.0:4444
11:58:08.998 INFO - Started org.openqa.jetty.jetty.Server@18a47e0
11:58:09.155 INFO - Preparing Firefox profile...
11:58:12.410 INFO - Launching Firefox...
11:58:16.169 INFO - Checking Resource aliases
InterruptedException!
[DEBUG] Skipping watched dependency update for build: test_full #9 due to result: FAILURE
Finished: FAILURE

我尝试按照建议的步骤操作,但它不适合我。仍然面临同样的问题 请查找我的测试套件文件的详细信息

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
  <title>Test Suite</title>
</head>
<body>
<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
<tr><td><b>Test Suite</b></td></tr>
<tr><td><a href="tc1.html">tc1</a></td></tr>
</tbody></table>
</body>
</html>

我仍然遇到相同的错误

还想确认一件事,我正在使用 selenium IDE 创建测试套件,并且我不将测试套件文件导出到 HTML,而只是将其保存为 . html 扩展名,我比较了两个文件,发现没有变化

请帮助!

I have exported a recorded script in html and now trying to execute that script from hudson,but every time i am getting below mention message, please let me know what i am missing or where is my fault

11:58:08.851 INFO - Java: Sun Microsystems Inc. 20.1-b02
11:58:08.852 INFO - OS: Windows 7 6.1 x86
11:58:08.859 INFO - v2.2.0, with Core v2.2.0. Built from revision 13073
11:58:08.972 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:58:08.973 INFO - Version Jetty/5.1.x
11:58:08.974 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:58:08.974 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:58:08.975 INFO - Started HttpContext[/,/]
11:58:08.995 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@186d4c1
11:58:08.995 INFO - Started HttpContext[/wd,/wd]
11:58:08.998 INFO - Started SocketListener on 0.0.0.0:4444
11:58:08.998 INFO - Started org.openqa.jetty.jetty.Server@18a47e0
11:58:09.155 INFO - Preparing Firefox profile...
11:58:12.410 INFO - Launching Firefox...
11:58:16.169 INFO - Checking Resource aliases
InterruptedException!
[DEBUG] Skipping watched dependency update for build: test_full #9 due to result: FAILURE
Finished: FAILURE

I tried to follow the suggested steps but it do not worked for me.still facing the same issue
Please find the details of my test suit file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
  <title>Test Suite</title>
</head>
<body>
<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
<tr><td><b>Test Suite</b></td></tr>
<tr><td><a href="tc1.html">tc1</a></td></tr>
</tbody></table>
</body>
</html>

I am still getting the same error

Also would like to confirm one thing that i am using selenium IDE for test suite creation and I do not export the test suite file to HTML but simply save it with .html extension,I have compared both the file and found no changes

Please help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

偏闹i 2024-12-23 01:08:56

最可能的原因是您正在导出并尝试运行测试用例而不是测试套件。请查看页面。通常测试套件是一个指向测试用例 html 文件的 html 文件。今天花了几个小时思考这个问题,最终让它发挥作用。

这是包含测试用例的测试套件的示例。

<html>
<head>
<title>Test Suite Function Tests - Priority 1</title>
</head>
<body>
<table>
  <tr><td><b>Suite Of Tests</b></td></tr>
  <tr><td><a href="./Login.html">Login</a></td></tr>
  <tr><td><a href="./SearchValues.html">Test Searching for Values</a></td></tr>
  <tr><td><a href="./SaveValues.html">Test Save</a></td></tr>
</table>
</body>
</html>

来自 Selenium 文档页面

Most likely reason is that you are exporting and trying to run Test Case not Test Suite. Please check this page. Normally Test Suite is a html file that points to Test Case html files. Spent a few hours getting my head around this today and eventually got it working.

Here is an example of a Test Suite that contains Test Cases.

<html>
<head>
<title>Test Suite Function Tests - Priority 1</title>
</head>
<body>
<table>
  <tr><td><b>Suite Of Tests</b></td></tr>
  <tr><td><a href="./Login.html">Login</a></td></tr>
  <tr><td><a href="./SearchValues.html">Test Searching for Values</a></td></tr>
  <tr><td><a href="./SaveValues.html">Test Save</a></td></tr>
</table>
</body>
</html>

From Selenium doc page

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文