skip to content

JMeter

The JVM load-testing workhorse: thread groups, samplers, listeners, and protocol support well beyond HTTP. Interviewers ask because its GUI-versus-CLI usage and result interpretation come up in any performance-testing discussion.

on this pageshow

explore

questions

246 · 10 sections

In an Apache JMeter test plan, what are the element families and what does each one contribute?

level: juniorimportance: must knowfreq 76%
basics
~20 s

JMeter's Add menu groups elements into families: Threads (Users), Sampler, Logic Controller, Config Element, Timer, Pre Processors, Post Processors, Assertions, Listener, Test Fragment and Non-Test Elements. The family tells you what an element does around a sampler.

open as a page

In a JMeter test plan, in what order do the elements around a single sampler run?

level: juniorimportance: must knowfreq 76%
basics
~10 s

Configuration elements first, then Pre-Processors, then Timers, then the Sampler, then Post-Processors, Assertions and Listeners. The last three are skipped when the sampler returns a null SampleResult.

open as a page

In a JMeter test plan, what does a Test Fragment element do when the plan runs?

level: juniorimportance: must knowfreq 65%
basics
~20 s

A Test Fragment holds test elements but never runs on its own. It sits under the Test Plan beside the Thread Groups, and JMeter executes its contents only when a Module Controller or an Include Controller references it.

open as a page

In a JMeter .jmx file, why does every test element have a hashTree element after it?

level: juniorimportance: must knowfreq 55%
basics
~10 s

A .jmx writes JMeter's tree as alternating pairs: the element, then a hashTree holding that element's children. Nesting lives in the paired hashTree, so an element with no children still gets an empty one.

open as a page

In a JMeter test plan, what decides which samplers a timer or an assertion applies to?

level: juniorimportance: must knowfreq 78%
basics
~20 s

Tree position decides. Timers, assertions, listeners, config elements and pre- and post-processors are hierarchical: they apply to every sampler at or below their parent. Attach one under a single sampler and only that sampler is affected.

open as a page

In JMeter's Uniform Random Timer, what pause do Constant Delay Offset 300 and Random Delay Maximum 700 produce?

level: juniorimportance: must knowfreq 72%
basics
~10 s

Each pause is 300 ms plus a uniformly drawn value between 0 and 700 ms, so the thread waits somewhere from 300 to 1000 ms before every sampler the timer holds.

open as a page

In JMeter's Open Model Thread Group, what does the Schedule rate(10/sec) random_arrivals(5 min) run?

level: juniorimportance: must knowfreq 58%
basics
~20 s

A flat ten arrivals per second for five minutes. The rate step names the arrival rate, random_arrivals spans five minutes, and because no rate follows the span its end rate is taken to equal its start rate.

open as a page

Which thread groups does a stock Apache JMeter 6 download actually ship?

level: juniorimportance: must knowfreq 62%
basics
~10 s

Four: Thread Group, setUp Thread Group, tearDown Thread Group and Open Model Thread Group. The Concurrency, Arrivals, Free-Form Arrivals, Ultimate and Stepping groups are third-party, from the jpgc-casutg add-on.

open as a page

In JMeter's Thread Group, what do the Number of Threads and Ramp-up period fields set?

level: juniorimportance: must knowfreq 86%
basics
~20 s

Number of Threads sets how many JMeter threads run the plan concurrently. Ramp-up period sets how many seconds JMeter takes to start all of them. Each thread then walks the whole plan on its own.

open as a page

In JMeter's Constant Throughput Timer, what does a Target Throughput of 600 ask for?

level: juniorimportance: must knowfreq 70%
basics
~20 s

600 samples per minute, not per second, so ten a second. The field's unit is per minute, and by default the rate applies to each thread on its own, counting every sampler in the timer's scope.

open as a page

In JMeter's CSV Data Set Config, what happens if you leave Variable Names empty?

level: juniorimportance: must knowfreq 74%
basics
~20 s

JMeter reads the file's first line and uses its fields as the variable names. That line is consumed as a header, never handed to a thread as data, and the Delimiter field must match the header's separator.

open as a page

In JMeter, how do you write a call to a built-in function such as __UUID?

level: juniorimportance: must knowfreq 78%
basics
~10 s

JMeter function calls take the form ${__functionName(arg1,arg2)}. The double underscore marks a built-in, the parentheses hold comma-separated positional arguments, and a function that takes none may drop them: ${__UUID}.

open as a page

In JMeter's Regular Expression Extractor, what does a Template value of $1$ refer to?

level: juniorimportance: must knowfreq 76%
basics
~20 s

Template $1$ inserts the text captured by the first parenthesised group of the Regular Expression field. JMeter builds the stored value from the Template, so $0$ means the whole match and $1$ the first group.

open as a page

In Apache JMeter, how do you capture an order id from a JSON confirmation body for the next request?

level: juniorimportance: must knowfreq 74%
basics
~20 s

Add a JSON Extractor as a child of the sampler that returns the confirmation body, give it a variable name and a JSON Path expression, then reference the captured value as ${orderId} in the next request.

open as a page

In JMeter, what is the difference in scope between a variable and a property?

level: juniorimportance: must knowfreq 85%
basics
~10 s

A JMeter variable is a per-thread copy that no other thread can read or change. A JMeter property is a single JVM-wide value that every thread in the run shares.

open as a page

In JMeter, when does a Response Assertion run relative to the sampler it checks?

level: juniorimportance: must knowfreq 58%
basics
~10 s

Straight after the sampler returns, on the very same JMeter thread. The order inside one sampler cycle is timers, the sample, post-processors, assertions, then listeners. Nothing is queued or handed to a worker pool.

open as a page

In JMeter's Response Assertion, what do the Contains, Matches, Equals and Substring rules each test?

level: juniorimportance: must knowfreq 78%
basics
~10 s

Contains and Matches read the pattern as a Perl5-style regular expression: Contains needs it found somewhere in the field, Matches needs it to span the whole field. Equals and Substring are plain, case-sensitive text.

open as a page

In JMeter's Thread Group, what does the 'Action to be taken after a Sampler error' setting do?

level: juniorimportance: must knowfreq 74%
basics
~20 s

It picks what a thread does when one of its samplers fails: Continue, Start Next Thread Loop, Stop Thread, Stop Test or Stop Test Now. Continue is the default, and a failed assertion counts as an error.

open as a page

In JMeter, what makes an HTTP Request sample count as successful when no assertion is attached?

level: juniorimportance: must knowfreq 78%
basics
~10 s

The HTTP status code alone decides it. JMeter marks a sample successful for any code from 200 to 399 inclusive, and unsuccessful for 4xx and 5xx. Nothing in the response body is read.

open as a page

In JMeter, how do you fail a sampler whose 200 response body omits the orderId field?

level: middleimportance: must knowfreq 70%
basics
~10 s

Attach an assertion under the sampler. A Response Assertion on Text Response with a Substring or Contains pattern, or a JSON Assertion asserting that the path $.orderId exists, turns the green sample red.

open as a page

Which JMeter command-line flags produce the HTML dashboard at the end of a non-GUI run?

level: juniorimportance: must knowfreq 76%
basics
~10 s

Two flags: -e asks JMeter to build the dashboard once the run ends, and -o names the folder it is written to. Both sit next to -l, which JMeter demands before it accepts -e.

open as a page

In JMeter's HTML dashboard, what does each column of the Statistics table tell you?

level: juniorimportance: must knowfreq 68%
basics
~10 s

The Statistics table gives one row per sample label plus a Total row: Label, #Samples, FAIL, Error %, Average, Min, Max, Median, three percentile columns, Transactions/s, and Received and Sent KB/sec.

open as a page

Which columns does JMeter write into a CSV results file (JTL) by default?

level: juniorimportance: must knowfreq 72%
basics
~10 s

JMeter's default CSV JTL carries seventeen columns: timeStamp, elapsed, label, responseCode, responseMessage, threadName, dataType, success, failureMessage, bytes, sentBytes, grpThreads, allThreads, URL, Latency, IdleTime and Connect.

open as a page

In JMeter, which element streams metrics to InfluxDB or Graphite while a test runs?

level: juniorimportance: must knowfreq 66%
basics
~10 s

The Backend Listener. Pick a BackendListenerClient implementation - InfluxdbBackendListenerClient or GraphiteBackendListenerClient - then fill its Parameters table with the target URL or host and port, and metrics leave the injector during the run.

open as a page

How do you build a JMeter HTML dashboard from last night's results file without re-running the test?

level: middleimportance: must knowfreq 66%
basics
~10 s

Run the report generator on its own with -g: jmeter -g last-night.jtl -o dashboard. The flag takes an existing results file, so no plan is loaded and no load is generated.

open as a page

What does each flag in the JMeter command `jmeter -n -t plan.jmx -l results.jtl` do?

level: juniorimportance: must knowfreq 88%
basics
~10 s

-n runs JMeter without its GUI, -t names the .jmx test plan to load and run, and -l names the JTL file that every sample result is written to.

open as a page

Why does Apache JMeter print a banner telling you not to load test in GUI mode?

level: juniorimportance: must knowfreq 74%
basics
~20 s

JMeter prints it on every GUI launch because the GUI is for creating and debugging a plan, not for driving load. The banner also gives the command line to use instead: jmeter -n -t [jmx file] -l [results file] -e -o [report folder].

open as a page

In Apache JMeter's bin/jmeter launcher, which environment variable sets the JVM heap, and what is its default?

level: juniorimportance: must knowfreq 68%
basics
~10 s

HEAP. Apache JMeter's bin/jmeter launcher defaults it to -Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m, so an injector starts with a fixed one-gigabyte heap unless HEAP is exported first, normally from bin/setenv.sh.

open as a page

Which JMeter listeners keep a copy of every sample, and which one is built for a load run?

level: juniorimportance: must knowfreq 74%
basics
~20 s

Most JMeter listeners keep every sample they receive, View Results Tree and View Results in Table included. Simple Data Writer keeps none - it writes the row and lets the result go, so load runs use it.

open as a page

In Apache JMeter, what do the -J and -D command-line flags each define?

level: juniorimportance: must knowfreq 68%
basics
~10 s

JMeter's -J flag defines a JMeter property inside the running JMeter instance; -D defines a Java system property in the JVM. Both take name=value, may be repeated, and are applied while JMeter starts up.

open as a page

In JMeter, how do the -r and -R command-line flags differ?

level: juniorimportance: must knowfreq 64%
basics
~10 s

Both start a JMeter run on remote server processes instead of locally. -r uses the host list already in the remote_hosts property; -R takes the list inline and overrides it.

open as a page

In JMeter 6, why does a distributed run refuse to start without rmi_keystore.jks?

level: juniorimportance: must knowfreq 55%
basics
~20 s

Since JMeter 4.0 the RMI transport runs over SSL by default: server.rmi.ssl.disable is false. The keystore that server.rmi.ssl.keystore.file names, rmi_keystore.jks, is not in the download, so you generate it and copy it to every node.

open as a page

What does JMeter's bin/jmeter-server script actually start on a load generator?

level: middleimportance: must knowfreq 68%
basics
~10 s

It launches JMeter with -s, which starts a long-lived engine process that registers itself for remote calls and then waits. It holds no test plan until a controller sends one.

open as a page

A JMeter Thread Group asks for 1,000 threads and the plan runs on six remote engines - how many threads hit the target?

level: middleimportance: must knowfreq 74%
basics
~10 s

Six thousand. JMeter never splits a plan across engines: the controller sends the whole plan to each one, so the Thread Group's 1,000 threads start once per server. You do the division, not JMeter.

open as a page

What does JMeter's mode property select for a distributed run, and what is its default?

level: middleimportance: must knowfreq 61%
basics
~10 s

JMeter's mode property names the SampleSender each engine uses to return results to the controller. It is read on the controller only, and defaults to StrippedBatch: batched sends with response bodies removed.

open as a page

Which JMeter element types come in a JSR223 variant?

level: juniorimportance: must knowfreq 70%
basics
~20 s

Apache JMeter 6.0.0 ships six: JSR223 Sampler, JSR223 PreProcessor, JSR223 PostProcessor, JSR223 Assertion, JSR223 Timer and JSR223 Listener. All six extend one base class, so they share the same configuration fields and one process-wide compiled-script cache; each invocation still gets a fresh ScriptEngine from JMeter's single ScriptEngineManager.

open as a page

In Apache JMeter, which directory does a third-party plugin JAR go in, and which one takes its dependencies?

level: juniorimportance: must knowfreq 71%
basics
~10 s

The plugin JAR itself goes in JMETER_HOME/lib/ext. The utility and dependency JARs it needs go in JMETER_HOME/lib. Only lib/ext is scanned for new JMeter components, and only files ending in .jar are picked up.

open as a page

In a JMeter JSR223 PostProcessor, which bound object hands a captured value to the next sampler?

level: juniorimportance: must knowfreq 72%
basics
~10 s

The vars binding, which is the running thread's JMeterVariables object. Call vars.put("orderId", id) inside the script and any later element in that same thread reads the value as ${orderId}.

open as a page

In JMeter, why does a BeanShell element re-pay its script cost on every call?

level: middleimportance: must knowfreq 62%
basics
~20 s

JMeter caches nothing for a BeanShell element. Every invocation hands the script straight to that element's bsh.Interpreter, calling eval() on the inline Script field or source() on a Script file, so the interpretation cost repeats per sample.

open as a page

What does a JMeter JSR223 element's 'Cache compiled script if available' checkbox actually do?

level: middleimportance: must knowfreq 64%
basics
~20 s

It lets JMeter compile the inline Script once and reuse the compiled form instead of handing the source to the engine on every execution. It only bites if the engine implements javax.script.Compilable, as Groovy does.

open as a page

In JMeter's HTTP Request sampler, what does ticking Retrieve All Embedded Resources do?

level: juniorimportance: must knowfreq 74%
basics
~20 s

JMeter parses the response for referenced images, stylesheets, scripts and frames, then issues an extra GET for every one it finds. The sampler's result becomes a container holding the page plus one sub-sample per asset.

open as a page

In Apache JMeter, what must exist before a JDBC Request sampler can run a query?

level: juniorimportance: must knowfreq 71%
basics
~20 s

A JDBC Connection Configuration element whose Variable Name for created pool matches the sampler's pool field, plus the vendor's driver jar in JMeter's lib directory. A name mismatch fails the sample with "No pool found named".

open as a page

How does JMeter's JMS Publisher find the broker it publishes to?

level: juniorimportance: must knowfreq 60%
basics
~20 s

Through a JNDI lookup. Either tick Use jndi.properties file, or fill in Initial Context Factory and Provider URL on the sampler itself; Connection Factory and Destination name what is looked up either way. The provider's own client JAR must already sit in JMeter's lib directory.

open as a page

Before JMeter's HTTP(S) Test Script Recorder will start, what must the test plan already contain?

level: juniorimportance: must knowfreq 68%
basics
~20 s

A Thread Group with a Recording Controller under it. The recorder's Target Controller defaults to Use Recording Controller, and pressing Start with no Recording Controller anywhere in the tree raises an error instead of opening the proxy.

open as a page

A JMeter non-GUI run where every sample failed still exited 0. What does JMeter's exit code report?

level: juniorimportance: must knowfreq 72%
basics
~20 s

JMeter's exit code reports whether the process itself completed, not whether the test passed. A non-GUI run returns 0 at a 100 percent error rate; only a start-up throwable or a shutdown that leaves threads running returns 1.

open as a page

What does Apache JMeter give a team out of the box that a code-first load runner does not?

level: juniorimportance: must knowfreq 62%
basics
~10 s

Apache JMeter 6.0.0 ships a free Apache-2.0 GUI plan editor, samplers for protocols well beyond HTTP, a built-in controller-and-engine distributed mode, an HTML report generator, and a large third-party plugin ecosystem.

open as a page

A nightly job runs jmeter -n -t plan.jmx -l results.jtl -e -o report and it fails on the second run. Why?

level: middleimportance: must knowfreq 58%
basics
~20 s

Last night's report directory is still there and is not empty, so JMeter refuses to write into it and aborts before the plan is even loaded. Adding -f deletes the old report folder and results file first.

open as a page

Which column in a JMeter JTL file must a pipeline's pass rule count?

level: middleimportance: must knowfreq 58%
basics
~20 s

The success column. JMeter writes the literal true or false there for every sample, and a false row is the only dependable marker of a failed sample; responseCode can still read 200 on a failed one.

open as a page

Why is a JMeter .jmx plan harder to review and merge than a scripted load test?

level: middleimportance: must knowfreq 57%
basics
~20 s

A .jmx plan is XML that JMeter's GUI writes and rewrites in full on every save, so a one-field edit arrives as machine-generated markup, and two authors' saves collide across the whole document rather than on one line.

open as a page