Blitz Docs

Variables | Types

Currently Blitz supports four types of variables: numberalphalistuuid, and udid. Here's an example:

-v:foo number[1,10] http://your.restful.api/?q=#{foo}
We are defining a variable called foo and subsequently using it in the query parameter. When you now rush, we'll generate random numbers for the q parameter within the specified range.

Short-form Long-form Description
n[min,max] number[min,max] Generate a random number between min (inclusive) and max (exclusive)
a[min,max] alpha[min,max] Generate a string between min and max characters long
[a,b,c,1,2,3] list[a,b,c,1,2,3] Generate one of the comma-separated values
uuid uuid Generate a random 36-character (128-bit) UUID string
u udid Generate a random 40 character iPhone® unique identifier

Here's an example of rushing a location-aware iPhone/Android app that does geo-spatial queries. We are parameterizing the latitude and the longitude in the request to pan or zoom a map.

-v:lat n[20,48] -v:long n[-61,-123]{lat}&long=#{long}

In this example, we pass enumerated values to be used in a search criteria:

-v:q [mu,blitz,pcapr]{q}

Finally, this example shows an app that looks up phone numbers from a directory:

-v:phone n[4081234567,6501234567] http://phone.look.up/?number=#{phone}

Try our Starter plan free for 14 days!
Start my Trial