title: jMeter - If Controller is only executed if it contains a sampler?
body: <p>I'm having trouble with the If Controller in jMeter.</p>
  
  <p>I have a thread group. Inside the thread group is a loop controller. Each time the loop executes, it runs an HTTP sampler.</p>
  
  <p>I want to trigger the If Controller based on the response of this sampler.</p>
  
  <p>However, the If Controller only seems to trigger if it contains another sampler.</p>
  
  <p>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.</p>
  
  <p>Any idea how to get round it?</p>
  
  <p>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.</p>
  
  <p>An If Controller is not allowed as a child of the first sampler.</p>