Hi all,
firstly - big thanks to the Gatling team for creating this awesome tool.
I have one problem: I’m using caching for getting static resources. Example request:
exec(http("Get static files").get("https://<domain>/<path-to-file>/style.css"))
For each of them in reports I’m getting name: e.g. “style.css Redirect 1” instead of “Get static files”. What may be the cause of it?
The response is 301 - Removed permanently, but URI of these static files didn’t changed.
Thank you all in advance,
Matthew
PS: I’m using 2.2.2 version of Gatling. The same problem occurs with ver 2.2.3.
Could you provide a reproducer please?
Thank you for your interest.
Example parts of classes:
`
def loadStaticResources() = http(“Get static files”)
.get(“https:////bootstrap.min.css”)
.resources(
http(“Get static files”).get(“https:////style.css”) // without any cache headers - so automatically resources are cached
)
val myStep = scenario(“My step of scenario”)
.exec(doSomething)
.resources(
loadStaticResources())
val myScenario = scenario(“My scenario”)
.forever(
exec(flushHttpCache)
.exec(myStep))
val myLoadProfile: InjectionStep = rampUsers(10).over(3 minutes)
val myHttpProtocol = http
.baseURL()
.inferHtmlResources()
.acceptHeader(“application/json, text/plain, /”)
.acceptLanguageHeader(“en,en-US;q=0.8,pl;q=0.6”)
.userAgentHeader(“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36”)
.disableWarmUp
.maxConnectionsPerHostLikeIE10
setUp(
MyScenarios.myScenario.inject(myLoadProfile)
).protocols(myHttpProtocol)
.maxDuration(10 minutes)
`
In reports in “Requests” column I’m getting names: e.g. “style.css Redirect 1” instead of “Get static files”.
I can’t provide whole code. Is it enough for you?
W dniu wtorek, 24 stycznia 2017 17:04:16 UTC+1 użytkownik Stéphane Landelle napisał:
Sorry, but I can’t do anything without a full sample that I can run.