News Stay informed about the latest enterprise technology news and product updates.

Excluding certain elements while recording JMeter tests

This Content Component encountered an error

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.