Posts

Showing posts with the label JMeter

JMeter Quick Hacks

Add JMeter application to PATH variable Windows machine Open the System Properties window and click the Environment Variables button. In the System variables section, locate the Path variable, select it, and click Edit. In the Edit Environment Variable window, click New and add the full path to the bin directory where JMeter is located (e.g., C:\apache-jmeter\bin). Mac/Linux machine Open a terminal window. Edit your shell profile file (depending on the shell you're using, this could be .bashrc, .bash_profile, .zshrc, etc.). For example, if you're using Bash , run: nano ~/.bash_profile If you're using Zsh , run: nano ~/.zshrc Add the following line to the end of the file, replacing the path with your JMeter bin directory: export PATH=$PATH:/opt/apache-jmeter/bin Save the file and exit Increase Heap Size of JMeter Application For windows -  Modify the below command the jmeter.bat file in "jmeter/bin" folder Ex - set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=25...

Workload Modelling for performance tests using little's law formula

 In the context of performance testing, Little's Law is often applied to analyze and understand system behavior under load. Here's how it relates to performance testing: 1. **Throughput (\(\lambda\)):** In performance testing, throughput refers to the rate at which a system can handle a certain number of transactions or requests per unit of time. This can be measured in transactions per second, requests per minute, etc. 2. **Response Time (\(W\)):** Response time in performance testing represents the time taken by the system to respond to a request, typically from the moment the request is sent until the response is received. It's often measured in milliseconds or seconds. 3. **Concurrency or Load (\(L\)):** In performance testing, concurrency or load represents the number of active users or transactions within the system at a given point in time. Little's Law can be applied in performance testing scenarios to derive various insights: - **Understanding System Behavior:*...

Correlation in JMeter

Correlation is the process of extracting information from the response of one request and using it in the request of another step at runtime. This is necessary when dynamic values from the response of previous requests needs to be passed in subsequent requests. Correlation is used in performance testing for dynamic websites, where the server responds to dynamic variables that keep on changing every time Correlation can be achieved using below components on need basis and these are part of post processor component group . Boundary Extractor :  It can be used when we have fixed right and left boundary of the dynamic value which needs to be captured.  Regular Expression Extractor : It can be used capture dynamic value based the regular expression. JSON Extractor :  It can be used capture dynamic value when the response is in JSON format. XPath/Xpath2 Extractor :  It can be used capture dynamic value from any HTML element using HTML expression. Xpath2 Extractor...

Create JMeter test plan for web page

To create a JMeter test plan for web testing, follow these steps: Create a Test Plan: A test plan is a container for running tests. It defines what to test and how to go about it. A complete test plan consists of one or more elements such as thread groups, logic controllers, sample-generating controllers, listeners, timers, assertions, and configuration elements. A test plan must have at least one thread group. Add a Thread Group: Thread Group elements are the beginning points of any test plan. All controllers and samplers must be under a thread group. The thread group element controls the number of threads JMeter will use to execute your test. You can configure the number of threads, ramp-up period, and the number of times to execute the test. Add Default HTTP Request Properties: You can define the default settings for your HTTP requests. This is where you specify the Web Server's Server Name/IP and other default settings. Add HTTP Requests: In this step, you specify the tasks tha...