Wednesday, October 16, 2013

Jmeter Non GUI mode with HTML Reports

Running JMeter in command line mode is an option to carry out high number of concurrent users and obtain results.

STEP 1:
Go to bin folder of your JMeter installation from command prompt and type the following command:


        jmeter -n -t my-Scrtip.jmx -l sample.jtl -j <smaple.log>

Ex: jmeter -n -t D:\sampleScripts\script.jmx -l D:\sampleScripts\scriptresults.jtl

-n ------> Specifies Jmeter is to run in non GUI mode, 

-t ------> name of your test script jmx file (If you want u can Specify jmx file with location)
 -l------> name of jtl  
-j ----->  generate the log file for the execution

STEP 2 :

  after getting the JTL file , use the below command to generate the HTML report

    jmeter -g <sample.jtl> -o <folderpath>


After executing the above command, it will generate the HTML  in the desired path.. You can now view the results.......... :) 

Tuesday, October 8, 2013

Simultaneous & Concurrent Users......

These are the 2 terms which is often used in Performance Testing... 

Simultaneous users are the users who have a valid session in the server. Each of the users would be performing different actions like one doing login , other viewing the reports, etc.


Concurrent users are the users who have a valid session in the server & they are performing the same operation at any point of time. All the concurrent users would perform login, reports download, etc at the same point of time.


Example:
Hence for a web site, the number of simultaneous users would be always greater than the concurrent users. For example; a banking web site has the workload of about 30000 simultaneous users & 5000 concurrent users.

Knowing the correct figures of simultaneous & concurrent users is very vital in order to perform performance testing of an application.

Saturday, October 5, 2013

java.lang.OutOfMemoryError in jmeter......?



A java.lang.OutOfMemoryError is a subclass of java.lang.VirtualMachineError that is thrown when the Java Virtual Machine is broken or has run out of resources that are necessary to continue the operation of the Java Virtual Machine. Obviously, memory is the exhausted resource for a java.lang.OutOfMemoryError, which is thrown when the Java Virtual Machine cannot allocate an object due to memory constraints.


To overcome this issues while Jmeter Execution, increase heap memory of Jmeter, modify the line of code in jmeter.bat file.

Right Click on jmeter.bat file click on Edit 
and modify the line  
orginal :set HEAP=-Xms512m -Xmx512m 
modified : set HEAP=-Xms512m -Xmx1250m (For 32 Bit OS)

for 64 bit OS,the value wil change upto 102400,   

FYI: need to install jre for 64 bit in the system..

90% line in JMeter aggregate report....!


The 90th percentile response time value is the value for which 90% of the data points are smaller and 10% are bigger.

To calculate the 90th percentile value:
1.Sort the transaction instances by their value.
2.Remove the top 10% instances.
3.The highest value left is the 90th percentile.
Consider the below example:

There are 10 instances(response time) of transaction “sampler10” with the values


10Sec,5Sec,3Sec,9Sec,4Sec,3Sec,1Sec,7Sec,2Sec

Sort values from best to worst:

1 sec,2 sec,3 sec,4 sec,5 sec,6 sec,7 sec,8 sec,9 sec,10 sec

Remove top 10%, in our case i.e. value “10 sec”

1 sec,2 sec,3 sec,4 sec,5 sec,6 sec,7 sec,8 sec,9 sec

The highest value left is the 90th percentile value i.e. “9 sec” is the 90th percentile value.