Track results of a regular expression extractor in JMeter

最后都变了- 提交于 2019-12-24 11:27:36

问题


Our server returns a custom 'X-Execution-Time' HTTP response header that returns in miliseconds the time between the server getting a request and our code returning a page, ie how long our code takes to run. I'm using JMeter to do some testing & I'd like to be able to report on this number of over time. I've setup this regular expression extractor: X-Execution-Time:\s(\d+) but I don't know how to get JMeter to report on this number per request so i can get a trend over time


回答1:


This isn't elegant by any means, but it certainly works:

Add a debug sampler into your test plan, and give it the same name as your regex reference. This will write out the time value into the results file.

Example if you have different pages:

regex reference = X-Execution-Time Debug Sampler Name = PageName - Execution: ${X-Execution-Time}



来源:https://stackoverflow.com/questions/2535078/track-results-of-a-regular-expression-extractor-in-jmeter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!