Você está na página 1de 3

JMeter interview questions and answers

Performance testing is an important process of any software development. Even though these are not common interview questions for Java developers, you can bring it up yourself to many open-ended questions. Setting up a performance/load test script is always the first step in fixing non-functional and hard to reproduce issues relating to memory leaks, database deadlocks, thread-safety, CPU usage, excessive disk I/O, etc.Below is the list of jmeter interview questions and answers. What is Jmeter? Jmeter is one of the Java tools which is used to perform load testing client/server applications. It is open source software Designed to load test functional behavior and measure performance of the application.It was originally designed for testing Web Applications but has since expanded to other test functions What are the other applications tested by Jmeter? JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more) What do you see when you open jmeter? By defaultTest Plan & Workbench are seen What is Test Plan in Jmeter? Test plan describes a series of steps JMeter will execute when run. A complete test plan will consist of one or more Thread Groups, logic conrollers, sample generating controllers, listeners, timers, assertions, and configuration elements. What is Work bench? The Workbench is simply an area to store test elements while you are in the process of constructing a test. The Workbench is a sandbox for any test or portion of a test that you are working on. When you are ready to test what you have designed in the Workbench, you can copy or move the elements into the Test Plan. It also contains Non- Test Elements Http mirror sever Http Proxy server {which is not available in the thread group & Test plan } What is Thread Group? Thread group elements are the beginning points of any test plan. 1. 2. 3. All controllers and samplers must be under a thread group. Listeners, may be placed directly under the test plan, in which case they will apply to all the thread groups. The controls for a thread group allow you to: Set the number of threads Set the ramp-up period Set the number of times to execute the test

What are the parts of thread group?

Sampler :Sends various types of requests to the server Listeners : Results of the Run can be viewed & saved Timer : Makes th erun more realistic by inserting delays between the requests Controller : responsible for controlling the flow of the thread group.If we have defined request to be executed on some logic like if-then-else or loop structure in java Config Element : Info about the requests are added to work with samplers using this.

Assertion : To check if the responses are within given time and containing expected data.

What are Controllers and its types? JMeter has two types of Controllers Samplers Controllers Logical Controllers Samplers Controllers Samplers tell JMeter to send requests to a server. For example, add an HTTP Request Sampler if you want JMeter to send an HTTP request. You can also customize a request by adding one or more Configuration Elements to a Sampler. Logical Controllers Logical Controllers let you customize the logic that JMeter uses to decide when to send requests. Logic Controllers can change the order of requests coming from their child elements. For example, you can add an Interleave Logic Controller to alternate between two HTTP Request Samplers.

This is how People come here Searching:


jmeter interview questions and answers jmeter interview questions and answers for experienced jmeter interview questions

What is Configuration element? A configuration element works closely with a Sampler Configuration elements can be used to set up defaults and variables for later use by samplers. Note that these elements are processed at the start of the scope in which they are found, i.e. before any samplers in the same scope. Its elements: CSV Data Set Config: Used to read lines from a file, and split them into variables. HTTP Authorization Manager : You can specify one or more user logins for web pages that are restricted using server authentication Java Request Defaults: You can set default values for Java testing HTTP Cookie Manager: The Cookie Manager element has two functions: 1. 2. It stores and sends cookies just like a web browser. Second, you can manually add a cookie to the Cookie Manager.However, if you do this, the cookie will be shared by all JMeter threads

HTTP Request Defaults: This element lets you set default values that your HTTP Request controllers use. HTTP Header Manager : The Header Manager lets you add or override HTTP request headers What are Listeners? A listener is a component that shows the results of the samples .The results can be shown in a tree, tables, graphs or simply written to a log file The Graph Results listener plots the response times on a graph. The View Results Tree Listener shows details of sampler requests and responses, and can display basic HTML and XML representations of the response.Other listeners provide summary or aggregation information.

Every listener in JMeter provides a field to indicate the file to store data to.They also provide means to view, save, and read saved test results. How did you go about fixing a performance issue? Set up JMeter to reproduce the production like scenario to put through concurrent requests and put the system under heavy load. Used a profiling tool to monitor CPU times, memory usage, etc. What are some of your recent accomplishments? Reduced the response time from 4 seconds to 2 seconds. Set up JMeter to put the system under peak load. Used a profiling tool to monitor CPU times, memory usage, etc. Identified the bottle neck, and improved the situation by fixing the offending database connection leak, back tracking regular expression, and a badly constructed SQL query with Cartesian joins. What are Pre-Processor and Post-Processor elements? In what order does JMeter process various type of elements? A Pre-Processor executes some action prior to a Sampler Request being made. If a Pre-Processor is attached to a Sampler element, then it will execute just prior to that sampler element running. A Pre-Processor is most often used to modify the settings of a Sample Request just before it runs, or to update v ariables that arent extracted from response text. A Post-Processor executes some action after a Sampler Request has been made. If a Post-Processor is attached to a Sampler element, then it will execute just after that sampler element runs. A Post-Processor is most often used to process the response data, often to extract values from it. A Regular Expression Extractor can be used as a Post-Processor element to extract values to be used elsewhere in subsequent requests. How do you ensure re-usability in your JMeter scripts?

Using config elements like CSV Data Set Config, User Defined Variables, etc for greater data reuse. Modularizing shared tasks and invoking them via a Module Controller. Writing your own BeanShell functions, and reusing them.

Does Jmeter generate any scripts? How to use the Jmeter tool and also the How to analyze the results? When you create a test in Jmeter, save the file. The file saves with the extension .jmx. Open the .jmx file in an editor. There you can see script. For what purpose Jmeter used? Jmeter is a Performance Tool. It is used to test the performance of the application. Apache JMeter is a 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions. Can we Parametrize via Jmeter? Yes, you can parametrize via CSV file, User define variables or XML sheet.

This is how People come here Searching:


jmeter interview questions and answers jmeter interview questions and answers for experienced jmeter interview questions

Você também pode gostar