06 August 2007 - 1.7.5 | home user-guide eclipse jbossws intellij netbeans maven 1.X/2.X PDF files forums bugs sourceforge

Home
Getting Started

- Functional Tests
- Load Tests
- Mocking
- Sample Project

User Guide

- Overview
  - Tabbed Desktop
  - License Management
  - Preferences
  - XPath Selection
  - Script Library
- Workspaces
- Projects
- Interfaces
  - Interface Viewer
- Operations
- Working with Requests
  - Form Editor
  - Outline Editor
  - Message Inspectors
  - Attachments/Inline Files
- Functional Testing
  - Getting Started
  - TestSuites
  - TestCases
    - Test Requests
      - Assertions
      - Editor Wizards
    - Property Transfers
    - Conditional Gotos
    - Groovy Scripts
      - Examples
      - GroovyUtils
    - Properties Step
    - Delay Step
    - Mock Response
    - DataSource
    - DataSource Loop
  - Property Expansion
- Load Testing
  - Getting Started
  - Limit & Strategies
  - Execution
  - Assertions
  - Diagrams
  - JMeter comparison
- Mocking
  - Getting Started
  - Mock Services
  - Mock Operations
  - Mock Responses
- Usage Scenarios
  - Data-Driven Testing
  - Template-Driven Testing
  - Interactive Testing
  - Surveillance Testing
- Tool Integrations
  - Code Generation
  - WSDL Generation
  - WS-I Tools
  - Apache Tcp-Mon
- CommandLine Tools
  - TestCaseRunner
  - LoadTestRunner
  - MockServiceRunner
  - ToolRunner
- Keyboard shortcuts

IDE/Tool Plugins
Search soapUI site
Project Documentation

- About soapUI
- Project Info
- Project Reports

## Getting Started with Load Testing

soapUI 1.5 introduces fairly powerfull loadtesting functionality allowing you to:

- Validate a web servics performance under different Load scenarios
- Maintain Functional validations to see that they dont "break" under load
- Run several load-tests simultaneously to see how they affect each othter

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):

### Add Assertions

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. Name - the name of the assertion, leavt it for now Minmum Requests - the minimum number of runs that must have been executed before applying this assertion. We will allow the first 10 TestCase runs to pass. Max Time - the maximum allowed step time, we set it to 500 ms Max Errors - the maximum number of errors to allow before cancelling the LoadTest, we will allow 5 "breaches" of the 500ms limit before the LoadTest should fail TestStep - the target step to assert. We select the request in our TestCase |

### Run again!

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:

### Now What?

Try playing around with the different LoadTest Strategies, Diagrams, etc..

Next: Getting Started with Mocking