Problem :
I was looking why my multipart header was not sent when suddendly, JMeter sends my POST HTTP request in a raw format.
Although I have in my GUI HTTP Request sampler a normal list of parameters : param1=value1, etc..., it sends
param1param2
Solution :
No solution on google, but it was "simple" : in my default HTTP Request, I changed the sheet "parameters" to "body data", even if the both was empty it was sufficient to invite chaos...
The first problem was that my Multipartform-data header was not sent : because a default one was set on default HTTP Header...
End of day....
Problem :
I have two thread groups that must be synchronized. I want to use
java.util.concurrent.CountDownLatch
to achieve this.
I read (here, or here) how to synchronize JMeter thread groups (you have to use properties and not variables). Properties can be access in :
- bsh sampler : bsh.shared.<property name>
- jsr223 sample : props.put(<property name>)
- the org/apache/jmeter/util/JMeterUtils.class is the source of these properties.
I add to my test plan an initial element in bsh, jsr223 to create the latch. But when I get the latch in the thread groups, I always had different instance of my shared latch.
Solution :
Easy when we know.
I made the mistake to add the piece of code in a Pre-Processor
- Test Plan
- PreProcessor BSH : init latch
- Thread Group 1
- Sampler BSH : wait for latch
- Thread Group 2
- Sampler BSH : count down latch
In this case, the PreProcessor is run before each thread initialization. I run X times the preprocess sample.
Correct test plan :
- Test Plan
- Set up Thread Group
- Thread Group 1
- Sampler BSH : wait for latch
- Thread Group 2
- Sampler BSH : count down latch
The setup Thread Group is run before the others thread groups (these ones are parallel until you say not to do)