3

I am new to Jmeter. I know how to use it and configure necessary things. Today I got one requirement from client that they are having website and they need load testing for that website.

I am little confuse that how to plan test for this website? I will start from 20 users but then what to set other things? For ex: How many interval should I put between 2 users? , switch interval between 2 pages etc. Is there any another things do I need to include in plan? I want to do load testing in real way so can get exact capacity of website.

1 Answer 1

5

First ask your client that 'How many users their website intend to support?' From client you should get the number of users during Peak Load (Y) and Normal Load (X) and their expected Response Time, some clients say make it as fast as possible, but never go for this wording, ask him about the numbers.

Then start running your script from 1 to X to Y in an incremental way like 1, 10, 25, 50, 100, 200 (X), 500 (Y) etc. After running your script for these number of users you will get the Response time i.e. for 200 users you will get Response Time as 4 ms, then compare it with the goal provided by client and mark your load test as pass or fail. While running load scripts target only the pages/ functionalities which will be most widely used and exposed to public users, you don't need to load test the restricted or Admin functionalities.

Similarly increasing the load will give you a threshold value which your application can support. If this value is less than the Peak Load value then your test Fails, else its Pass. Calculate the Server Resource Utilization values too like CPU, Memory, Disk I/O and Network I/O to support your results (even if not asked by client, provide this as input from your end).

Now, coming to RampUp time, this is also required to create a more real scenario as in actual world hitting a Submit button by 200 users at same moment of time is rare (depending upon the application and its use). So, if the client provides it then good, but if not then first try running your script without Rampup and then increase it if you find your script is causing trouble while execution e.g. if your Normal Load is 200 and you provide 4 Ramup for 200 users then it is OK. But do mention the used Rampup in your reports.

Use Timers between consecutive actions, and CSV files for more real scenario i.e. Let the user wait and think for 1-2 secs. before clicking on next page or action. But again, don't include this Wait Time in Response Time results, else it will be very high.

Last but not least, if your client doesn't provide the Normal and Peak Number of users (which ideally he should) then see previous login reports from the server or Database history to get this value. Check in DB that what is the normal user base and how many logins are there in a day or hour. For this you have to do a little study of client and/or users for which the application is intended to, but this is quite important to know.

For Capacity of the server plot the Throughput against Response Time in a line graph, and where you find Throughput decreasing continuously after increasing to a maximum value and the point it intersects with Response Time is the Capacity i.e. Maximum no. of users supported. For this refer the CPU and Memory usage too, so if you find at 150 users your server CPU and Memory has gone above 80% then you should take the 150 as the Capacity.

For the client it is good to hear when you say application supports 150 and where as it can actually handle 200, but if you say it can handle 200 where as it actually supports 150 then it will be a negative impact on you and your whole report. So, always go for the minimum value founded by your during load test, and say it like 'This is the minimum value supported by application, it may handle additional +50 users too'.

5
  • Thanks a lot for very detail and easy to understand answer , I just have one question from tour answer that , As you have mentioned CPU and memory usage , These both I need to check of my local computer , right? I mean from where I am running jmeter script? Commented Sep 1, 2015 at 16:20
  • No, not of your local computer, these values CPU and Memory usage should be of the Application Server i.e. on which you website is hosted, so that you know during heavy load how your server behaves. If you have a separate Database server then you should collect this data for both Application and Database servers separately.
    – Dhiman
    Commented Sep 1, 2015 at 17:09
  • Ohh. Then Should I install jmeter on my server? I mean where website is hosted. Commented Sep 2, 2015 at 14:01
  • No, you don't need to install JMeter on the server, refer this link on how you can get resource utilization values, you need to install a plugin in your JMeter and run a agent file on the application server. jmeter-plugins.org/wiki/PerfMonAgent
    – Dhiman
    Commented Sep 2, 2015 at 14:25
  • Okay , Thank you so much. I will use this plugin as well. Commented Sep 2, 2015 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.