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

Excluding certain elements while recording JMeter tests

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:

.*\.extension

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.

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

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
Cancel

-ADS BY GOOGLE

SearchMicroservices

TheServerSide

SearchCloudApplications

SearchAWS

SearchBusinessAnalytics

SearchFinancialApplications

SearchHealthIT

Close