Interview Questions

How to Get and Set Settings ?

SoapUI FAQ


(Continued from previous question...)

How to Get and Set Settings ?

Global preferences can be set via the SoapUI.settings property, the different tabs have corresponding Settings interfaces in the com.eviware.soapui.settings package, each interface defines constants for each settings. So for example to set the SSL Keystore and password programmatically, you could call

01.import com.eviware.soapui.settings.SSLSettings
02.import com.eviware.soapui.SoapUI
03.
04.// set
05.SoapUI.settings.setString( SSLSettings.KEYSTORE, pathToKeystore )
06.SoapUI.settings.setString( SSLSettings.KEYSTORE_PASSWORD, keystorePassword ) 07.
08.// get
09.SoapUI.settings.getString( SSLSettings.KEYSTORE, "value to return if there is no such setting set" )

(Continued on next question...)

Other Interview Questions