I’m currently trying to put together a PoC for Gatling at my current client, for some API testing. I’ve run into a bit of a roadblock.
I am using Gatling 2.3.1
Our environment for scripting requires us to use a PAC file when running from our local machines. This is because the scripts need to run against more than one service, accessible from our local machines via different proxies. This will not be the case when running actual load tests, as the injectors will be located differently.
Current test scripts (LoadRunner) can be replayed fine from local machines as Vugen supports using a PAC file for replay.
Given Gatling does not currently support specifying a PAC file (unfortunately), I found a suggestion to use a little utility called “pacproxy” (https://github.com/williambailey/pacproxy), which fires up a local proxy server and routes requests using the correct proxy from the pac file:.
This is working to an extent, in that I am able to hit two different back-end services with GET requests, each getting routed by pacproxy via the correct proxy.
Something weird is happening for POST requests - the replay in Gatling ALWAYS ends in a 60s timeout exception - although the correct response is visible in the log.
j.u.c.TimeoutException: Request timeout to localhost/127.0.0.1:8080 after 60000 ms
I tried changing the method from GET to POST for one of the working methods, and again, this gives a timeout after 60s.
I have an existing LoadRunner script which models the same calls, and this runs fine when pointing to that local proxy. Similarly, the POST request works fine in a standalone script where Gatling is configured to call the back-end via the eventual proxy from the PAC file.
Any suggestions as to why this 60s timeout could be occurring?
It does appear that the pacproxy app is working fine, given that I can replay an equivalent LoadRunner script against pacproxy, with the POST requests working without any delay.
All I can think is that something is different in the way that Gatling is handling the interaction with this particular proxy? No idea why it’s different for GET/POST requests? Maybe there is some config setting which will make this all ok?
It would be great for Gatling to support PAC files in future, since this is supported by another tool (LoadRunner), as not supporting this could prevent uptake. I did take a look at Gatling 3 but it doesn’t appear that this support is available there.
Thanks in advance!