10
Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared to other load testing tool, JMeter lags certain features. This document provides an overview of enhanced features available in JMeter which makes it powerful like other commercial testing tools. Enhanced features added to JMeter include: Auto CSV generation Bandwidth throttling Dynamic bandwidth throttling IP Spoofing TPC-C Sampler Smtp config element Filterd Results Plugin Auto CSV config Creates a CSV file directly from the database table mentioned. For testing an application which has a form or request that takes multiple data entries from a large no of users and the data entries are required to be unique for different users, it becomes a redundant work to type .csv files with unique data entries. Figure 1.1: Auto CSV config element GUI The above figure shows the test plan with HTTP Samplers, to which CSV data config element is added as a child.

Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

  • Upload
    others

  • View
    18

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

Enhancement of JMeter

Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared to other load testing tool, JMeter lags certain features. This document provides an overview of enhanced features available in JMeter which makes it powerful like other commercial testing tools.

Enhanced features added to JMeter include:Auto CSV generationBandwidth throttlingDynamic bandwidth throttlingIP SpoofingTPC-C SamplerSmtp config elementFilterd Results Plugin

Auto CSV config

Creates a CSV file directly from the database table mentioned. For testing an application which has a form or request that takes multiple data entries from a large no of users and the data entries are required to be unique for different users, it becomes a redundant work to type .csv files with unique data entries.

Figure 1.1: Auto CSV config element GUI

The above figure shows the test plan with HTTP Samplers, to which CSV data config element is added as a child.

Page 2: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

Figure 1.2: HTTP Sampler to which the .csv file is added as child In the above test plan, the parameters of request are set with variables mentioned in the 'CSV data set config'.

Bandwidth Throttling:

Using Bandwidth throttling, Jmeter can be used to create test plans to simulate slower connections.Bandwidth throttling is used to simulate various bandwidth limits. In real life scenario, there aresituations where some people use extremely high bandwidth connection while others use lowbandwidth mobile connections to use various web services. So there is a need to test these servicesfrom users using variable bandwidths. Bandwidth throttling along with IP Spoofing provides usersto test this scenario.

Figure 2.1: Bandwidth Throttling GUI

The above figure describes the bandwidth throttling GUI added to HTTP Request default config element.The below figure shows the HTTP Request Defaults for two different thread groups. Figure2.3 and Figure 2.4 clearly depicts the difference between two thread groups as the response with lower bandwidth takes more time than one with higher bandwidth.

Page 3: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

Figure 2.2 : HTTP Request Defaults for thread group1 and thread group2

Figure 2.3 : Aggregate Report for thread group1

Figure 2.4 : Aggregate Report for thread group2

Page 4: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

Dynamic Bandwidth Throttling

Dynamic bandwidth throttling can be used to test performance of web services under varying bandwidth at runtime.Through dynamic bandwidth throttling we would be able to vary bandwidth dynamically based on our requirements.

Figure 3.1 : Dynamic bandwidth throttling specifications in HTTP Request Defaults

The above figure shows the dynamic bandwidth throttling interface added in HTTP Request Defaults. In the figure 3.2, the log of jmeter has been shown which records the change in percentage error as well as applicable bandwidth for jmeter.

Figure 3.2 : JMeter log image : Showing error rate crossing 7% and degrading bandwidth

Page 5: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

IP Spoofing:

IP Spoofing is the creation of IP packets with forged Ip address with the purpose of concealing the identity of the sender.

Figure 4.1 : IP Spoofing config element GUI

The above figure shows a sample test plan for testing ip spoofing.The server log shows the request received from the IP addresses used in Jmeter.

Figure 4.2 : Result Tree in the Test Plan showing successfully sent requests

Page 6: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

SMTP Sampler

Smtp Defaults Config Element is a configuration element that can be used to set default values for Smtp samplers.

Figure 5.1 : First SMTP Sampler in the Test Plan

The above figure shows the SMTP sampler added to the thread group. Figure 5.3 shows the result tree for the first sampler.The request shows the message of the mail sent and the green icon besides the SMTP sampler shows the successful delivery of the message.

Figure 5.3 : Results Tree Listener for first sampler in the Test Plan

Page 7: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

AutomatingTPC-C Testing in Jmeter

TPC-C is a standard database server benchmark for transaction processing.It ensures that the server fullls some basic functionality of transaction processing irrespective of hardware and software requirements.

Figure 6.1 : Test Plan for TPC-C preliminary test

Figure 6.2 : JDBC connection configuration for the test plan

Page 8: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

In the JDBC Connection configuration, the connection parameters are given.These parameters are internally passed from the TPC-C Sampler GUI to the included test script via the Include Controller through functions created in Jmeter. Figure 6.3 gives the result after running the test.Here, in the request sent, all the functions have been resolved at runtime and the actual values are being sent.Figure 6.4 shows the jmeter plugin showing aggregate graph for min,max,average ,median and 90th percentile time for all transactions.

Figure 6.3 : View Results Tree Listener after the test run

Figure 6.4 : JMeter plugin showing Aggregate Graph

Page 9: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

Filtered Results Listener Plugin

The Filtered results Listener plugin works as an add-on to View Results in Table Listener in JMeter.When the user wants to set a filter on any value, he species a non-zero integer in the test box and runs the test, as the tables are populated; only the values greater/less than specified value will be displayed in the table.

Figure 7.1 : Old GUI without filtered results in View Results in a Table

Figure 7.1 shows the result for the listener, View Results in Table in the existing jmeter version. If we need the listener to display the results above or below a particular value,filtered results plugin is used. The below screenshot gives the results after filtering.

Page 10: Enhancement of JMeter - Kanwal Rekhi · Enhancement of JMeter Apache JMeter is an open source desktop application used to load test functional behaviour and measure performance. Compared

Figure 7.2 : New GUI with Filter 'Limit' in View Results in a Table