26 September 2007 - 1.7.6 |
soapUI 1.5 introduces fairly powerfull loadtesting functionality allowing you to:
Here we will continue from the Functional TestCase created in the previous "Getting Started" document. Start by creating a LoadTest for the created TestCase using its "New LoadTest" popup menu option. The opened LoadTest Editor should be something like the following (depending on which steps you created in your TestCase):
The LoadTest is preconfigured to run for 60 seconds (top right) with 5 threads using the Simple LoadStrategy. Modify these values as desired (read more about LoadTest Configuration) and run the test. You will see the statistics table in the middle beginning collecting data and after 60 seconds should have a finished LoadTest as follows (read more about LoadTest Execution):
soapUI allows you to add LoadTest Assertions to LoadTests just as to Functional TestSteps. When creating a LoadTest, soapUI will always add a TestStep Status Assertion for us, we will add a TestStep Max Assertion to validate that our TestCase never exceeds a certain exection time.
Select the "LoadTest Assertions" tab at the bottom of the LoadTest Editor and press the displayed "Add Assertion" button. Select the "Step Maximum" assertion and configure it as follows in the displayed dialog:
The Step Maximum assertion checks that a steps max-time does not exceed a specified value.
| ![]() |
Now running the loadtest might give you a result like to following where the TestCase 5 times exceeded the limit of 500ms and failed the LoadTest.
You can double-click an assertion failure in the log and view the actual request that failed, allowing you to debug the request/response message, etc.. Double-clicking one of the errors above shows the following: