Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8150223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:00:40+00:00 2026-06-06T15:00:40+00:00

I have a JMeter test plan with following http request samplers. Login Call some

  • 0

I have a JMeter test plan with following http request samplers.

  1. Login
  2. Call some functionality which needs a logged in user
  3. Logout

When I execute the test plan with 5 parallel threads, I see that the sampler 2 is called before calling sampler 1 for some threads, which then fails the response assertions.

Is there any way to specify a sequence of samplers to be executed ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:00:41+00:00Added an answer on June 6, 2026 at 3:00 pm

    This should ensure that they are executed sequentially :

    enter image description here

    So let’s start with thread group.

    Number of Threads(users) is 5.

    So assuming you have the logic work out for your login sampler. Just add additional sampler to it. So right click on that sample Add > Post Processors > BSF PostProcessor, inside this post processor big script space write ${__setProperty(ThreadValue,${__threadNum},)}.

    This will save the thread number to your property called ThreadValue. Make sure you select your language as beanshell in the dropdown list.

    Then after the login sampler add the if controller. Add this to the condition field (${JMeterThread.last_sample_ok}==true) && (${__property(ThreadValue,,)} == ${__threadNum})

    What this means is that -> do only logged in stuff while the actual login is successful and if the login thread matches the thread you’re currently in.

    That’s it you do your login stuff only inside the if controller. If you want to be sure that you logout the right user place additional if controller arround it.

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In JMeter, I have a test plan with a thread group. The thread group
I have done some tests in jmeter which produces an xml report in the
I am trying to do some test with jMeter. I have CSV file with
In my jmeter test, I have a BSF PreProcessor step (using groovy) running before
I have to create a test application on JMeter where i need to get
I have a GWT application and wanna to test load and functionality using a
I have been using JMeter in GUI mode for composing all the test cases
I have been told that JMeter has some issues with ASP.NET pages, is that
I have written a java client server application (not http), which i need to
I recorded a web page using JMeter which has produced several samplers. Each of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.