Hudson + Selenium插件-运行测试时出现HTTP错误403 [英] Hudson + Selenium plugin - Getting HTTP error 403 when running tests

查看:109
本文介绍了Hudson + Selenium插件-运行测试时出现HTTP错误403的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Hudson插件(一个称为sleniumhq插件)使用Selenium工具来测试我的应用程序.

I am trying to test my application using Selenium tool via the Hudson plugin (the one called sleniumhq plugin).

作为概念证明,我决定针对谷歌进行一次非常简单的测试,该测试是以下测试:

As a proof of concept I decided to make a very simple test targetting google, the test is the one below:

<?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 profile="http://selenium-ide.openqa.org/profiles/test-case">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="selenium.base" href="" />
    <title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
    <thead>
        <tr><td rowspan="1" colspan="3">New Test</td></tr>
    </thead>
    <tbody>
        <tr>
        <td>open</td>
        <td>/</td>
        <td></td>
        </tr>
        <tr>
        <td>waitForPageToLoad</td>
        <td>3000</td>
        <td></td>
        </tr>
        <tr>
        <td>type</td>
        <td>q</td>
        <td>selenium rc</td>
        </tr>
        <tr>
        <td>click</td>
        <td>btnG</td>
        <td></td>
        </tr>
    </tbody></table>
</body>

此测试将打开Goog​​le,然后搜索硒rc.

This test opens Google then searches for selenium rc.

当我使用Hudson运行它时,在打开的浏览器中收到HTTP错误403. Hudson或Selenium没有引发任何具体错误.

When I run it using Hudson I get HTTP error 403 in the opened browser. There is no specific error raised by Hudson or Selenium.

这是我的哈德森配置:

浏览器:* iehta

browser : *iehta

startUrl:http://:4444/selenium-server/

startUrl : http://:4444/selenium-server/

suiteFile:suite.html(指向前面描述的测试的套件)

suiteFile : suite.html (suite pointing to the test described before)

resultFile:result.html

resultFile: result.html

other:-timeout 5 -debug -browserSideLog -ensureCleanSession -trustAllSSLCertificates

other : -timeout 5 -debug -browserSideLog -ensureCleanSession -trustAllSSLCertificates

htmlSuiteRunner:C:\ selenium \ selenium-remote-control-1.0.1 \ selenium-server-1.0.1 \ selenium-server.jar

htmlSuiteRunner : C:\selenium\selenium-remote-control-1.0.1\selenium-server-1.0.1\selenium-server.jar

你们已经遇到过这样的问题吗?它是否链接到用户权限定义或其他内容?

Do you guys have already faced such an issue? Is it linked to user rights definition or something?

提前感谢您的帮助!

推荐答案

我不熟悉Hudson,但是startUrl看起来不正确.您是否打算在那里拥有Selenium RC服务器的IP地址?例如: http://10.100.1.1:4444

I'm not familiar with Hudson, but that startUrl doesn't look right. Are you meant to have the IP address of the Selenium RC server in there? For example: http://10.100.1.1:4444

此外,如果您使用的是最新版本的Selenium(1.0),则应在HTA模式下将Internet Explorer的浏览器设置为"* iexplore".

Also, if you are using the latest version of Selenium (1.0) then the browser should be set to '*iexplore' for Internet Explorer in HTA mode.

这篇关于Hudson + Selenium插件-运行测试时出现HTTP错误403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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