Java - Gatling skipping an request during execution.

78 views
Skip to first unread message

Bharath Marrivada

unread,
Feb 15, 2022, 9:32:27 AM2/15/22
to Gatling User Group
Hello All,

I am just trying to understand request names and the way they get displayed in the HTML report. Following is the sample code & test results, the request highlighted in RED is getting skipped. May I know why the request request_1.1 is not getting executed?

---------------------
Sample code
-----------------------
private HttpProtocolBuilder httpProtocol = http
.baseUrl("https://gatling.io")
.acceptHeader("image/avif,image/webp,*/*")
.acceptEncodingHeader("gzip, deflate")
.acceptLanguageHeader("en-US,en;q=0.5")
.userAgentHeader("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0");

private ScenarioBuilder scn = scenario("gatling")
.exec(
http("request_0")
.get("/")
)
.exec(
http("request_1")
.get("/wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js?ao_version=2.9.5")
)

.exec(
http("request_1.1")
.get("/wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js?ao_version=2.9.5")
);



{
setUp(scn.injectOpen(atOnceUsers(1))).protocols(httpProtocol);
}

-----------------
Report
-----------------
================================================================================
2022-02-15 19:48:34                                           0s elapsed
---- Requests ------------------------------------------------------------------
> Global                                                   (OK=2      KO=0     )
> request_0                                                (OK=1      KO=0     )
> request_1                                                (OK=1      KO=0     )

---- gatling -------------------------------------------------------------------
[##########################################################################]100%
          waiting: 0      / active: 0      / done: 1    
================================================================================

Regards,
Bharath.

Stéphane LANDELLE

unread,
Feb 15, 2022, 9:54:26 AM2/15/22
to gat...@googlegroups.com
Gatling skips this request by default, just like a browser would too, because it's cached.

--

Stéphane Landelle

Chief Technical Officer

   

slan...@gatling.io
gatling.io
   
facebook twitter linkedin 


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/7338d45b-b9ad-4619-ac36-de81b6e101a6n%40googlegroups.com.

Bharath Marrivada

unread,
Feb 15, 2022, 9:59:01 AM2/15/22
to Gatling User Group
Thank you, Stephan.
Reply all
Reply to author
Forward
0 new messages