Proxy Auto config (PAC) support by Katalon Studio 7.1.0 is incomplete

Once Katalon team mentioned that Katalon Studio 7.1.0 supported Proxy Auto config.

Katalon team stated

Please configure your system proxy to use PAC file, and configure Katalon to use system proxy.

OK, I will examine this change again. Let me report the result.

I thought that I should test if “Use system proxy configuration option” option works for the following 5 cases:

  1. After clean installation, Katalon Studio asks us to activate it. While Activation processing, Katalon Studio needs connection to the TestOps site on the Internet. My PC is behind the proxy. So I want to let KS make connection through proxy while I choose “Use system proxy configuration”. I mean, I want Katalon Studio to respect our PAC script for Activation.
  2. When I execute Reload Plugin, Katalon Studio needs connetin to the Katalon Plugin Store site on the Internet. Similary to the above, I want Katalon Studio to respect our PAC script for Reloading plugins as well.
  3. When I use the Spy Web tool to capture my Application Under Test with private IP address (e.g, 172.23.4.56), I want Web browsers started by Katalon Studio to respect our PAC script so that Spy Web tool can capture the http://172.23.4.56/ page.
  4. When my test case calls the standard WebUI.openBrowser('') statement to launch browser, I want the Web brower to respect our PAC script.
  5. When I want to test a AUT with private IP address and, at the same time, I want to integrate with TestOps, does it work?

Now, let me go into the research detail …

0. Environment

I use KS 7.1.0 on Windows10 PC behind the organization’s Proxy. The PC is configured to use Proxy Auto config (also known as PAC): See the following screenshot.

0_My_system_proxy_configuration

0. preparation

  1. I removed the folder where KS 7.1.0 has been installed.
  2. Also I removed the %USERPROFILE%\.katalon folder to make it clean
  3. I re-installed KS 7.1.0 from Katalon_Studio_Windows_64-7.1.0.zip

1. Activation while “Use system proxy configuration applied”

In the end, FAILED

After clean installation, I started Katalon Studio. I requested to go through “Activation” processing. As initial state KS has no proxy set, so I failed to activate it.
01_Activation_failed_because_no_proxy_is_configured

I clicked the ‘Configure Proxy’ link and chose “Use system proxy configuration”.
02_selected_Use_system_proxy_configuration_for_Activation

Having “Use system proxy configuration” applied, I tried to activate it again. — Failed. “Cannot connect to Katalon TestOps server” again.

I changed the proxy setting to apply “Manu Proxy configuration”
03_selected_Manual_proxy_configuration_for_Activation

Then I tried to activate it. — succeeded. KS could connect to Katalon TestOps server through the proxy.

04_succeded_connecting_to_TestOps_during_Activation

Conclusion: Katalon Studio does NOT respect the PAC script whiie it performs Activation processing.

2. Reloading plugins while “Use system proxy configuration applied”

In the end, FAILED

While having “NO PROXY” set, “Reloading plugins” processing encountered a prolems as follows.

It is easy to see, I need to let Katalon Studio to go through our organization’s proxy to reach to the Katalon Plugin Store on the internet.

Having “Use system proxy configuration”, “Reloading plugins…” has encounted the same problem again.

Having “Manual Proxy configuration”, it passed.

Conclusiton: Katalon Studio does NOT respect the PAC script whiie it performs Reloading plugins.

3. Spy Web tool while “Use systemproxy configuration applied”

In the end, SUCCEEDED. As the following screenshot shows:

4. Test Case calls WebUI.openBrowser(“http://172.23.4.56”)

In the end, SUCCEEDED. I think no more description required.

5. Test against the UAT with private IP address and TestOps integration

I did not test this case because I am sure this would not work. Why?

My test case script wants to open browser to navigate to a URL with private IP hostname (e.g http://172.23.4.56). In order to make it possible, I need to apply “Use system proxy configuration” to respect the PAC script.

On the other hand, as my research above shows, integration with TestOps requires “Manual proxy configuration”.

These 2 conditions contradict. Impossible to meet.

6 My guess

I guess …

Katalon Studio just asks Browsers to respect the PAC script. It is easy for browsers to do so because browsers are configured by you (or your administorators). But Katalon Studio itself is ignorant of PAC. KS does not interprete the PAC script in JavaScript at all. Katalon Studio can not respect the PAC script while Activation and Plugin reload.

7 workaound

When we do Activation and Plugin Reloading, we should change the Proxy setup of Katalon Studio to use “Manual proxy configuration”. This operation would not be required so often. When you upgrade KS, remember this tips.

I would usually use “Use system proxy confition” because I would test AUT on dev machines with private IP address quite often.

Just understand a bit of Katalon Studio internal, then you would be able to manage Proxy setups appropriately.

Hi @kazurayam,
Can you share with us your PAC file script ? By the way, I just want to know why you stated in the previous post that your PAC setup is respected by Katalon, but this time it isn’t? What scenarios did you try in your previous attempt? What is the difference between both times? Any provided information will help us much in troubleshooting the issue. Please also help to send us your log file.
Regards.

I am sorry, I can’t. It is not to be disclosed outside the organization.

I was wrong then. In the last research, I just tried one case : activating my test case to get access to the AUT with private IP address. I did not tried Activation and Plugin reloading then.

This time I checked if “PAC” is respected when I do Activation and Plugin relaoding. I found negative.

Hi @kazurayam,
Would you mind sending us your error log file?
Regards.

kslog.zip (11.2 KB)
full of Connection Timeouts.

In the previous time, I used my well trained PC with KS 7 installed long days ago.

Last Tuesday, I did a pair programming with one of my collegue at work who has NO Katalon Studio expericese. I told her how to download KS, install it, configure proxy with “Use system proxy configuration”. Then I encounted Activation and Plugin reload failed. — Why?!

So I made re-examined this again.

Hi @kazurayam,
We have re-checked proxy PAC file in Windows 10 environment and encounter no issues with activation and plugin reload. Please help to verify if your proxy PAC file is valid. You can do this by using Firefox and configure it to use system proxy, then access any sites and see if it works.
Regards.

I doubt it.

Please do clean install before reproduction.

I guess the content of the .katalon folder is significant to reproduce the problem.

Hi @kazurayam,
Of course, we performed the above steps but still not encountered any issues with activation and plugin reload. Have you tried checking your proxy configuration with Firefox as I have mentioned?
Regards.

Does Katalon Studio emit any log message when it gets access to and interpret the PAC script while Activation and Plugin reloading? How can I trace how Katalon Studio internally behaved for setting up Proxy in order to communicate with TestOps and Plugin Store? Does Katalon Studio has any execution mode for super verbose trace messages?

Hi @kazurayam,
Internally, we use ProxyVole library to detect system proxy. At the present, we don’t have any plan to support verbose log messages for the internal work of ProxyVole, although there is a way to achieve this. However, ProxyVole library provides a utility called ProxyVoleTester which will show the trace messages for how it detects proxy. Please refer to https://github.com/MarkusBernhardt/proxy-vole for more details. Moreover, it may help to know the strategy we use for searching system proxy is as the following order (if it is in Windows environment):

  1. Search proxy in operation system settings.
  2. Search proxy in Internet Explorer settings.
  3. Search proxy in Firefox settings.

I have ever struggled with ProxyVole library. I seem to remember I wasn’t very successful with it.

@kazurayam i think the proposal here is … from your side, try to make a working solution for your case, with or without the proposed libs, but katalon agnostic (just java stuff). based on that some decissions can be taken … up to now katalon team cannot publish the source code inside, you cannot publish yout script … mhmmm

@huynguyen

I want to read the most up-to-date source of Katalon Studio.
Please update the disclosed source cord repository:

Hi @kazurayam,
We will update the repository soon. Please stay tuned.
Regards.