Configure Proxy Preferences in Katalon Studio
In Katalon Studio, there are two proxy categories: Authentication and System proxies. You can apply different proxy configurations for connecting to the Katalon server and your servers during testing.
Authentication proxy configurations: used for authenticating with Katalon Authentication servers. This affects account authentication, Katalon TestOps, TestCloud, Store integration, the Katalon auto-updater, WebDriver auto-updater, sample projects providers, and more.
System proxy configurations: applies to other network connections generated when using Katalon Studio, including but not limited to recording, spying, executing tests, integrating with other tools, and downloading Web Drivers or Android SDK.
Proxy configuration options
In both the Authentication and System Proxy options, select one of the three options below.
- No proxy: Connect directly without proxy.
- Use system proxy configuration: Katalon Studio guesses which proxy server your system is behind by checking Java, browser and operating system settings, and environment variables.
- Manual proxy configuration: Manually set up your proxy with the following settings:
- Address: A Proxy server host.
- Port: A Proxy server port.
- Excludes: A list of addresses separated by commas. Enter the beginning or the ending of the address in the list (for example, 192.168.*,*.katalon.com).Note:
- Katalon Studio only supports proxy exceptions in web recorder and spy utilities with Chrome and Firefox.
Use desired capabilities to set different proxy settings
If you want to configure different proxy settings depending on your projects, you can use Desired Capabilities as follows:
Override proxy details in the test script
Katalon Studio supports an option to pass proxy details via a request object in Web Service testing.
- The proxy information passed in the request object overrides the proxy information in Proxy Preferences.
RequestObject requestObject = findTestObject("google")
ProxyInformation proxyInfo = new ProxyInformation();
proxyInfo.setProxyServerAddress("localhost")
proxyInfo.setProxyServerPort(8001)
proxyInfo.setProxyOption(ProxyOption.MANUAL_CONFIG.toString())
proxyInfo.setProxyServerType(ProxyServerType.HTTP.toString())
requestObject.setProxy(proxyInfo)
Another workaround to override proxy details in script mode is to get your current proxy format, then pass your new proxy information in.
See the example below:
import com.google.gson.Gson
import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.network.ProxyInformation
import com.kms.katalon.core.network.ProxyOption
// Get current proxy information
ProxyInformation proxy = RunConfiguration.getProxyInformation()
println(proxy)
// Switch proxy
proxy.setProxyOption(ProxyOption.MANUAL_CONFIG.name())
proxy.setProxyServerAddress("127.0.0.1")
proxy.setProxyServerPort(8082)
Map<String, Object> generalProperties = RunConfiguration.getExecutionGeneralProperties();
generalProperties.put(RunConfiguration.PROXY_PROPERTY, new Gson().toJson(proxy));
println proxy
// Switch back to no_proxy
proxy.setProxyOption(ProxyOption.NO_PROXY.name())
proxy.setProxyServerAddress("")
proxy.setProxyServerPort(0)
Map<String, Object> generalProperties = RunConfiguration.getExecutionGeneralProperties(); generalProperties.put(RunConfiguration.PROXY_PROPERTY, new Gson().toJson(proxy));
println proxy