{{announcement.body}}
{{announcement.title}}

Simulating User Funnels With Different Percentages in Apache JMeter

DZone 's Guide to

Simulating User Funnels With Different Percentages in Apache JMeter

Learn how to use funnel simulation with JMeter to perform funnel analysis on your users' journeys.

· Performance Zone ·
Free Resource

Funnel analysis tells your user's journey with its events that lead towards a goal. You can think about it as the engagement of a user in a mobile app up to the actual purchase. Funnel analysis is an effective way to calculate the conversion rates of specific user behaviors.

During a performance test project, you will be asked to simulate your customers' journey with specific numbers. The most common situation we encounter with this kind of request is Black Friday or Cyber Monday campaigns.

A funnel might be like the below example:

  • 100% of the users land on the main page
    • 50% select a movie on that page
    • 30% make a search
      • 50% browse to a result
    • 20% log into their account

Those are very good KPIs. Now you know what you have to implement in JMeter.

JMeter has many controllers to design test plans. For this purpose, we need to use Throughput Controller. This controller has three configuration elements. The most common use is done with the below configuration:

  • Select Percentage Execution in the Execution Style combobox.
  • Enter a percentage into the Throughput field. Enter a value between 0-100. If you enter 0, no user will execute the request that belongs to Controller. If you send 50, 50% of the total users will execute the request.
  • Don’t check Per User.

N.B.: Execution Style and Throughput are mandatory fields.

Note that when you add a Throughput Controller as a child to another Throughput Controller, the child controller will calculate the percentage according to the parent controller's percentage.

throughput controller

Let’s say 10 Threads will execute these tests.

  • We have one parent controller with 100 percent. That means 10 Threads will execute this “main page” request.
  • The user number will be divided into three controllers by different percentages, such as 30, 20 and 50 percent. This means five users will execute the “Movie page” request, three Threads will execute the “Login Page” request, and two Threads will run a “Search” request.
  • Finally, we have another 50 percent Throughput Controller under Search Controller. That means we have one Thread that will execute this request, as we have two Threads on the parent controller.

Now let’s add “Aggregate Graph” in the Test Plan and execute our test.

load testing

As you can see, Threads are executed according to their percentage.

These features and components are fully compatible with JMeter so you can use Loadium for your Funnel simulation.

Topics:
performance testing ,load testing ,stress testing ,jmeter ,performance ,tutorial

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}