Apache JMeter Interview Questions - Level 1 (Load | Performance Testing Tool)
By- Abhishek Singh

Apache JMeter Interview Questions - Level 1 (Load | Performance Testing Tool)

1) Explain what is JMeter?

  • Apache JMeter is an Apache project that can be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications.
  • Apache JMeter application is open source software, a 100% pure Java application
  • Originally designed for testing Web Applications but has since expanded to other test functions.


2) Explain how JMeter works?

  • Apache JMeter is used to simulate varying or heavy loads on singular or multiple servers, networks or objects to test a system's strength.
  • JMeter works by?simulating groups of users that send requests to a server or network, then returning statistics back via graphs or tables.


3) List out various applications/server/protocol types it supports?

  • Web - HTTP, HTTPS (Java, NodeJS, PHP, ASP.NET, …)
  • SOAP / REST Webservices
  • FTP
  • Database via JDBC
  • LDAP
  • Message-oriented middleware (MOM) via JMS
  • Mail - SMTP(S), POP3(S) and IMAP(S)
  • Native commands or shell scripts
  • TCP
  • Java Objects

4) List out features of JMeter ?

  • Ability to load and performance test many different applications/server/protocol types.
  • Full featured Test IDE that allows fast Test Plan?recording (from Browsers or native applications), building and debugging.
  • Command Line Mode (CLI )
  • A complete and ready to present dynamic HTML report
  • Easy correlation through ability to extract data from most popular response formats,?HTML,?JSON?,?XML?or?any textual format.
  • Complete portability and?100% Java purity.
  • Full?multi-threading?framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
  • Caching and offline analysis/replaying of test results.

5) Is JMeter a browser?

  • JMeter is not a browser, it works at protocol level.
  • JMeter looks like a browser (or rather, multiple browsers), however JMeter does not perform all the actions supported by browsers.
  • JMeter does not execute the JavaScript found in HTML pages.
  • It does not render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).

6) What is Thread Group in JMeter?

  • Basic element of JMeter Test Plan.
  • Thread Group is group of threads executing the same scenario.
  • Thread group holds test elements.
  • Every thread represent one application under test.
  • In Thread group you can set a number of users and time to load all the users given in the thread group.

7) What is ramp up period?

Amount of time in seconds JMeter needs to loads the amount of threads(users) for the test.

8)What is difference between “Stop Test” and “Stop Test Now” in JMeter?

Stop Test – Stops the thread in case of any sampler error in JMeter post any active thread completion.

Stop Test Now - Stops the thread in case of any sampler error in JMeter without any active thread completion.

9)What is sampler?

Samplers allow JMeter to send specific types of requests to the server.

10). List out few samplers available in JMeter?

  • HTTP Request (can be used for SOAP or REST Webservice also)
  • JDBC Request
  • Java object request
  • JMS request
  • JUnit Test request
  • LDAP Request
  • Mail request
  • OS Process request
  • TCP request

11) What port number is used in HTTP request sampler for https request by default?

443

12) What port number is used in HTTP request sampler for http request?

80

13) How to analyze results in JMeter?

Listeners, it is a component that shows the results of the samples which is used for analyzing and reporting results.


14) List out few Listeners in JMeter?

  • View Results Tree
  • View Results in Table
  • Summary Report
  • Aggregate Report
  • Aggregate Graph
  • Assertion Results
  • Comparison Assertion Visualizer
  • Graph Results
  • Response Time Graph
  • Simple Data Writer
  • Generate Summary Results

15) What is throughput?

Throughput: Throughput is a measure of requests/unit of time.

The calculation of time begins from the start of the first sample to the end of the last one. Basically, it is the amount of transactions happened over test duration.

16) What is standard deviation?

  • Standard Deviation: How response time is spread around the mean. The smaller the SD response time is more consistent.
  • The standard deviation (σ) measures the mean distance of the values to their average (μ).It gives you a good idea of the dispersion or variability of the measures to their mean value.
  • The following equation show how the standard deviation (σ) is calculated:σ = 1/n * √ Σi=1…n (xi-μ)2


17) What is connect time?

Connect Time: Time taken to establish TCP connection b/w client and server using TCP Handshake. If TCP Handshake is successful, then the client can send further requests (HTTP request - HTTP layer). If not, the client can't talk to the server.

18) What is latency ?

Latency: Meter?measures the latency from just before sending the request to just after the first response has been received. Thus the time includes all the processing needed to assemble the request as well as assembling the first part of the response, which in general will be longer than one byte.

Time we started getting first byte of the response.

19) What is Load Time?

Load time is total time take by the request in which it receives the full response from the server.

20) What is the extension of Test Files in JMeter?

.jmx

21) What do you mean by 90%, 95% and 99% line in Aggregate Report listener?

90%/95%/99% line provides the time in which 90%/95%/99% of the requests were completed.

22)What do you mean by Min & Max in Summary Report Listener?

Min represents the minimum time it took to complete the request and max means the maximum time it took to complete the request.

23)What is Assertion in JMeter?

Assertions are validators. It is used to verify and validate the response of the request sent to the server.

24)What are different types of assertion in JMeter?

  • Response Assertion
  • Duration Assertion
  • Size Assertion
  • XML Assertion
  • BeanShell Assertion
  • MD5Hex Assertion
  • HTML Assertion
  • XPath Assertion
  • XPath2 Assertion
  • XML Schema Assertion
  • JSR223 Assertion
  • Compare Assertion
  • SMIME Assertion
  • JSON Assertion
  • JSON JMESPath Assertion

25)What mode should be used for load testing with JMeter?

CLI / Non GUI Mode

No alt text provided for this image

26) Can you execute GUI test using Command line, if yes what is the command?

?Yes, The command is <jmeter.bat(Windows)/jmeter.sh(Linux) [-p property-file]>


27) How to run JMeter test using command line for Non GUI mode?

?Open a command prompt (or Unix shell) and type:<jmeter.bat(Windows)/jmeter.sh(Linux) -n -t test-file [-p property-file] [-l results-file] [-j log-file]>


28.How to generate reports HTML reports in JMeter using command line?

?Open a command prompt (or Unix shell) and type: <jmeter.bat(Windows)/jmeter.sh(Linux) -n -t test-file [-p property-file] [-l results-file] [-j log-file] -e -o [Path to output folder]>

29. How to generate CSV reports using existing CSV?

?Open a command prompt (or Unix shell) and type:<jmeter.bat(Windows)/jmeter.sh(Linux) -g [csv results file] -o [path to output folder (empty or not existing)]>


30. What is latest version of JMeter available as of today?

The latest version of JMeter is 5.5 as of 27 Aug - 2022.

No alt text provided for this image

要查看或添加评论,请登录

Abhishek Singh的更多文章

社区洞察

其他会员也浏览了