简体   繁体   English

使用HTTP请求运行采样器时出错-Jmeter

[英]Error running sampler with http request- Jmeter

I am running sampler (HTTP Request ) with the settings: 我正在使用以下设置运行sampler(HTTP Request):

Server Name or IP:  localhost:8044/ca
Path: /

Its failing and throwing the error message: 它失败并抛出错误消息:

 Thread Name: LoadTest 1-1 Sample Start: 2017-02-01 16:50:41 GMT+05:30 Load time: 0 Connect Time: 0 Latency: 0 Size in bytes: 1077 Headers size in bytes: 0 Body size in bytes: 1077 Sample Count: 1 Error Count: 1 Response code: Non HTTP response code: java.net.URISyntaxException Response message: Non HTTP response message: Expected closing bracket for IPv6 address at index 22: http://[localhost:8044/ca]/ 

Please suggest me the solution. 请给我建议解决方案。

You should not be having the Path in "Server Name" input field, you have 2 options: 您不应该在“服务器名称”(Server Name)输入字段中使用“ 路径 ”,而是有2个选项:

  1. Split server name, port and path into 3 different inputs: 将服务器名称,端口和路径拆分为3个不同的输入:

    HTTP请求服务器名称路径

  2. Put the whole URL into "Path" input 将整个URL放入“路径”输入中

    路径中的HTTP请求URL

Few more tips: 更多提示:

  • Recording your test scenario using JMeter's built-in proxy server may be faster and easier 使用JMeter的内置代理服务器记录您的测试场景可能更快,更轻松
  • Having Load Generator (JMeter) and Application Under Test on the same machine is not recommended, I would suggest running JMeter on another host, this way you will be able to avoid mutual interference in terms of using machine resources (JMeter is very resource intensive when it comes to conducting high loads) 不建议在同一台机器上安装Load Generator(JMeter)和被测应用程序,我建议在另一台主机上运行JMeter,这样就可以避免在使用机器资源方面的相互干扰(JMeter占用大量资源。涉及高负载)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM