[英]Save jmeter Http request's response data in string java code
I am developing application in which user will give URL of the page based on that HTTP sampler request will be send and response is displayed. 我正在开发一个应用程序,其中用户将基于该HTTP采样器请求发送页面并给出响应,并显示响应。 Please suggest me proper way for doing this.
请建议我这样做的正确方法。
You need to elaborate your question. 您需要详细说明您的问题。 Given KISS principle I would suggest designing your test like:
根据KISS原则,我建议您像这样设计测试:
${__P(url,)}
${__P(url,)}
System.out.println(new String(data));
System.out.println(new String(data));
and saving it as ie test.jmx
并将其保存为ie
test.jmx
So if you run JMeter in command-line non-GUI mode like : 因此,如果您在命令行非GUI模式下运行JMeter,例如 :
jmeter -Jurl=http://your.url.here -n -t example.jmx
you will be able to see response in the same command line. 您将可以在同一命令行中看到响应。
If you're developing your application in Java - here's JMeter API reference 如果您正在用Java开发应用程序-这是JMeter API参考
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.