如何使Jmeter识别“本地主机"?网址? [英] How to make Jmeter recognize "localhost" URL?

查看:1059
本文介绍了如何使Jmeter识别“本地主机"?网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何对只能由我的计算机访问的localhost url进行性能测试?

How to do performance testing of localhost url which is accessible only to my computer?

我可以使用jmeter对实时网站(如google等)进行性能测试,但jmeter无法检测本地网址. 应用程序的网址-192.168.121.20:8001
2.查看结果树侦听器的输出-所有失败的HTTP警报HTTP请求采样器的屏幕快照说明-仅添加服务器名称,即URL –

I am able to do performance testing using jmeter for live websites like google etc but jmeter is not able to detect local url. URL of application-192.168.121.20:8001
2. Output of View Results Tree listener- ALL failed http alerts Description of screenshot of HTTP Request sampler- added only server name i.e URL –

推荐答案

如果您无法使用JMeter来访问本地URL,JMeter不在乎被测应用程序是本地的还是远程的-HTTP Request Sampler配置有问题,最有可能的端口"值是错误的.

JMeter doesn't care whether application under test is local or remote, if you cannot hit local URL with JMeter - something is wrong with your HTTP Request Sampler configuration, most likely "Port" value is wrong.

为了能够提供帮助,我们需要了解以下内容: 1.您的应用程序的URL 2. 查看结果树侦听器的输出 3. JMeter日志的内容 4. HTTP请求采样器的屏幕截图说明

In order to be able to help we need to know the following: 1. URL of your application 2. Output of View Results Tree listener 3. Contents of JMeter log 4. Description of screenshot of your HTTP Request sampler

作为另一种选择,您可以尝试使用 JMeter Chrome扩展程序来记录您的情况 a>,然后查看是否可以无错误地重播录制的场景.同样,使用查看结果树"侦听器检查请求和响应的详细信息.

As an alternative option you can try recording your scenario using JMeter Chrome Extension and see if you're able to replay recorded scenario without errors. Again, use View Results Tree listener to inspect request and response details.

通常,不建议在被测试的应用程序上运行,并且负载生成器与负载生成器(在您的情况下为JMeter)在同一台物理或虚拟机上可能会消耗大量的资源,例如CPU和RAM,并且可能会干扰您的应用程序运行状况(除非您使用的是完全隔离的容器),所以我建议为应用程序和负载生成器使用单独的主机.

In general it is not recommended to run the application under test and the load generator on the same physical or virtual machine as the load generator (JMeter in your case) may consume immense amount of resources like CPU and RAM and it may interfere your application health (unless you're using completely isolated containers), so I would recommend use separate hosts for application and the load generator.

这篇关于如何使Jmeter识别“本地主机"?网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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