Configuring a load test with multiple user scenarios

We recently had a great question come in from one of our customers that we thought we would share.

Question: Planning to run a test with 10.000 concurrent users spanning 4 or 5 user scenarios.  How do I configure a test to run with, say 35% of the load running user scenario 1, 35% running user scenario 2, 10% running user scenario 3 etc?

And, when running multiple scenarios, where each scenario consists of 2 or more pages, how can we see the performance (load time) of each page in each scenario?

Answer: Assigning a certain amount of the simulated users to each user scenario is something you do in the “Test configuration” section.

Just scroll down the page to the section called “User scenarios”, then click the “Add scenario” button to add a new user scenario to the test. When you have all the scenarios you want added, you can fiddle with the percentages to get the exact load allocation for each scenario that you want.

User Scenario Gif Final Medium8(large)

 

The load time of each page in a user scenario can be collected if you use the –

http.page_start() and http.page_end() functions

– inside the user scenario script. Read more about that here and here.

Example: page metrics

-- Log page metric
 http.page_start("My page")
 responses = http.request_batch({
    { "GET", "http://loadimpact.com/" },
    { "GET", "http://loadimpact.com/style1.css" },
    { "GET", "http://loadimpact.com/image1.jpg" },
    { "GET", "http://loadimpact.com/image2.jpg" }
 })
http.page_end("My page")

Using the above script as a user scenario would result in a plot-able page load time metric for a page called “My page”. The name of the page can be changed to whatever you want.

The Load Impact Session Recorder – Now Available as a Chrome Extension!

Start a load test with just a few clicks. Record all HTTP traffic and use the recordings to simulate real user traffic under realistic load.

The Load Impact Chrome extension will capture everything – every single thing being loaded into the browser as you click – including ads, images, documents, etc., so you get a far more accurate read of what’s going on.

Just press “record”, start browsing and when complete, the script will automatically upload to your Load Impact account.

Here’s how it works:

output_ZcOpmw

With the help of our Chrome extension, you can run up to 10 different users scenarios in each load test and simulate up to 1.2 million concurrent users.  You can also run the multiple user scenarios simultaneously from up to 10 different geographic regions in a single test (powered by Amazon and Rackspace).

Until now our session recorder required developers to go to our website and manually change the proxy settings in the browser or operating system to perform a recording. That was a bit of a hassle, and the proxy solution sometimes caused problems with SSL certificates.

The extension now automates the entire process, from recording traffic in a specific browser tab, to stopping, saving and sending the scrip to your Load Impact account for future use.

The Chrome extension is available free of charge from the Google Chrome Web Store and is easily ported to the Safari and Opera browsers.  An extension for the Firefox browser is planned for release early next year.

To use the Chrome extension, you will need to register for a Load Impact account at loadimpact.com.

About Load Impact

Load Impact is the leading cloud-based load testing software trusted by over 123,000 website, mobile app and API developers worldwide.

Companies like JWT, NASDAQ, The European Space Agency and ServiceNow have used Load Impact to detect, predict, and analyze performance problems.
 
Load Impact requires no download or installation, is completely free to try, and users can start a test with just one click.
 
Test your website, app or API at loadimpact.com

Enter your email address to follow this blog and receive notifications of new posts by email.