Setting a field value

By using the Value tab, you can change the value of the selected field.

Various actions can be performed on this field, which are available in the Action Type menu. See Action types for more information.

The simplest type of action is to provide a value. Enter the value manually into the edit box, paste it from the clipboard, or select Open Field Value from the menu (described in Common menu).

The File action populates the contents of the field with the contents of a selected file.

To select a file, click Browse next to the File field and locate the wanted file.

By using the Function action, you can configure an HCL OneTest™ API function (including custom functions) to be executed. The result of the function is used as the field value. Right-click in the editor to select the function and tags wanted, as shown.

If Decrement or Increment is selected, the editor changes slightly, as shown.

Initial Value is the numeric value that the field takes when the message is first sent.

Step Value is the amount by which the value is increased or decreased on each subsequent iteration.

If wanted, you can reset the field to its original value after some number of iterations. Tick the box under Reset and enter the wanted number of iterations in the field provided.

When you are using the List action, HCL OneTest API treats each entry in the specified input as a separate value. Values can be separated by using any of the available delimiters – new line, comma, tab, or full stop.

The first time the message is sent, the field is set to the first value. For each subsequent iteration, the next value in the sequence will be used.

If a message is published more times than the number of available values, the cycle starts from the first value again.

To reset the action and restart from the first value, tick the box under Reset and enter the wanted number of iterations in the field provided.

The Null action simply clears the contents of the field, setting its value to null. There are no further options or properties to configure for this action.

Feedback