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:
Figure 1: Including or excluding patterns in the JMeter HTTP Proxy Server.
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.