0

I am creating a script on a simple web application which includes following: 1)Login 2)Some API call(which requires token from login response)

I successfully created the script and executed for one thread which worked fine. Now I am trying increase the load upto 100 threads wherein i got some errors on few API request which got executed before Login sampler(authorization error). Then I put if controller for all API calls(if login success then request API), in this case login will always run first before any API request($JMeterThread.last_sample_ok==true). My manager has told me not to use if controllers in the script because it will consume some time to execute which in turn will affect the final response time. What is the alternate method to achieve this in term of performance aspect.

Vishal Chepuri
  • 306
  • 5
  • 26
  • do you have several 'users' authenticating (iterating over a CSV file to do the logins), or you are using the same credentials for all logins? and if so, does your application allow the same user to have several sessions? if you are using the same authenticated user, do you have a 'logout' call that occur in the end of the scenario? – itaymendel Mar 27 '17 at 07:40
  • i am using only one user credential for several logins. Yes it does allow the same user to have several sessions. And i dint recorded the logout script as i just want to hit the API's which requires token from login page response. – Vishal Chepuri Mar 28 '17 at 05:18
  • @itaymendel help me out in this issue – Vishal Chepuri Mar 29 '17 at 01:49

0 Answers0