Use Auto fill Values to generate XTestSteps

Once you have defined Module Attributes in your API TestCase, you can generate XTestStepValues. To do so, use the Auto fill Values feature that offers the following options:

Generate XTestStepValues

To generate XTestStepValues from default, follow the steps below:

  1. Define Module Attributes for your API TestCase. The corresponding XTestStep then contains all Module Attributes as initial, i.e. empty, XTestStepValues.

Initial XTestStepValues in a request message

  1. Select one of the following elements, to generate XTestStepValues:

    • An initial XTestStepValue to generate this particular XTestStepValue.

    • A XTestStep to generate all XTestStepValues that this XTestStep contains.

    • An API TestCase to generate all XTestStepValues that the TestCase contains.

  2. Click Auto fill Values in the API Testing menu to generate the XTestStepValues.

Select a TestCase to generate all XTestStepValues

The system generates the XTestStepValue(s) and enters the default value of the connected Module.

Generated XTestStepValues

Use Paste from Clipboard

Paste from Clipboard allows you to steer Module Attributes that occur in a variety of different messages. Rather than recreating XTestSteps and then filling out the values repeatedly, Paste from Clipboard lets you paste the required information directly from the clipboard.

The pasted message can be any message that contains some or all of the required Module Attributes. The system inserts the Module Attribute values, but leaves the structure and all other nodes intact.

Paste from Clipboard supports the following message types:

  • XML

  • JSON

  • Text messages

To use Paste from Clipboard in your API TestCase, follow the steps below:

  1. Define the Module Attributes that you want to steer.

API XTestStep with three Module Attributes

  1. Copy your XML, JSON, or text message to your clipboard.

    Clipboard message

  2. Select an XTestStep.

  3. In the API Testing menu, select From Clipboard from the Auto fill Values dropdown menu.

API Testing menu

The system enters the values from the clipboard message into the XTestStep.

If the original XTestStep contains XTestStepValues that are not in the clipboard message, the respective value is left as is.

TestStep values: Before and after

Reuse a Module with various clipboard messages

You can reuse the same Module to create multiple XTestSteps and fill them with different values from various clipboard messages.

To reuse your Module, drag and drop it onto your TestCase. The system creates a new XTestStep.

Add an XTestStep via drag and drop

Copy another XML, JSON, or text message to the clipboard and use Paste from Clipboard on the newly created XTestStep.