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

## TestCases

soapUI supports functional testing of web services by providing a TestCase metaphor where a number of TestSteps can be executed in sequence. Also, an arbitrary number of LoadTests can be associated with a TestCase for running the TestCase under different load scenarios.

Each TestStep in a TestCase exposes a number of properties which can be read/written/modified by other TestSteps, for example a Groovy Script step can read the "response" property of a Request Step and take some action depending on its value, see Property Expansion for details and examples.

### TestStep Types

Currently the following types of steps are available;

Step Type | Short Description
--- | ---
Request | Sends a SOAP request and allows the response to be validated using a variety of assertions.
Property Transfer | Used for transferring property values between two test steps.
Groovy Script | Runs a Groovy script that can do more or less "anything".
Properties | Used for defining global properties that can be read from an external source.
Conditional Goto | Allows any number of conditional jumps in the testcase execution path. Conditions are specified as xpath expression and applied to the previous request steps response.
Delay Step | Pauses a TestCase run for the specified number of milliseconds
DataSource Step | Reads external data to be used as input to requests, etc - soapUI pro only
DataSourceLoop Step | Used together with a DataSource to specify looping for external data rows - soapUI pro only
MockResponse Step | Waits/Listens for an incoming SOAP Request that can be validated and return a mock response - soapUI pro only

### TestCase Actions

The following actions are available from the TestCase nodes' right-button menu: Show TestCase Editor - opens the TestCase Editor described below Options - show the TestCase Options dialog described below Add Step -> - adds a new TestStep to the TestCase New LoadTest - prompts to create a new LoadTest for the TestCase Clone TestCase (see below) - prompts to clone the entire TestCase, optionally into another TestSuite Clone TestSteps (soapUI Pro only, see below) - prompts to clone a number of TestSteps, optionally into another TestSuite Clear - prompts to remove all TestSteps from the TestCase Rename - prompts to rename the TestCase Remove - prompts to remove the TestCase from its TestSuite Move TestCase Up - moves the current TestCase up in the list of TestCases Move TestCase Down - moves the current TestCase down in the list of TestCases Online Help - Displays this page in an external browser |

### TestSuite Details Tab

The "Details" tab shown in the bottom-left shows the following values when the TestCase node is selected in the navigation tree Name : the name of the current TestCase |

### Clone TestCase

Selecting to clone a TestCase from the TestCase menu displays the following dialog:

If selecting to clone to another project, soapUI will prompt to clone required interfaces to that project as well.

### Clone TestSteps (soapUI Pro only)

Selecting to clone TestSteps from the TestCase menu displays the following dialog:

The selected steps will maintain references to each-other (for example via propert-transfers) after the clone, but be sure that the target TestCase contains no TestSteps that have names same as those being cloned (in which case the cloned steps will be prompted to be renamed).

If selecting to clone to another project, soapUI will prompt to clone required interfaces to that project as well.

### The TestCase Editor

Double-clicking a TestCase node in the navigator or selecting its Open TestCase Editor menu option opens the TestCase editor/runner. If the TestCase is currently being load-tested the editor will be mostly disabled.

The editor is divided into the following 4 parts (from top to bottom):

1. A toolbar at the top containing the following actions (from left to right) Run TestCase - runs the testcase (see below) Cancel TestCase - cancels a running TestCase Run Continuously - toggles if the TestCase is to be run continuously When selected, the TestCase will run repeatedly until cancelled with the Cancel TestCase button TestCase Credentials - prompts to set the credentials to be used by all requests in the TestCase. This is useful if you want to run your tests with different credentials TestCase Endpoint - prompts to set the endpoint to be used by all requests in the TestCase. This is useful if you want to run your tests against different servers, etc. The available URL's are collected from the test-requests' operations' interfaces. The selected endpoint is assigned to each request in the TestCase TestCase Options - opens the TestCase Options dialog described below Create Report (soapUI Pro only) : Exports a HTML Report for the last TestSuite run (see below) Online Help - Displays this page in an external browser 2. A progress indicator showing how far a TestCase run has proceeded 3. A "TestSteps" tab showing the TestSteps that this TestCase contains. Double-clicking an item in the list opens that items editor view. Right-clicking an item shows a popup-menu with the following actions: Open Editor - opens the associated TestStep editor (if available) Disable/Enable TestStep - disables/enables the TestStep for execution Insert Step -> - shows a list of insertable test-steps at the current position Rename - prompts to rename the selected step Delete - prompts to delete the selected step Clone TestStep - prompts to clone the selected step (see below) Move Step Up - moves the selected step up one position in the list (this can also be performed with Ctrl-Up) Move Step Down - moves the selected step down one position in the list (this can also be performed with Ctrl-Down) Step specific actions - depends on which type of TestStep that is selected Online Help - displays this page in a browser Append Step -> - shows a list of appendable TestStep types for the TestCase |

4. A "TestLog" list showing log-information when running the TestCase:

- When the TestCase started
- An entry for each executed TestStep specifying how long it took
- Optional errors and/or messages reported by each TestStep
- How long the TestCase took

The "Description" tab contains a single text area for arbitrary documentation for this TestCase

Double-clicking a TestSteps' entry in the log opens a TestStep result viewer for that step if available and as described on each TestStep documentation page (for example the Request Result Viewer).

### TestCase Options

Selecting TestCase Options from either a TestCase nodes popup menu in the navigator or from the TestCase Editors toolbar opens a dialog with the following options.

- Search Properties : When looking för property values without step-specifications (see Property Expansion), check all steps before the current one for the named property.
- Maintain HTTP Session : Controls if a HTTP Session is to maintained for all requests in the TestCase. Selecting this will reuse cookies, authentication headers, etc
- Fail on error : Controls if the TestCase is to be cancelled when a TestStep fails with an error, (for example if a contained RequestStep has failed assertions)
- Fail TestCase if it has failed TestSteps : Controls if the TestCase is to fail if it the "Fail on error" option is not selected and the TestCase ends with one or more TestStep.
- Discard OK Results : Long-running testcases will eventually consume substantial amount of memory since all teststep results are internally cached for later viewing/reporting. Checking this option will make soapUI only save non-successfull teststep results which will save substantial amounts of memory.
- Socket timeout : The timeout (in milliseconds) to be used for all requests in the TestCase

### Clone TestStep

Selecting to clone a TestStep from a TestSteps menu displays the following dialog:

If selecting to clone to another project, soapUI will prompt to clone the required interface to that project as well if not available.

### Generating Reports

soapUI Pro supports the generation of reports from within the TestCAse editor. The reports show a summary of all the executed TestCase and diagnostic information for failed assertions.

Selecting the "Create Report" button in toolbar opens the following dialog for exporting the last results to an HTML report:

After specifying the output folder and format, the report will be created and opened in an external browser:

Next: Working with TestRequests