soapUI 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, or 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 | Run TestCase Step | Runs another TestCase from within an existing one | 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 | DataSink Step | Writes properties to an external storage - soapUI pro only | MockResponse Step | Waits/Listens for an incoming SOAP Request that can be validated and return a mock response - soapUI pro only |
|  |
In soapUI Pro you have additional powerful TestSteps. For example, you can connect your test to a database to feed your Web Service Tests.
soapUI Pro contains productivity enhancements as well as offers Professional World Class support.
TestCase Actions
The following actions are available from the TestCase nodes' right-button menu:
- Show TestCase Editor - opens the TestCase Editor described below
- Disable/Enable TestCase - disables or enables the TestCase
- 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
- Launch Runner - open the Launch dialog for the soapUI TestCaseRunner
- 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
|  |
TestCase 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 property-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
Doubleclicking a TestCase node in the navigator or selecting its Open TestCase Editor menu option
opens the TestCase editor, which let's you edit and run TestCases. 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):
- A toolbar for running or cancelling and setting options
- A progress bar showing TestCase status and progress
- A number of tabs for the TestCase;
- A number of Inspectors for the TestCase (left to right):
- Description : an arbitrary description for the TestCase
- Properties : TestCase properties
- Setup Script : A Groovy script to run when the TestCase is run
- TearDown Script : A Groovy script to run when the TestCase finishes
- The TestCase Log for viewing/exporting results: the following entries are displayed:
- 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 TestCase Editor Toolbar
The main toolbar contains the following actions (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
The TestStep List
The TestSteps tab contains a list of the currently configured TestSteps for this TestCase.
Double-clicking a TestStep in the list opens that items editor view. Right-clicking a TestStep shows a popup-menu
with the following actions:
- Open Editor - opens the associated TestStep editor (if available)
- Disable/Enable TestStep - disables or 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
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 for property values without step specifications
(see Property Expansion), check all steps
before the current one for the named property.
- Session : Controls if a HTTP Session is to maintained for all requests
in the TestCase. Selecting this will reuse cookies, authentication headers, etc
- Abort on error : Controls if the TestCase is to be canceled when a TestStep fails with an error,
(for example if a contained RequestStep has failed assertions)
- Fail TestCase on Error : 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 successful TestStep results which will save substantial amounts of memory.
- Socket timeout : The timeout (in milliseconds) to be used for all requests in the TestCase
- TestCase timeout : The timeout (in milliseconds) to wait before canceling or failing a running 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 Test 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:

TestCase Coverage
TestCase Coverage is an Unique Functionality for soapUI (soapUI Pro only) that allows you to see how much of the Web Services
are being covered by you tests. In everyday work this let's you improve your test by adding assertions for uncovered elements
as well as shows which elements are unused in your test cases.
The TestCase Coverage tab contains the same Coverage information as available in the TestSuite and Project
Coverage Panels. Enabling Coverage and running the TestCase will dynamically calculate/update the messages
exchanged during the tests and add their Coverage information to the Coverage Panel. See the
Project Coverage document for details.

TestCase Requirements
The TestCase Requirements tab contains the same Requirements Panel as seen on the Project Viewer, but only
those Requirements that are dependant on this TestCase.

Adding a new Requirement will automatically add the
current TestCase to that requirements TestCase List. Also, a specialized "Link TestCase" option is available from
the Requirements Toolbar for linking the TestCase to existing Requirements:

Next:
Web Service functional Testing- Working with TestRequests