Forum Discussion

Happy's avatar
Happy
Contributor
9 years ago

How to use relative path for keystore (WS-Security Configuration)

 Hello,   I use .p12 keystore for tests in SoapUI Pro. I add keystore and absolute path set automatically. (locally test works fine) But when I run test on Jenkins I get error - No such file or di...
  • Happy's avatar
    Happy
    9 years ago

    I set the SSL Keystore and password programmatically

    import com.eviware.soapui.settings.SSLSettings
    import com.eviware.soapui.SoapUI 
    
    // set
    SoapUI.settings.setString( SSLSettings.KEYSTORE, pathToKeystore )
    SoapUI.settings.setString( SSLSettings.KEYSTORE_PASSWORD, keystorePassword )
    
    // get
    SoapUI.settings.getString( SSLSettings.KEYSTORE, "value to return if there is no such setting set" )

    https://www.soapui.org/scripting-properties/tips-tricks.html