Randomize MIME-Type in Avalanche (or How To Use Cursors)

Re-posted from Arnaud Castaner's blog Synsynack.  Arnaud is a Senior Systems Engineer at Spirent.

Recently, a Proxy equipment vendor was asking me how to randomize the MIME-Type of the files retrieved over HTTP using their Avalanche. They do different things to different file types – don’t cache JavaScript, but cache images, for instance.

It’s easy to specify a static percentage of MIME Type you’re going to get in your test. If you create an Action List, make 10 GET to a MP3, 10 GET to a MPEG and 80 to HTML transactions, and you’ll get 10% MP3, 10% MPEG and 80% HTML. But in the case of today’s post, we want a 10% chance of getting MP3, not exactly 10% MP3 on the wire. See the difference?

Fortunately, Avalanche can do that, thanks to a feature that not a lot of people know about: cursors. They allow to move through a Forms Database randomly (or not). We will use this in the following this scenario: click here to read the entire post

comments powered by Disqus
× Spirent.com uses cookies to enhance and streamline your experience. By continuing to browse our site, you are agreeing to the use of cookies.