首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在代理后面使用JWebUnit

在代理后面使用JWebUnit
EN

Stack Overflow用户
提问于 2012-03-22 16:41:13
回答 1查看 418关注 0票数 0

我使用JWebUnit在本地运行的应用程序上运行测试(本地主机),但是我的应用程序的某些部分需要将用户重定向到外部站点,然后再返回(重定向到本地主机)。

因为我在代理后面,所以我尝试使用TestContext.setProxyAuthorization(),但是JWebUnit不能在本地访问应用程序(TestContext与nonProxyHosts完全不同),如果我不使用TestContext.setProxyAuthorization(),JWebUnit就不能访问远程站点。

我该怎么办?

EN

回答 1

Stack Overflow用户

发布于 2012-04-02 17:38:13

代码语言:javascript
复制
you can use the following within your setup method.  I have used this myself and it works
you may need to add a password key and a value too

 System.setProperty("proxyHost", "AUT ip");
 System.setProperty("proxyPort", "AUT port 8080");
 System.setProperty("proxySet", "true");
 System.setProperty("http.nonProxyHosts", "webserverfor AUT");`enter code here`
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9818815

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档