Monday, December 30, 2013

Understanding TIME in performance testing i.e. Total Response Time, Latency, Server Response Time, Client/Browser/Rendering Time etc

Welcome back Performance testers!
Today we will talk on some basics of performance testing.
In every performance testing, the central theme is the TIME and every possible effort is made to reduce this, as much as possible.
So lets talk different terminologies related to time in performance testing.

We will take a simple example to understand the basics, instead of going into boring definitions.

My example is about two friends Mr. A and Mr. B who are chatting using their mobile phone.


1) A sends a message to B at suppose zeroth time.

2) Due to congestion in n/w, mobile towers etc the message reaches after 1 sec to B
Network Delay/Latency: This 1 sec delay in n/w is called Latency. So we see latency is property of n/w. Means if B lives far away in other state then the hops between towers will be more and thus more will be the latency and vise-versa. Important thing here is that this latency can be reduced to a certain extent (by improving infrastructure etc) but can never be zero and there will be a minimum limit of it for any n/w. [at max it can be reduced upto the time taken by universal constant i.e. speed of light :) I will talk more on latency in separate post]

3) Now the message reaches to B and he opens the message and starts reading and understanding the text. This takes him 5 sec ( to read, understand & be ready to reply)
Server response time: This 5 sec is the time taken by Mr. B (or server ) to understand the message/question and be ready to respond is called Server response time.
Ok, so now B send a pic along with the reply.

4) Again the inevitable latency add the delay of 1 sec :)

5) Now A hears a beep in his mobile, which means that the reply has been reached to B's mobile.
Total response time/Turn Around Time: So the total time of 1 sec(latency)+5 sec (server res time)+1 sec (latency) = 7 sec is total response time or Turn around time.
Technical def: Time between the first byte sent by client to server and the last byte received by the client from server is called Total Response time.

6) Now the pic is received on A's mobile but when A opens the picture then it takes 2 sec to load it on the picture viewer of the mobile.
Browser/Client/Rendering time: Now this 2 sec is the time taken by mobile picture viewer app to load the pic although the picture was already downloaded on the mobile.
I know, it can be a little confusing here to understand whether it should be added in Total Res time or should be kept separate.
The res time to download the pic is already included when the mobile gives a message beep (means response has reached mob) and when we try to see the pic then actually its the app/browser of the mobile which takes time to load the pic.
In other way, we can say if we improve the mobile efficiency (i.e. processing power, RAM etc) then we can reduce this client time. So actually its a property of the device on which you are viewing the message.

What do we tune during the performance test?
A) Mainly we are worried about the Server response time, which is nothing but Application under test (AUT) and we try to reduce the time taken by it.
B) Reducing the latency time is actually performance tuning the network and not application (which needs an exclusive/isolated load test). Again we can't reduce this beyond certain limit.
C) Reducing Client/Browser/Rendering time does not come under scope of performance testing/tuning as it will vary for different devices.

Hope you get the concept!
Please do post your reply in case you have any queries or if there is any conceptual mistake in my explanation...

Friday, December 27, 2013

Adding monitors in HP ALM for a load test scenario

Dear Performance testers,
Today we will see, how we can add monitors to our load test scenario in HP ALM  tool (Application Lifecycle Management).

Pre-requisites:
1) You should have ALM login access for your project (If you don't have ALM access then request your project lead to help you in creating one)
2) Performance module should be added to your project, other wise you won't be able to see Lab Resource tab in ALM under your project. (if its not there, then check with your project lead)
3) You must be added to Admin/Performance Group of the server (web/app/DB) you want to monitor, otherwise you won't be able to fetch the server counters in ALM.

So if you fulfill the above 3 requirements then you are all set for next step.

Step1: Open HP ALM in browser (the url may be something in this format http://hpalm.xxxxxx.com) and click on Application Lifecycle Management link

Step 2: Enter Login Name/Password and authenticate. Then select the domain & project and click Login

Step 3: Under Testing tab, click on Test Resources

Step 4: Create a new folder (ex: Demo) and then click on New Resource icon.

Step 5: Enter any name for the server monitor (ex: Demo Server1 Monitor) and under type select Monitor Profile and click OK

Step 6: Now click on Monitor Configuration tab of newly added server monitor and then click on Add monitor.

Step 7: Select the server type (ex: Windows resources)

Step 8: Enter Server IP (note, Server name will not work), give username (note, give complete domain\username) and password. Click get counters

If you have access (admin) to the server then you will be able to see the counters else you will see an error.

Step 9: Select object, Instances & Counters and then click arrow button to add it in Selected Counters box.

Step 10: Once done you will be able to see the counters added and you are ready to use the same during load test.

Thanks!!