Java - ScenarioBuilder - Can I use a "group" function?

80 views
Skip to first unread message

Bharath Marrivada

unread,
Feb 15, 2022, 12:48:46 PM2/15/22
to Gatling User Group
Hello Stephan,

I am able to use the "group" function in the ChainBuilder, but when I use it in the ScenarioBuilder it is giving an error. Following is the sample code with and without "group" functions. Please help me in fixing it.

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


-----With "Group"-----
private ScenarioBuilder scn = scenario("gatling")
.exec(
http("request_0")
.get("/")
.headers(headers_0)
)
.group("group").on(
.exec(
http("request_0")
.get("/")
.headers(headers_0)
)
.exec(
http("request_1")
.get("/wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js?ao_version=2.9.5")
.headers(headers_1)
));

Regards,
Bharath.

Stéphane LANDELLE

unread,
Feb 15, 2022, 1:19:08 PM2/15/22
to gat...@googlegroups.com
group("group").on(
.exec( <==== why do you put a dot here?
--

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/85080b95-ac79-4ac0-a55a-efc0cd59bdbdn%40googlegroups.com.

Bharath Marrivada

unread,
Feb 15, 2022, 1:51:19 PM2/15/22
to Gatling User Group
Thank Stephan, got it.
Reply all
Reply to author
Forward
0 new messages