Use values from the clipboard

Pasting values from the clipboard allows you to easily generate values for multiple XTestSteps. You don't have to fill out each XTestStepValue manually. Instead, you can simply paste the values directly from a message that you copied to the clipboard.

Furthermore, you can use this option to steer message elements that occur in multiple different messages. You can reuse the same OSV Module that contains these Module Attributes to quickly create all required XTestSteps and fill them with different values from various clipboard messages.

For the Paste from Clipboard option, your message must meet both of the following requirements:

  • The message type is XML, JSON, or text message.

  • The message contains some or all of the required Module Attributes.

When you paste from the clipboard, Tricentis Tosca inserts the values for the matching Module Attributes without changing the message structure or other nodes.

Paste values from your clipboard

To use Paste from Clipboard in your OSV Scenario, follow the steps below:

  1. Copy your message to the clipboard.

  1. In the OSV Module, define your Module Attributes.

  2. In the OSV Scenario, generate the XTestStepValues.

  1. Select the XTestStep whose values you want to edit.

  2. In the OSV menu, open the Auto fill Values drop-down and select From Clipboard.

Paste from clipboard

Tosca enters the values from the clipboard into the XTestStep. If an XTestStep contains XTestStepValues that have no match in the clipboard message, Tricentis Tosca leaves the value as is.

Reuse a Module with various clipboard messages

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

To do so, follow the steps below:

  1. Copy your message to the clipboard.

  1. Select the OSV Module that you want to use.

  2. Drag and drop the Module onto your Scenario. Tricentis Tosca automatically adds it to the Scenario as a new XTestStep.

Drag and drop an OSV Module

  1. Use Paste from Clipboard on the newly created XTestStep.

Example: paste values from a JSON message

This example shows how to replace existing values with new values from a JSON message on the clipboard.

The JSON message contains the message elements name and status. The XTestStep also contains these elements as XTestStepValues, but with different values.

When you use Paste from Clipboard, Tricentis Tosca enters the values from the clipboard message into the XTestStep. The Value column indicates the new values for name and status.

Clipboard message - XTestStep with values - XTestStep with new pasted values