Articles → JMeter → If Controller In Jmeter

If Controller In Jmeter






Purpose





How To Add If Controller?




  1. Right-click on Thread Group.
  2. Go to Add → Logic Controller → If Controller
  3. Picture showing adding the if controller in the test plan in jmeter
    Click to Enlarge



Example




  1. Add a HTTP request sampler.
  2. Add a View Results tree
  3. Add an if controller to check if HTTP request in point 1 is success or not.
  4. Picture showing adding the condition inside the if controller
    Click to Enlarge

  5. If success then call another HTTP.


Picture showing adding the http request if the condition in if controller is true
Click to Enlarge



Picture showing the output if the condition in the if controller is true
Click to Enlarge



Picture showing the output if the condition in the if controller is false
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, December 9, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250