Ask a Question

[Resolved] Proxy setting as None through Groovy

Liberty_Informa
Regular Contributor

[Resolved] Proxy setting as None through Groovy

Hi

How can I set Proxy setting as 'None' in the global settings through the Groovy code ?

SoapUI.settings.setString( ProxySettings.AUTO_PROXY, 'None' )


I wrote above statement but I know it is not correct. I am not getting sufficient help from the API page.

What should be the correct statement to make Proxy Setting to set to "None" ?
Regards,
LIT

This post in no way reflect any Policies of Liberty Information Technology Ltd.
5 REPLIES 5
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

You can turn off proxy with the following code snippet:


import com.eviware.soapui.SoapUI
import com.eviware.soapui.settings.ProxySettings

log.info "PROXY OFF!"
SoapUI.settings.setString( ProxySettings.ENABLE_PROXY, "false")
SoapUI.updateProxyFromSettings();



Regards,
Marcus
SmartBear Support

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Liberty_Informa
Regular Contributor

That's brilliant !

SoapUI.updateProxyFromSettings();


Is above line necesary?

SoapUI.settings.setString( ProxySettings.ENABLE_PROXY, "false")


Merely having above line gives desired result.

I am asking because we do apply lot of other settings as part of the setup however we do not call any update method.
Regards,
LIT

This post in no way reflect any Policies of Liberty Information Technology Ltd.
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

SoapUI.updateProxyFromSettings()


Should only apply to the proxy, but if the proxy is being updated without calling that method then don't call it.


Regards,
Marcus
SmartBear Support

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Liberty_Informa
Regular Contributor

Thanks. Can you close this?
Regards,
LIT

This post in no way reflect any Policies of Liberty Information Technology Ltd.

Great..! This helped me a lot

cancel
Showing results for 
Search instead for 
Did you mean: