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


Eviware Logo

Run TestCase Step

The Run TestCase step allows you to run another TestCase from within the current one, optionally setting and retrieving TestCase properties to or from the target TestCase.

This can be useful for breaking down complex TestCases into smaller parts or sharing some common test functionality between TestCases.

After selecting the "Run TestCase" type when creating a new TestStep, the following dialog will be shown:

Running a test from another test - soapUI Run TestCase TestStep Dialog

Select the desired TestSuite and TestCase in the top combo boxes. The "Return Properties" list contains the TestCase properties defined for the selected target TestCase, select those properties whose values should be copied back to the Run TestCase step after execution.

The Run TestCase Editor

Once created, the Run TestCase editor will be opened, containing (top to bottom)

  • A toolbar with actions to run, cancel, configure and open the target TestCase
  • A table containing the same properties as the target TestCase. Only the property values are editable
  • A TestCase Log inspector showing the output of the last run

The Run TestCase Editor

Execution

When running the TestStep, the following happens:

  1. The properties containing values and not marked as return properties are copied to the target TestCase
  2. The target TestCase is run
  3. The properties marked as return properties are copied back from the target TestCase to the Run TestCase step
  4. If the target TestCase failed, so will the Run TestCase step.

The property handling in step 1 and 3 can be seen as input/output arguments for the target TestCase, allowing you to run it with different values. This could be combined with a surrounding DataSource for executing an entire TestCase with a range of input values.

After running, the TestCase log should contain the same output as would be seen in the TestCase log for the target TestCase:

Run TestCase with Log


Next: