07 November 2008 - 2.5-beta2 user guide blog eclipse intellij netbeans maven PDF files forums bugs sourceforge eviware.com


Eviware Logo

TestRequests

TestRequests are one of the main features you work with in soapUI. It extends standard requests with the possibility to add any number of Assertions that will be applied to the response received for the request. That is, you check that the reponse contains what you expect it to contain.

TestRequests are either created from standard requests using their "Add to Testcase" action or from the TestCase Editors popup menu with the "Insert Step -> Test Request" option (shown to the right), which will prompt for which Interface or Operation the request should be create for.

When you creat A TestCase A dialog will prompt to add certain standard assertions in order to make you Web Service Testing more Rapid

Add Request to TestCase dialog containing Standard Assertions

TestRequests are submitted either manually through their editors submit actions or when running the TestCase containing the request. The requests response is validated against a requests assertions and the requests icon changes to reflect the result of the validations; green means that all validations were ok, red means that some validations failed. A grey background icon indicates that the request has not yet been submitted for validation, a white background indicates that the TestRequest lacks assertions

TestRequest Actions

The following actions are available from the test-request nodes' right-button menu:
  • 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)
  • Change Operation - prompts to change the operation for this TestRequest (see below)
  • Select Operation - selects this TestRequests operation in the Navigator
  • Clone Assertions (soapUI Pro only) - prompts to clone assertions from this TestRequest to other TestRequests (see below)
  • Online Help - displays this page in a browser
Menu alternatives for TestRequests

TestRequest Details Tab

The "Details" tab shown in the bottom-left shows the same properties when a TestRequest node is selected in the navigation tree as for a standard request ( see the Request Details Tab for more detailed information) and adds two read-only properties:
  • Interface : the name of the Interface for this TestRequest
  • Operation : the name of the Operation for this TestRequest
TestRequest Details showing Interface and Operation

Change Operation

Selecting to change the operation for a TestRequest opens the following dialog:

The list of Interfaces displays those available in the current project, the list of Operations is updated accordingly.

The TestRequest Editor

Double-clicking a TestRequest in either the navigator or the TestCase Editor Pane opens the requests editor which is more or less a copy of the standard Request Editor with the following exception:

  • The second toolbar button "Add to Testcase" has been replaced with "Add Assertion" which prompts to add an assertion to the TestRequest
  • The clone action now clones the TestRequest and appends the cloned request to the containing TestCase
  • Under the request/response panes there is a now a tabbed pane containing 2 tabs; the "Assertions" tab and the "Request Log" tab (both described below).

All other editing, submittal, validation functionality is the same as in the request editor

The Assertions Tab

The Assertions tab lists the assertions that have been configured for the TestRequest. Double clicking an assertion in the list opens that assertions' configuration dialog (if available). Any number of assertions can be added, often it may be relevant to add the same type of assertion multiple times with different configurations.

A colored circle next to the assertion indicates the status of the assertion in regard to the last received response; red = assertion failed together with error messages, green = assertion ok, grey = assertion has not been performed.

The following actions are available from the assertion lists right-button menu:
  • Add Assertion - prompts to add a new assertion to the list.
  • Configure (if possible) - opens the selected assertions' configuration dialog.
  • Clone (if possible) - prompts to clone the select assertion.
  • Rename - prompts to rename the selected assertion.
  • Remove - prompts to remove the selected assertion.
Assertion Tab easy adding of assertion

The toolbar contains corresponding actions and a "Clone Assertions" action for cloning a number of assertions to other TestRequests (see below)

Clone Assertions

soapUI Pro contains a right-button or assertion toolbar action for cloning an arbitrary number of assertions to other TestRequests. The dialog shown is as follows:

Clone Assertions for Agile Web Service Testing

The options top-to-bottom are:

  • Assertions - select the assertions to be cloned
  • Target TestSteps - select the TestRequests to clone to
  • Target TestCase - the target TestCase
  • Target TestSuite - the target TestSuite
  • Target Project - the target Project
  • Overwrite - overwrites existing singular assertions (ie those assertions that can only exist once, for example SoapFault, SchemaCompliance, etc). If not selected and the corresponding assertions exist in the target TestStep(s), they will be ignored.
  • Open List - opens a separate window after the update containing a list of all Requests/TestRequests that have been modified during the clone procedure (useful for manual post processing).

Setting the desired options and selecting OK will clone as configured.

The Request Log Tab

The Request Log tab simply shows a history of submit/response times and response-sizes for the TestRequest. This can come in handy if you want to manually compare response times or sizes over time.
The Request Log Tab for Logging Web Service Tests

Request Result Viewer

When executing a Request Step from within a TestCase (or associated LoadTest) the actual request/result and associated properties for that request can be viewed by opening a "Request Result Viewer" either from the TestCase editors log list or from a LoadTest editors log by double-clicking the associated log entry. Sent or Received attachments are currently not saved to preserve memory.

The viewer shows 3 tabs:

  • Request Properties - shows request and reponse properties for the request
  • Request Message - shows the actual request message sent, including expanded properties, inline files and MTOM/XOP Includes..
  • Response Message - shows the response message received

Viewing a A Web Service response


Next: Web Service Assertions