The Loadmill's Load Testing module allows users to replay their API tests at scale and use real traffic with the ability to target specific countries or go global.
In this quick guide to Loadmill we will learn how to:
Create and run a very simple load test in just a few seconds.
Create an API test by using our Chrome recorder extension and run it as a load test in Loadmill.
Run load tests as DRY RUN or at scale.
Signup to Loadmill at this link. We do not ask for any credit card or personal information other than your name and email so it only takes about five seconds. You can also login using your Google or GitHub account.
In order to use Loadmill effectively, we highly recommend to read Core definitions, don't worry, it is only a 2 min read. 😉
There are two ways to do that:
Creating and running a load test from scratch in Loadmill.
Recording an API test by using our Chrome recorder extension and running it as a load test in Loadmill.
The simplest load test you can create is an HTTP GET request to your web server.
All you need to do is:
Click the NEW TEST button on the top navigation menu. This will get you to our test editor.
Give your new test a short description
My First Test
Copy and paste the website URL into the URL text box. In our case, it's going to be
https://loadmill-test-blog.herokuapp.com. This is a ghost blogging server we are using for testing and demos, so you can use it for tests.
Click the DRY RUN button as we recommend running your load test for the first time as a trial test.
That's it! You have just created and run your first load test in under a minute 🎉 See how to run it at scale here.
Create an API test as explained here.
Go to Loadmill and open the recorded test in your Test Suite.
Click on three dots next to the run icon - Click Convert To Load Test.
To run the load test for the first time, we recommend running it as a trial test. See how to do that below.
Before we run a massive load test, we usually want to run just a single iteration of the scenario, to make sure everything works as expected. This is what we call a DRY RUN. It's also a very easy way to test your API and can be exported to a Functional Test which you can later use in your CI.
When we are creating a new test or extending/maintaining an old one, we like to iterate several times - modifying the test and trying it out - until we get the result we want.
To start a trial run, click the DRY RUN button at the bottom of the editor. You will be prompted to choose between running remotely (the default) or locally. There are several good reasons you may want to run locally, but for now we leave it on remote.
Now that we know that our test is configured correctly, we can run it at scale. To do that:
Click the RUN TEST button at the bottom of the test editor.
Set Test Duration (minutes) and Maximum Concurrent Sessions OR Maximum Requests Per Second you would like this test flow to run.
Click on "Advanced" to set additional parameters. For example, you can set Ramp-up Duration (1 minute by default) hence a number of concurrent sessions will increase linearly during the ramp-up.
As the test progresses we can see the amount of concurrent sessions ramping up linearly and see how response time metrics change over time.
In addition, you can adjust concurrency during a test run. This is a very powerful feature that allows to see how the test performs with dynamic concurrency changes in real time.
Loadmill keeps track of the request error rate and fails the test if it passes a certain threshold (%50 by default). We can see the response time for each request and are able to drill down and see the error statistics for each one.
Keep exploring the guides to learn how to analyze load test results, set thresholds and more.
We are always here if you need any help! Click on the bubble chat button in the lower-right corner of the screen or drop us a line at [email protected].