user1788294
user1788294

Reputation: 1893

Jmeter - Turn off "Keep Alive" option for all http sampler from one place

I am new to Jmeter. I have the .jmx file with around 50 http sampler. Each sampler has "Use KeepAlive" option turned on.

Question is how to turn off this option for each of 50 http samplers from one place.

Upvotes: 2

Views: 8447

Answers (2)

vins
vins

Reputation: 15390

To update your existing script you can follow the other Answer.

To prevent your HTTP sampler to have that option when you record, just disable the 'Use Keep Alive' in the recorder. So that you will not have that in the first place!!

enter image description here

Upvotes: 2

Dmitri T
Dmitri T

Reputation: 168092

For particular this situation you can open your .jmx file with your favorite text editor, locate the following line:

<boolProp name="HTTPSampler.use_keepalive">true</boolProp>

and change all occurrences to

<boolProp name="HTTPSampler.use_keepalive">false</boolProp>

For other options you can use HTTP Request Defaults feature which will automatically populate blank fields from defaults. Any HTTP Request local changes will override defaults.

Upvotes: 5

Related Questions