如何强制Jmeter代理服务器只监听特定页面

时间:2013-08-26 09:49:20

标签: jmeter

我正在使用Jmeter代理来记录我在浏览器中执行的步骤。是否有可能设置代理服务器只是为了监听一个特定的页面?

我想要记录www.test123.com上仅采取的步骤

由于

1 个答案:

答案 0 :(得分:0)

使用包含模式限制记录的请求。

根据http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Proxy_Server

The include and exclude patterns are treated as regular expressions (using Jakarta ORO). They will be matched against the host name, port (actual or implied) path and query (if any) of each browser request. If the URL you are browsing is "http://jmeter.apache.org/jmeter/index.html?username=xxxx" , then the regular expression will be tested against the string: "jmeter.apache.org:80/jmeter/index.html?username=xxxx" . Thus, if you want to include all .html files, your regular expression might look like: ".*\.html(\?.*)?" - or ".*\.html" if you know that there is no query string or you only want html pages without query strings.

“www.test123.com。*”应仅记录来自给定网址的请求。