title: JMeter : How to run Multiple Samplers under a single Thread group for multiple concurrent users?
body: <p>I am new to JMeter and trying to learn JMeter by doing performance testing for one of the application in my organization.</p>
  
  <p>I am facing the blow issue with the concurrent execution of a single thread for multiple users.</p>
  
  <ol>
  <li>Base URL: <a href="http://xyz.abc.com/app/" rel="nofollow noreferrer">http://xyz.abc.com/app/</a></li>
  <li>Complete URL : <a href="http://xyz.abc.com/app/" rel="nofollow noreferrer">http://xyz.abc.com/app/</a>{RandomSesionID}/Account/Login</li>
  </ol>
  
  <p>I've create a Thread with HTTP Requests as show below.</p>
  
  <p>Thread Group</p>
  
  <ul>
  <li>Hit Base URL</li>
  <li>It Loads Login URL</li>
  <li>Post Credentials and Click Login</li>
  <li>Navigate to Landing Page(baseURL/{RandomSessionID}/Main/Home)</li>
  <li>Click Logout(It will navigate to BaseURL/{RandomSessionID}/Main/Home)</li>
  </ul>
  
  <p>When I let the thread count to its default value 1, Everything is working fine. However , The moment I set it to more than 1 (with ramp up time to 10sec), below thing happening.</p>
  
  <p>User 2---></p>
  
  <ul>
  <li>Hit Base URL</li>
  <li>Get The Login URL</li>
  <li>Post The Credential</li>
  <li>It again goes back to Request 2 (Get The Login URL)</li>
  </ul>
  
  <p>and all the steps of the user are getting redirected to the second request irrespective of what I am requesting.</p>
  
  <p>I tried organizing everything into Simple Controllers to see if the sequence will remain for all users but no avail, I am still running into the same issue.</p>
  
  <p>please help me to understand what is going wrong here and how I can resolve these errors to test the application with more concurrency.</p>
  
  <p><strong>EDIT 1</strong>
  I did a further investigation on this issue from my end and here are the observations I had.
  <em>Case 1:</em> When I create two separate JMeter instances and run the same test parallel with different users, The Thread completely successfully without any errors.
  <em>Case 2:</em> Wile Running the Thread with 2 users as mentioned above, The second HTTP request for <strong>BaseURL:/Home/Main</strong> redirecting the request to <strong>/Account/Main</strong> instead of going to the next step as shown below.  </p>
  
  <p><a href="https://i.stack.imgur.com/q87Uv.png" rel="nofollow noreferrer">Image 1 :All The HTTPRequests In Order </a><br>
  <a href="https://i.stack.imgur.com/Vtryc.png" rel="nofollow noreferrer">Image 2 : This Is the Navigation Request For User 1</a><br>
  <a href="https://i.stack.imgur.com/iKc2M.png" rel="nofollow noreferrer">Image 3 :User 2 Hitting /Home/Main and Getting Redirected To /Account/Login As Response</a><br>
  <a href="https://i.stack.imgur.com/v1hqn.png" rel="nofollow noreferrer">Image 4 : User 2 Hitting /Home/Main and Got /Home/Main response</a><br>
  <a href="https://i.stack.imgur.com/x5INi.png" rel="nofollow noreferrer">Image 5: User 2 Hitting The /Home/Main and Getting Redirected in Response</a>  </p>
  
  <p>As you can see in Image 1, Those are the series of requests which I am making through the thread group and these requests are the same for all the users in the thread.</p>
  
  <p>In Image 2, You can see /Home/Main is a Single GET request with a valid /Home/Main response without any issues.<br>
  However, In the Subsequent Images 3-5, You could see that the GET /Home/Main-134 making sub-request and 134-0 and 134-1 with 134-0  to GET /Home/Main and 134-1 to GET /Account/Login. </p>
  
  <p>My Observation: I doubt that JMeter is using a single tab/ instance of the browser and hitting those web requests in the same tab where the first request was initiated. Due to which for the second user, it is always redirecting to the Login Page even though the session ID is valid.  </p>
  
  <p>To Confirm whether what I observed is correct, I tried replicating the same scenario in the Chrome Browser as mentoined below.<br>
   1. Open Chrome broswer and Access the Base URL.<br>
   2. Login and Navigate to Home/Main<br>
   3. Now In the same Tab, Type BaseURL and It redirected me to the Login page.<br>
   4. Now Enter Credentials of User 2 and login and nvaigate to Home/Main.<br>
   5. Now I Try accessing the firt User URL by going back by 3-4 tabs.  </p>
  
  <p>However, This won't replicate the exact steps as we are using the browser normally whereas in the requests, we are directly hitting the urls with the GET/POST requests.<br>
  I am in a fix and unable to understand what I should do to get through this issue.I am not even sure whether it is the issue with the Application or issue with the Jmeter.  </p>
  
  <p>Are there any setting in JMeter which will make sure each Thread (user) of the Thread group gets the option to have a dedicated request instead of using the single instance of the browser internally ?  </p>