Skip to main content

Posts

Showing posts from September, 2012

Avoiding the self imposed proxy trap in SoapUI....

Very quick one to get me in the blogging mood. So, you know when you work with API's across multiple environments using SoapUI. Depending on how your environments are structured you may need to switch proxies on or off. After quite a while watching my tests fall over through no fault of their own I decided to solve this annoying problem. Use the following as either a setup script or a groovy step, combined with a project level property containing the URL you want to address: import com.eviware.soapui.settings.* import com.eviware.soapui.SoapUI // set Proxy Dependent on Env def aPI_URL = context.expand( '${#Project#API_URL}' ) if (aPI_URL.contains("dev")){ SoapUI.settings.setBoolean(ProxySettings.ENABLE_PROXY,false); } else { SoapUI.settings.setBoolean(ProxySettings.ENABLE_PROXY,true); } Really simple implementation shown here but it has changed the repeatibility of my tests completely. I have used similar implementations to switch within tests, dependant on which service I&#…