Blitz Docs

Variables | Basics

Generating the same request to your app gets boring pretty quickly, and doesn't reflect the real-world experience of a production app that handles an interesting mix of hits by different users. Blitz can parameterize all aspects of the request (method, query arguments, POST/PUT data, headers, etc.) and can be a very effective cache buster.

Getting Started

Using the command-line developer-friendly interface, you can define a variable as simply as this:

-v:foo number[1,10]

In this example, the variable called foo will generate random numbers from 1 to 9. You can now use this variable definition in any part of a Blitz request:

-v:foo number[1,10] http://my.cool.app/page?id=#{foo}

When you now rush we will generate hits on your app with the id in the URL ranging from 1 to 10. You can define multiple variables and use them in any part of the request.

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