I'm having trouble with the If Controller in jMeter.
I have a thread group. Inside the thread group is a loop controller. Each time the loop executes, it runs an HTTP sampler.
I want to trigger the If Controller based on the response of this sampler.
However, the If Controller only seems to trigger if it contains another sampler.
But I don't want it to contain a sampler. The steps to be executed when it triggers are a JSON Path Extractor and a Beanshell PostProcessor. These are used to extract part of the JSON in the response from the existing sampler and then use this value to update a shared hashmap in the Beanshell PostProcessor. But they won't run without a sampler present inside the If Controller. And if I put a sampler in there, of any description - even a dummy one, the response data from the first sampler is lost and I can't get to the JSON response from it any more - and the test is then broken.
Any idea how to get round it?
I've tried adding blank listeners and things like that but they don't cause the If Controller to trigger. The only thing that does is a sampler which then breaks my test sequence.
An If Controller is not allowed as a child of the first sampler.