0
votes

I am load testing against a Registration system. I currently have a JMeter script that pulls user information from a CSV file (CSV Data Set Config) and my Thread Group has the following steps:

  1. Contact CAS server, get login ticket
  2. Login to CAS
  3. Execute tasks in Registration system
  4. Logout of CAS

JMeter runs through each of those steps as a separate thread and the script works.

The problem is that our test isn't quite accurate when compared against the behavior of our users in real life. Like I mentioned, this is a Registration system, and our end users are logging in and authenticating (via CAS) minutes before they actually begin hammering the actual system (when Registration opens at midnight - and the floodgates open).

In real life we never have problems with our CAS authentication system because we don't have thousands of users authenticating at once. When we do our load testing with JMeter the first two steps are to authenticate via CAS, and this makes CAS a bottleneck and it begins to fail when we load test with 500 users over a span of 10 seconds. As such, our load testing transactions aren't able to hit the actual Registration system and the JMeter load test isn't valid.

Is there a way to update a JMeter script to log all users in first (loop through the first two steps and maintain the CAS session info for all users), and then perform the rest of the steps?

1

1 Answers

1
votes

Stirling,

Please use 'Synchronizing Timer' element of the JMeter that will wait for all the users to login and then move forward to the next step (Registration System).

You can create your script in following structure:

  • HTTP Request for Contact CAS server, get login ticket
  • HTTP Request for Login to CAS
  • Synchronizing Timer [Set the 'Number of Simulated Users to Group by' to 0 and Timeout based on your requirement [Recommended value to set is '300000' i.e 5 minutes]. Do not set Timeout to '0' otherwise your test will remain in running state forever if any of the users gets failed in the previous step]
  • HTTP Request for Execute tasks in Registration system
  • HTTP Request for Logout of CAS

When the test completes 'HTTP Request for Login to CAS' step then it will wait for all the users to reach at that step before moving to 'HTTP Request for Execute tasks in Registration system' step.

If you need information related to other JMeter elements then you can refer to JMeter knowledge base to get all the critical information at one place.

Kindly let me know if you have any questions.