Thursday, January 17, 2013

Sample Interview Questions on Jmeter

Basic Questions:


Q1: What is the use of Jmeter?
Ans: Jmeter is an open source desktop application software, 100% pure Java application, which is designed to perfom load testing of web based application.

Q2: Is it mandatory to install java first, to run jmeter?
Ans: Yes, Jmeter is an java based application. So you should install java 1.5 or later version in your system.

Q3: Can we do regression testing with Jmeter?
Ans: Yes we can, after-all it is all about java-script. :)

Q4: How we can run jmeter?
Ans: By simply clicking on Jmeter.bat, or by using commnad: C:\>Jmeter

Q5: What are the options, do you see when jmtere window opens?
Ans: 1. Test Plan     2. Workbench

Q6: Which component, do we need to add, to record script?
Ans: We need to add Http proxy server, by simply right clicking on Workbench > Non-Test elements > Http proxy server.

Also need to enable proxy, with port 8080, by going to internet settings> Connections > Lan. Name will be "localhost".
Then click on start button on jmeter http proxy server window.

Q7: Can we perform load testing of database with jmeter?
Ans: Yes we can. To see the process follow: Database load testing with jmeter link. You should be aware of sql queries.

Q8: What are listeners in Jmeter?
Ans: Listeners in jmeter are used to capture the response data of load test. We can have response data (result) in , cvs, image (graph) or in html format.

Q9: Name 4-5 listeners in jmeter, which are commonly used.
Ans: 1. View result tree 2. Summary report 3. Aggregate Graph 4. Response time vs thread 5. Composite graph

Q10: What is Response time in Jmeter report?
Ans: Response time in Jmeter report, is the time taken by web server, to answer the requested query. In simple words, it is the time taken by a web server to respond the http request.

Q11: What is median in jmeter listener?
Ans:  It is a number which divides the samples into two equal halves. Half of the samples are smaller than the median, and half are larger.

Q12: What is throughput in jmeter listener?
Ans: Throughput is relation between time and data.It shows the relation between http request and unit time. Means how many requests are processed in how much time.

Throughput = Number of requests / Time(second or millisecond)

Q13: Which Jmeter elements are used for Parameterization?
Ans: 1. User parameter 2. CSV Data Set config

Q14: Which controllers are used as an conditional controllers in jmeter?
Ans: If controller and While controller

Q15: What is heap size in jmeter?
Ans: Jmeter is work in java, and heap size is related to java. Java heap is the heap size allocated to JVM applications which takes care of the new objects being created. If the objects being created exceed the heap size, it will throw an error of java.lang.out.of.memory.
Java's default heap size limit in Jmeter is 256 MB.

Q16: Is it possible that, if we increase the heap size in Jmeter, then application(jmeter) might not work?
Ans: Yes, it is possible. Because heap size depends upon the empty space of your machine in c drive as well as your RAM. If the RAM is 1 Gb and you increased the heap 2048, it may not work.



Jmeter heap error or java.lang.outofmemory error..

In previous posts, i wrote about, how we can remove the heap error or java.lang.outofmemory error in Jmeter. Recently when i was performing performance testing of a web based application, even after doing all settings to remove heap error, i got this error. I was wondered, why this error occurred again, when i was done with necessary changes to the properties files in jmeter.

I checked the script again, but no solution was there. Then i rechecked the properties file, and there i came across to know that we do need to change the properties in jmeter report.bat file too. Because if the heap size in report remain same means less, it will cause problem when we will run test for large number of users.
So do the changes in Jmeter-report.bat file.





As you can see the image, it is after updating the properties.

Also if you dont want to see this king of error, run jmeter in non-gui mode.

My next post will be on the same.

Monday, July 16, 2012

Jmeter result:

To learn about jmeter results(Summary Report, View Result Tree  ETC.) follow:
           http://jmeterresults.blogspot.in

Wednesday, July 11, 2012

Uncaught exception java.lang.outofmemoryerror:

Most of you will be familiar with this error. I am not going with other java problems. I am only concerning with jmeter related problem, and when i was running load test for a web-app with 1500 virtual users, jmeter gave this error. "uncaught exception java.lang.outofmemoryerror:".













In the previous post "http://www.blogger.com/blogger.g?blogID=8863051106567046425#editor/target=post;postID=8667267162068998059"  i talked about heap error and how to solve that problem. But now when when all the setting were correct as well as heap size too i found a new error in jmeter.
This error causes because stack size. Stack size depends upon your cookies and cache in jmeter.
I will just tell you how we can solve that problem.








As you can see in the above image, the set heap size section. When you will open this by editing jmeter.bat file, you will not see the "-Xss64k" section  there.
So to remove the "uncaught exception java.lang.outofmemoryerror: " error just add this section to your jmeter.bat file. Also you can increase the size of stack till 100k as per your system and jmeter behavior

I hope this post will help you threw this..