且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Jmeter获取API内调用的响应时间

更新时间:2022-03-30 23:33:08

以下是我能想到的:-

选中跟随重定向",然后使用查看结果树"或简单数据编写器"之类的侦听器以XML格式而不是CSV格式编写输出.您可以在此处找到重定向的URL和响应时间. 但是,XML创建将消耗大量资源,应该避免.

Check on "Follow Redirect" and then use listener like "View Result tree" or "Simple Data Writer" to write the output in an XML format instead of CSV. There you can find the redirected URLs and response time. But, XML creation will consumer a lot of resource and should be avoided.

第二,使用后处理器,从采样器结果中获取响应时间以及重定向的URL,并将其写入csv.这需要一些编码.

Second, use post processor and fetch the response time from the sampler results along with redirected URL and write it in a csv. This requires some coding.