Access ReadyAPI Preferences

Applies to ReadyAPI 3.52, last modified on April 25, 2024

You can modify ReadyAPI preferences from your groovy scripts. You can find the full list of available settings in ReadyAPI javadoc.

Where to use

You can use this script anywhere in ReadyAPI.

Example

The following script uses the SoapUI.settings property to set the keystore, and then posts the updated value to the log:

Groovy

// Import the packages required to work with ReadyAPI preferences.
import com.eviware.soapui.settings.SSLSettings
import com.eviware.soapui.SoapUI

// Set the "KeyStore" option.
SoapUI.settings.setString( SSLSettings.KEYSTORE, "C:\\Work\\" )

// Get the value of the KeyStore option and print it in the log.
def keystore =    SoapUI.settings.getString( SSLSettings.KEYSTORE, "value to return if this setting is empty" )
log.info(keystore)

See Also

Preferences
Groovy Scripting Samples
Scripting

Highlight search results