Search code examples
jmeterperformance-testing

Run Http requests in certain order JMeter


I am implementing a user Http request Test plan in JMeter and the scenarios need to be run in a certain order because they are dependent, eg:

  1. create user; (extract the user id with Json extractor)
  2. create order for this user id (extract the order id with Json extractor)
  3. ship order for this order id

Is there a way to run the scenarios making sure this dependency among the Http requests? So when having several Threads I will not face any issue like (shipping an order already shipped)


Solution

    1. JMeter executes requests upside down (if there are no Logic Controllers which may amend this behaviour) so there is nothing you need to do
    2. JMeter Variables are local to the thread so you have the confidence that each ID will be unique for each JMeter thread (virtual user)

    You may find API Testing With JMeter and the JSON Extractor article useful as well