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 pageshowhide
explore
- Plan Composition26 questions
- Component Families15 questions
- Reuse Mechanisms11 questions
- Load Shaping29 questions
- Arrival Sources17 questions
- Pacing Controls12 questions
- Dynamic Values26 questions
- Response Extraction10 questions
- Input and Scope16 questions
- Sample Verdicts22 questions
- Content Checks11 questions
- Failure Consequences11 questions
- Run Output27 questions
- Sample Capture12 questions
- HTML Dashboard15 questions
- Headless Execution27 questions
- Command Line Runs12 questions
- Generator Capacity15 questions
- Multi-Engine Runs20 questions
- Remote Topology10 questions
- Scaling Limits10 questions
- Custom Behaviour23 questions
- Embedded Scripts17 questions
- Packaged Extensions6 questions
- Protocol Coverage30 questions
- Web Requests18 questions
- Non-Web Samplers12 questions
- Pipeline Fit16 questions
- Unattended Runs11 questions
- Landscape Positioning5 questions
questions
246 · 10 sectionsIn an Apache JMeter test plan, what are the element families and what does each one contribute?
basics
~20 sJMeter'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.
In a JMeter test plan, in what order do the elements around a single sampler run?
basics
~10 sConfiguration 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.
In a JMeter test plan, what does a Test Fragment element do when the plan runs?
basics
~20 sA 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.
In a JMeter .jmx file, why does every test element have a hashTree element after it?
basics
~10 sA .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.
In a JMeter test plan, what decides which samplers a timer or an assertion applies to?
basics
~20 sTree 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.
In JMeter's Uniform Random Timer, what pause do Constant Delay Offset 300 and Random Delay Maximum 700 produce?
basics
~10 sEach 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.
In JMeter's Open Model Thread Group, what does the Schedule rate(10/sec) random_arrivals(5 min) run?
basics
~20 sA 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.
Which thread groups does a stock Apache JMeter 6 download actually ship?
basics
~10 sFour: 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.
In JMeter's Thread Group, what do the Number of Threads and Ramp-up period fields set?
basics
~20 sNumber 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.
In JMeter's Constant Throughput Timer, what does a Target Throughput of 600 ask for?
basics
~20 s600 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.
In JMeter's CSV Data Set Config, what happens if you leave Variable Names empty?
basics
~20 sJMeter 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.
In JMeter, how do you write a call to a built-in function such as __UUID?
basics
~10 sJMeter 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}.
In JMeter's Regular Expression Extractor, what does a Template value of $1$ refer to?
basics
~20 sTemplate $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.
In Apache JMeter, how do you capture an order id from a JSON confirmation body for the next request?
basics
~20 sAdd 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.
In JMeter, what is the difference in scope between a variable and a property?
basics
~10 sA 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.
In JMeter, when does a Response Assertion run relative to the sampler it checks?
basics
~10 sStraight 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.
In JMeter's Response Assertion, what do the Contains, Matches, Equals and Substring rules each test?
basics
~10 sContains 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.
In JMeter's Thread Group, what does the 'Action to be taken after a Sampler error' setting do?
basics
~20 sIt 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.
In JMeter, what makes an HTTP Request sample count as successful when no assertion is attached?
basics
~10 sThe 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.
In JMeter, how do you fail a sampler whose 200 response body omits the orderId field?
basics
~10 sAttach 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.
Which JMeter command-line flags produce the HTML dashboard at the end of a non-GUI run?
basics
~10 sTwo 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.
In JMeter's HTML dashboard, what does each column of the Statistics table tell you?
basics
~10 sThe 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.
Which columns does JMeter write into a CSV results file (JTL) by default?
basics
~10 sJMeter'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.
In JMeter, which element streams metrics to InfluxDB or Graphite while a test runs?
basics
~10 sThe 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.
How do you build a JMeter HTML dashboard from last night's results file without re-running the test?
basics
~10 sRun 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.
What does each flag in the JMeter command `jmeter -n -t plan.jmx -l results.jtl` do?
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.
Why does Apache JMeter print a banner telling you not to load test in GUI mode?
basics
~20 sJMeter 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].
In Apache JMeter's bin/jmeter launcher, which environment variable sets the JVM heap, and what is its default?
basics
~10 sHEAP. 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.
Which JMeter listeners keep a copy of every sample, and which one is built for a load run?
basics
~20 sMost 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.
In Apache JMeter, what do the -J and -D command-line flags each define?
basics
~10 sJMeter'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.
In JMeter, how do the -r and -R command-line flags differ?
basics
~10 sBoth 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.
In JMeter 6, why does a distributed run refuse to start without rmi_keystore.jks?
basics
~20 sSince 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.
What does JMeter's bin/jmeter-server script actually start on a load generator?
basics
~10 sIt 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.
A JMeter Thread Group asks for 1,000 threads and the plan runs on six remote engines - how many threads hit the target?
basics
~10 sSix 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.
What does JMeter's mode property select for a distributed run, and what is its default?
basics
~10 sJMeter'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.
Which JMeter element types come in a JSR223 variant?
basics
~20 sApache 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.
In Apache JMeter, which directory does a third-party plugin JAR go in, and which one takes its dependencies?
basics
~10 sThe 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.
In a JMeter JSR223 PostProcessor, which bound object hands a captured value to the next sampler?
basics
~10 sThe 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}.
In JMeter, why does a BeanShell element re-pay its script cost on every call?
basics
~20 sJMeter 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.
What does a JMeter JSR223 element's 'Cache compiled script if available' checkbox actually do?
basics
~20 sIt 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.
In JMeter's HTTP Request sampler, what does ticking Retrieve All Embedded Resources do?
basics
~20 sJMeter 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.
In a JMeter test plan, what does adding an HTTP Cookie Manager change about the requests sent?
basics
~20 sAn HTTP Cookie Manager gives every JMeter thread its own cookie store: it saves the cookies a response sets and replays the matching ones on later requests to that site, so each thread holds a separate session.
In Apache JMeter, what must exist before a JDBC Request sampler can run a query?
basics
~20 sA 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".
How does JMeter's JMS Publisher find the broker it publishes to?
basics
~20 sThrough 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.
Before JMeter's HTTP(S) Test Script Recorder will start, what must the test plan already contain?
basics
~20 sA 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.
A JMeter non-GUI run where every sample failed still exited 0. What does JMeter's exit code report?
basics
~20 sJMeter'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.
What does Apache JMeter give a team out of the box that a code-first load runner does not?
basics
~10 sApache 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.
A nightly job runs jmeter -n -t plan.jmx -l results.jtl -e -o report and it fails on the second run. Why?
basics
~20 sLast 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.
Which column in a JMeter JTL file must a pipeline's pass rule count?
basics
~20 sThe 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.
Why is a JMeter .jmx plan harder to review and merge than a scripted load test?
basics
~20 sA .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.