Code Templates

Applies to ReadyAPI 3.56, last modified on October 29, 2024

Code templates are macros you can use in any editor when you need to quickly add a block of code. You can configure code templates and activate them by typing the corresponding template ID and pressing Ctrl+Shift+Space in your editor.

Below are two sample code templates:

ID Code
grut

Groovy

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
xhre

Groovy

def holder = groovyUtils.getXmlHolder( "|#Response" )
The pipe character (|) is the position of the caret after inserting the template.

To configure code templates:

  1. Click on the ReadyAPI toolbar.

  2. Select the Code Templates tab in the left part of the ReadyAPI Preferences window and configure the necessary options.

The available options and their descriptions are in the table below.

Option Description
Add Add a new token.
Delete Remove a token.
Restore Restore the predefined tokens and remove those that were added manually, if necessary.

See Also

Script Editors
Preferences

Highlight search results