How to set the value of “hostNameAliases” in Gatling

29 Views Asked by At

I’ve been using Gatling for 4-5 months and I’m a bit stuck with what seems to be a simple problem. I’m new to scala.

hostNameAliases is not applied

I’m debugging the script through a fiddler. In the fiddler, I brought out a new column with the IP. But in this column, I do not observe that the value from the “hostNameAliases” parameter is substituted in the IP enter image description here

Code in Gatling

  val httpProtocolWeb: HttpProtocolBuilder = http
    .hostNameAliases(Map("test.com" -> List("333.333.33.33")))
    .baseUrl("https://test.com")
    .acceptHeader("*/*")
    .acceptEncodingHeader("gzip, deflate, br")
    .acceptLanguageHeader("ru,en;q=0.9")
    .header("referer", "https://test.com")
    .check(status.in(200,204))

I use a valid IP. I specified 333… as an example

I see the real IP test.com in fiddler (test.com - as an example)

But since I set the “hostNameAliases” parameter, I should see its value, but unfortunately I don’t see it In netstat I don't see the IP either

0

There are 0 best solutions below