Software Quality Insights

Dec 7 2009   3:52PM GMT

Excluding certain elements while recording JMeter tests

MichaelDKelly Michael Kelly Profile: MichaelDKelly

In a recent article on JMeter, I related some tips for recording JMeter tests using the proxy recorder. Sometimes when you’re recording tests, you want to exclude certain transactions like images, script code, or page types. To do that, you can enter specific patterns to have the proxy include or exclude:

JMeter Patterns

Figure 1: Including or excluding patterns in the JMeter HTTP Proxy Server.

In figure 1 above, you see that I’ve explicitly included various image files, and excluded JavaScript files. For any particular type of file you’d like to list, just use that same regular expression:


If both fields are left blank, all transactions are recorded. If at least one field has a regular expression, than only requests matching (or not matching) the regular expression will be included. Any regular expression provided is matched against the full URL JMeter samples.

Using filters like this can greatly reduce the number of transactions you record. That, in turn, can reduce the amount of time it takes you to sort through the results of what you recorded. If a typical recording session gives you 200 transactions, you need to look at most of those to figure out which ones to include in your actual test scenario. Using filters, you can reduce the amount of work involved by recording only the various types of transactions you think you’ll need.

1  Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.
  • lohithpm
    thanx for the post, even though i used the pattern as mentioned the jpgs and mp3 files are still being recorded.

    can you let me know why
    10 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: