Code Templates

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" )

Important

The pipe character (|) is the caret's position after inserting the template.

To configure code templates:

  1. Click preferences-b.png 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 added manually, if necessary.

See Also

Publication date: