Saltear al contenido principal
Creating Load Tests In SoapUI

Creating Load Tests in SoapUI

  • Blog

After talking about creating Compliance Tests with SoapUI, my aim for this new post is to make an overview on how to create automated load tests using SoapUI. Please note that load testing can be seen as a DDOS attack in certain circumstances (if it has not been previously authorised) so please only load test services where you have gained permission to do so (this is the case when performing load tests from all applications, not just SoapUI).

  1. Use the above guide to create a Test Case that contains Test Steps that call a web service that you want to load test. Load tests are performed against the Test Steps in the Test Case, and test their ability to perform their normal functions under load. It is important to note that you can only create load tests on a Test Case level. This means that if you have various Test Steps in your Test Case, the load test will be performed against all of them.
  2. Right click on the Test Case and Select “New LoadTest”.
  3. The load test window will open. This is where you can decide the initial configuration of your load test.
  4. Choose the amount of threads (simultaneous users) that you want to use for the load test.
  5. Choose the load test strategy. Although you can only choose one test strategy per load test it is possible to combine these by creating two separate load tests with different strategies and running them simultaneously. The four types of load test available in SoapUI are:
    • Simple: A constant stream of requests sent to the web service.
    • Burst: Creates bursts of requests to the web service that last for a specified amount of time.
    • Thread: Ramps up the number of requests from a defined starting quantity to a defined ending quantity.
    • Variance: varies the amount of threads in what is described as a “sawtooth” manner, whereby the threads are ramped up and back down again to get peaks and troughs of threads over a sustained period.
  6. Choose the configuration specific to your test strategy (this will differ depending on the strategy that you have chosen).
  7. Select the way that you want to delimit your tests. This can either be done by setting a maximum amount of time, requests (runs), or runs per thread.
  8. Add assertions to your Load Test to define its expected results. As with functional test assertions, you can add as many as you like. There are different types depending on what you want to monitor:
    • Max Errors: Set the expected maximum amount of errors before test failure.
    • Step Average: Set an assertion that fails if you go over the allowed average step time.
    • Step TPS: An assertion based on the expected transactions per second.
    • Step Maximum: An assertion that fails if the test is over a defined Maximum time.
    • Step Status: Assert whether the test step passes or fails.
  9. Run the test manually. Load Test metrics will be gathered and displayed. It is possible to see graphs regarding the Statistics for the test run and Statistical history by clicking on these options. Any errors (such as timeouts) will be shown in the LoadTest Log.
  10. Once you have completed all of your tests, launch the LoadTest runner to test all of the load tests in your test suite. This can either be done via the GUI (right click on a load test and choose the appropriate option) or via command line (as described in this guide).

Written by David Creer

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Volver arriba