Skip to content
  • ZipCode Api
  • Blog
  • About RedLine13
RedLine13
RedLine13
Primary Navigation Menu
Menu
  • Start Testing
  • Demo
  • Pricing
  • JMeter
  • Partners
  • Docs
    • Documentation Home
    • AWS Set Up for load testing
    • AWS Approval for Large Tests
    • PHP, NodeJS, Python Load Tests
    • Scalability
    • Jenkins Plugin Setup
    • Premium Features
    • Knowledge Base

Using the JMeter Counter Element

By: David Koziel

Using the JMeter Counter Element

The Counter element is a built-in feature of JMeter which generates sequential reference numbers within the scope of a thread group. These sequential numbers can be useful in identifying or grouping requests originating from a discrete iteration within a recurring process. In this brief article, we will review the features of the Counter element and describe how it may be utilized in a JMeter load test.

Configuring the Counter Element

There are several parameters that may be set for the Counter element to control its behavior:

  • Starting value – the initial value the counter will start with.
  • Increment – the number by which the counter value will increase with each iteration.
  • Maximum value – the maximum value the counter will assume.
  • Number format – formatting applied to counter value.
  • Exported variable name – name of the variable containing counter value.
Configuration options for the JMeter Counter element
Configuration options for the JMeter Counter element.

There are also check boxes that control how counter values are used and regenerated. If the “track counter independently for each user” option is set, the counter tracks separate values for each virtual user.

Using the Counter in JMeter Tests

Based on the name ascribed in the configuration above, the Counter element will populate a user variable with the current counter value. This can be accessed in your tests using ${...} convention or property notation. Query strings, request arguments, and custom scripting variables can be set to this value and thereby associated with a discrete sequenced value.


Did you know that RedLine13 offers a full-featured, time-limited free trial?  Sign up now, and start testing today!

2025-01-09
Previous Post: Getting a “Grounded” Test to Launch
Next Post: A Gentle Introduction to Load Testing

Recent Posts

  • JMeter XML Format Post Processor
  • Order of Elements in JMeter
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener

Related

  • JMeter XML Format Post Processor
  • Order of Elements in JMeter
  • SAML Configuration with Azure AD and RedLine13
  • SAML Configuration with OKTA and RedLine13
  • SAML Configuration with Google and RedLine13
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener
  • Using Test Fragments in JMeter Tests
  • Step-by-Step Guide to Testing with JMeter

© RedLine13, LLC | Privacy Policy | Contract
Contact Us: info@redline13.com

Designed using Responsive Brix. Powered by WordPress.