1. Simple Web LoadTest
Now, before we move on further, let’s explain the setup of a loadUI Test, or of any Load Test.
- First we need some kind of load generation, something that sets the request rate and how it develops. In order to generate Load in loadUI you have to add an aptly named Load Generator. The Load Generator is what in loadUI is called a component. Components are the building blocks of a loadUI test.
- Now, when we have the pulse of the test, the rate at which we’re generating load, we need something to actually test. In loadUI we have two kinds of tests we can run, Web Load Tests, that runs requests to one URL in order to expose weaknesses and the more sophisticated soapUI Test, where take a functional test created in the worlds most used functional test tool, soapUI, and run it under load. What you add in loadUI if you want to run a test of a certain type? A runner of course.
- Then, when you have a test running with a certain generated load, you would like to see how it performs, right? We would like to analyze the test. In order to do that you need to add an Analysis component.
That’s it! Basically these three components is all you need, but you can build out the test to much more complex setups than that. We’ll look at some tests later that illustrates just how powerful loadUI can be.
Double-click the TestCase to open it!
The Setup
Let’s look at the TestCase and see what the components are based on the trifecta we described in the introduction.
- Generator:
For this test we’re using the Fixed Rate Generator. This is a very simple Generator with no special pattern for load distribution; it just sends requests at a fixed rate. The rate can be per Second, per Minute or per Hour. You can change it by grabbing the switch and moving it. Changing the rate is the same; grab the Rate Knob and Pump up the Volume! The generator is set to run 10 requests per second. - Runner:
The Runner used is also very simple. We’re using the Web Page Runner which calls one URL over and over again. As you can see the URL is http://localhost:8081, we’ll explain a bit more about it later. Also, on the right side of the component you can see a lot of useful statistics. - Analysis:
The Statistics Component draws a graph based on the results it’s getting from the Web Page Runner. How does it get the results? By connecting the two with a connector of course!
The Extras
Remember we said we talk about the URL in the Web Page Runner being http://localhost:8081?
Now’s the time to explain why; in order for you to actually run the test without crashing a server somewhere. We have a simulated server running on your local machine from inside loadUI.
This is a great tool during the development period when you’re creating your tests, it might not be entirely popular if you slow down the development, or even worse live, server for the rest of the team.
Creating and modifying the tests using a simulated server is the solution. An attentive reader might say “Now, that sounds a lot like a soapUI MockService…” and you’re right, it is. Meet the soapUI Mockservice Component.
The MockService is used in this tutorial to have something to test against . It is started when the LoadTest starts and the number of Requests will be the same as the Requests sent by the WebPage Runner
The LoadTest
- First, Make sure you are in "Local Mode" in the System toolbar at the bottom of this window
- Then run the LoadTest by pressing the Run button on the top left toolbar (Next to the TestCase menu).
- You will see the Web Page Runner starting to send requests and statistics being displayed in the Statistics Component.
- This LoadTest has no configured limit; it will run until you stop it manually with the Stop button. Once you have stopped it, be sure to generate a report with the report-button at the top right.
Note
Some things to try:
- Try increasing or decreasing the load generated by the Fixed Rate Generator (by turning the knob) to see how the statistics change

- Open the settings dialog and select which values you want to show in the Statistics Component

- Try minimizing Components (with the top-right [-] button

That’s it! Let’s move to the next test; 2. Assertions and Logging






