java - Testing Liferay multiple user login using JMeter

I need to test our Liferay application. In researching it sounds like JMeter is the way to go but following this example ->

I don't really see a way to pass in more then one account. I have a list of several 1000 accounts, I want each thread to log in using a unique account to simulate the load (Just log in 1000 at a time, wait a minute, log in another 1000, etc, then kill when I hit the max log in that we are testing)

How, using the technologies I have/know (Java) can I pass in an array or other data structure of user logins and get the results I want?

Would there be another way of implementing this besides JMeter. We also have selenium but I don't see how to thread it.


1 Answer

  1. Oliver- Reply


    Consider the following JMeter Test Elements:

    1. CSV Data Set Config - to provide unique username/password combinations
    2. Synchronizing Timer - to group login requests by 1000
    3. Constant Timer or Test Action sampler - to produce delay

    You will also need to handle Liferay Authentication Token otherwise you won't be able to simulate login, so your test plan should look like:

    • Open Login Page - GET Request
      • Extract p_auth token value and save it into a JMeter Variable
    • Perform Login - POST Request. You should send p_auth token value along with credentials

    See How to Load Test CSRF-Protected Web Sites article for more details on bypassing CSRF protection in particular and correlation in JMeter in general

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>