Multiple subdomains/protocols with a single httpConfig


The website I am attempting to test is written such that there are multiple subdomains for a single “environment”. I would like to use one httpConfig per environment (one for live, one for stage, one for dev, etc.) but as far as I can tell setting the baseUrl sticks the scenario to a single domain/subdomain/protocol. Similarly, some of the site uses HTTP, and some HTTPS, which has the exact same problem.

So is there a way to set a particular domain (just “”) in the httpConfig and then have the subdomain (“mail”) and protocol (“HTTPS”) set in the HTTP request?


No. You’ll have to define absolute urls. Still, you can define your roots in one single place and simply concatenate.

Sorry a necro a little, but I had a related question. I’m having trouble with the site cookies. After going through the authentication process for the site, I dumped the cookies to the console and it looks like the cookie I want is correctly being stored, but it also looks like it’s being associated with the authentication subdomain, and is therefor not showing up in the rest of the application. Is there a way of setting the cookie path to the entire domain, or else manually duplicating the cookie to the rest of the subdomains?

Thank you.

Which version of Gatling do you use?
We’ve fixed a lot of issues related to cookies and those fixes are not shipped in 2M3a. If you’re with Gatling 2, please try latest snapshot:

Upgrading is mostly:

  • remove bootstrap._ and assertions._
  • Headers.Names became HeaderNames. same thing for Headers.Values
  • ramp(x users) became rampUsers(x), same thing for usersPerSec

I am using 1.5.5. Isn’t that the latest binary available?

That’s the latest from the Gatling 1 series.
So what’s your problem with your cookies exactly?
Is Gatling’s behavior different from what you experience with a regular browser?
If so, what does the Set-Cookie response header look like?

Nevermind, I figured it out, it was an issue in the way I was exercising the application. The cookie was to be set on a different call that I wasn’t making. Thank you.

Glad to hear.
Thanks for your feedback!