虚拟机上的jMeter没有互联网没有完成测试(jMeter on VM with no internet not finishing test)

编程入门 行业动态 更新时间:2024-10-24 22:30:01
虚拟机上的jMeter没有互联网没有完成测试(jMeter on VM with no internet not finishing test)

我的公司正在尝试在虚拟机中使用JMeter(Windows Server 2003 :(),没有互联网连接,可以在服务器设置和代码运行的情况下点击另一台虚拟机。我在主机文件中设置了ip地址,让我们称之为server.dev现在。我们的目标是点击server.dev/doSomething当我们进入IE并点击server.dev时,我们得到一个响应。

我们使用一个带有JMeter的密钥库,它说它正确创建它。 在JMeter中,我们有一个HTTP请求,我们点击server.dev,路径设置为/ doSomething。 然后JMeter启动,并且日志没有错误,但是一旦它显示“创建HTTPS Trusall Scheme”它就会挂起。 当我在其上放置调试标志时,表明它正确地创建了SOAP请求并且似乎将其发送出去。 标题应该都是正确的。 它在这里挂了大约1分钟,然后因为“无法从服务器获得响应”的说法而错误地关闭。

有没有人对从这里去哪里有任何想法? 我试图调试几个小时,但无处可去。 我似乎无法加载Fiddler来查看网络流量,因为没有设置localhost。

My company is trying to use JMeter in a VM (Windows Server 2003 :( )with no internet connectivity to hit another VM with a server set up and code running on IIS. I set up the ip address in my hosts file, let's call it server.dev for now. Our goal is to hit server.dev/doSomething When we go into IE and hit server.dev we get a response.

We use a keystore with JMeter and it says that it creates it correctly. In JMeter we have an HTTP Request where we hit the server.dev, and the path is set to /doSomething. JMeter then starts, and the log has no errors, but once it says "Creating the HTTPS Trusall Scheme" it hangs. When I put debug flags on it shows that it created the SOAP Request correctly and seems to send it out. The Headers should all be correct. It hangs here for about 1 minute and then shuts down with error with saying something along the lines of "Could not get response from server".

Does anyone have any ideas on where to go from here? I tried to debug for hours, but got nowhere. I can't seem to load up Fiddler to see the network traffic either, since there is no localhost set up.

最满意答案

IE很可能使用代理,而JMeter则不然。 尝试其他浏览器,即Firefox (如果你在安装过程中不会导入任何东西,它不尊重系统代理设置),如果Firefox无法建立连接 - 我的假设是正确的,你坐在代理后面服务器。

有一种方法可以“告诉”JMeter使用代理服务器,它可以通过命令行参数控制,即:

-H [proxy server hostname or ip address] -P [proxy server port] -N [nonproxy hosts] (e.g. *.apache.org|localhost) -u [username for proxy authentication - if required] -a [password for proxy authentication - if required]

有关详细信息,请参阅在代理指南后面使用JMeter以及完整列表的命令行选项的完整列表。

您还可以在system.properties文件(位于JMeter安装的/ bin文件夹下)中配置代理设置,并为其添加以下行:

http.proxyHost=your.proxy.ip.address.or.host.name http.proxyPort=your.proxy.port https.proxyHost=your.proxy.ip.address.or.host.name https.proxyPort=your.proxy.port

在JMeter重启之后,一切都应该按预期工作。

有关JMeter属性以及设置和覆盖它们的方法的详细信息,请参阅“ Apache JMeter属性自定义指南”

Most likely that IE uses proxy and JMeter does not. Try other browser, i.e. Firefox (it doesn't respect system proxy settings if you won't import anything during installation) and if Firefox won't be able to establish the connection - my assumption is correct and you're sitting behind the proxy server.

There is a way to "tell" JMeter to use a proxy server, it is controllable via command-line arguments, to wit:

-H [proxy server hostname or ip address] -P [proxy server port] -N [nonproxy hosts] (e.g. *.apache.org|localhost) -u [username for proxy authentication - if required] -a [password for proxy authentication - if required]

See Using JMeter behind a proxy guide for details and Full list of command-line options for the full list.

You can also configure proxy settings in system.properties file (which lives under /bin folder of your JMeter installation), add the following lines to it:

http.proxyHost=your.proxy.ip.address.or.host.name http.proxyPort=your.proxy.port https.proxyHost=your.proxy.ip.address.or.host.name https.proxyPort=your.proxy.port

And after JMeter restart everything should work as expected.

See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of setting and overriding them

更多推荐

本文发布于:2023-04-27 15:16:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1327196.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:互联网   机上   测试   jMeter   test

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!