Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMeter Proxy exclusion patterns still being recorded

Tags:

regex

jmeter

I am using JMeter to record traffic in my browser. In my URL Patterns to Exclude are:

.*\.jpg, .*\.js, .*\.png

Which looks like they should block these patterns (I've even tested it with a regex tester here)

Yet, I still see plenty of these files get pulled up. In a related forum someone had a similar issue, but his was caused by having additional url parameters afterwards (eg www.website.com/image.jpg?asdf=thisdoesntmatch). However this doesn't seem to be the case here. Can anyone point me in the right direction?

like image 879
Paul Nelson Baker Avatar asked Sep 26 '13 16:09

Paul Nelson Baker


People also ask

How to Exclude URL Patterns in JMeter?

To restrict the static components request and simulate the real-world scenario, JMeter has an option to filter out the static request URL during the test script recording. This option is available in the 'Requests Filtering' tab of 'HTTP(S) Test Script Recorder' where you can get section 'URL Patterns to Exclude'.

How do I record a script in JMeter without a proxy in Chrome?

There is a Google Chrome Extension which allows HTTP Requests and associated cookies, headers, think times, etc. recording right from browser without having to worry about proxies and SSL certificates. Another option is using BadBoy software which can export scripts to JMeter.

Why recording is not working in JMeter?

Maybe the JMeter is being blocked by firewall or may be you haven't configured your browser properly. The solution is simple: Make sure firewall is disabled. JMeter HTTPS test Script Recorder is setup and is running(Jot Down the Port Number specified here).


1 Answers

As already mentioned in the question comments it is probably a problem with the trailing characters. The pattern matcher is executed against the complete url including parameters. So an URL http://example.com/layout.css?id=123 is not matched against the pattern .*\.css
The JMeter HTTP Request Sample seperates the Path and the Parameters so it might be not obvious when you look at the URL.

Solution:
Change the pattern to support trailing characters .*\.css.*

Explained
.* Any character
\. Matching the . (dot) character
css The character sequence css
.* Any character

like image 52
RenRen Avatar answered Oct 19 '22 06:10

RenRen