Saturday, December 31, 2022

Introduction to JMETER and Performance Testing

 JMeter

  • JMeter is an open-source load-testing tool used by developers and performance engineers to measure the performance of web applications.
  • It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types.
  • Measure the application performance and response times.


Test Plan: (Top level directory)
  • A complete test plan will consist of one or more Thread Groups, logic controllers, sample-generating controllers, Listeners, Timers, Assertions, and configuration elements.
  1. Adding elements.
  2. Removing elements.
  3. Saving test plans.
  4. Running test plans.
  5. Stopping a test plan(immediate shutdown), Shutdown(graceful shutdown).
  6. Logging the info and errors.
Important components of a Test Plan:
  1. Thread Group
  2. Listeners
  3. Timers
  4. Assertions
Thread Group:
  • The beginning point of any test plan.
  • The thread group element controls the number of threads Jmeter will use to execute your test.
  • All controllers and samplers must be under a thread group.
Main properties of thread group:
  • Set the number of threads (simulation of a number of concurrent users).
  • Set the ramp-up period (time taken to threads up and running = ramp-up period/Thread 
Samplers:
  • Samplers send requests to the server and collect the response.
  • JMeter supports several types of samplers, including HTTP, FTP, JDBC, LDAP and SOAP.
Listeners:
  • Listeners can be added to test plans or thread group level.
  • Listeners provide a way to view the results of a test in JMeter.
  • Listener options - Graph result, view results tree, view result table, aggregate report, aggregate graph, response time graph.

No comments:

Post a Comment