We have already seen in Chapter 1, Introduction to SOA Testing, how to create a performance testing script using SoapUI so let's move on further from there.
We have four load generation strategies in SoapUI:
Let's go through each of them in detail.
Simple strategy: This strategy addresses three types of performance test:
The simple strategy generates a specific amount of virtual user load on the application with a ramp up time between each thread to give breathing space to the application under test.
Following screenshot shows the configuration window where the setting for the simple strategy is set.
The following window is common for each strategy type but works differently for each load generation strategy:
Let's take a detailed look at the previous screenshot:
Variance: This technique is used usually for two types of performance testing:
This strategy varies the number of threads over time. Set the Interval to the desired value and the Variance to how many the number of threads should decrease and increase.
Let's have a look at the following example.
If we start with Threads of 20, and an Interval of 60 and Variance of 0.8, the number of threads will increase from 20 to 36 within the first 15 seconds, then decrease back to 20 and continue down to four threads after 45 seconds, and finally go back up to the initial value after 60 seconds.
The Variance strategy window has the following options and looks like the following:
Following are the configuration details:
Following is the screenshot which shows the configuration window of the thread strategy:
Following are the configuration values of the window:
The burst strategy simulates a scenario where you suddenly have high traffic for some duration on an application. Let's see an example:
In a holiday season, some sites like Amazon give a user more response time than usual because the number of users will be more, similarly a university website at the time of graduation will work much slower than usual as the number of users will peak when the results are announced.
These types of tests are simulated by Burst Strategy. Let's have a look at its configuration window:
We have now gone through all four types of strategy for load generation using SoapUI. For more advance performance testing we can integrate SoapUI with LoadUI, we will see that in the following sections of this chapter.
Now we know how to generate load on any SOA application, let's see how to validate the response with the help of assertions.
Assertions can be added by clicking on the icon in the configuration window for each strategy:
We have the following types of assertions available in the Add Assertion panel in the SoapUI window:
This ends the section for assertion we have now gone through all kinds of load testing assertions which are available in SoapUI.