Proxy "selected requests" to my mock server

I have a wiremock server running in a remote server. I’m mocking some api’s(registering stubs via wiremock groovy client) before running my test cases, without chaning my application code how can i reroute my api’s to my remote wiremock server.

Is there any way I can proxy “only” those api requests to my mock server via katalon studio? what exactly is proxy preference in katalon studio? Can I use it somehow to achieve what I want?

1 Like

I believe, no, there isn’t.

You need to introduce a sort of “Reverse Proxy” in between the HTTP client (= Katalon Studio Test Case) and your target HTTP server.

Which product? I don’t know. I google-searched “Reverse proxy” and I found Nginx Reverse Proxy as a candidate. I remembers that I touched Squid years ago.

Or you could write a Java/Groovy code that performs exactly what you want.

Can I do that (introducing Reverse proxy) without changing my application code that is under testing?

Should I have to configure the proxy in the system(where Jenkins will run our testcases)

If you have a Proxy up and running outside Katralon Studio, you can configure Katalon Studio to talk to the proxy.

(The Proxy can run on another network node in your loca area network, or on your PC itself, it does not matter.)

Have a look at this.

https://docs.katalon.com/docs/get-started/set-up-your-workspace/katalon-studio-preferences/configure-proxy-preferences-in-katalon-studio

Possibly you want to configure “system proxy” to let your test script send HTTP request to the Proxy.

The “Authentication proxy” is something concerned about the licensing etc, which you would not be interested in.