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

Server Index is now a JMeter Property

By: David Koziel

JMeter tests running on RedLine13 with multiple load generators have visibility to the server “index” number as a JMeter property.  One of our customers was running large scale load tests across multiple servers.  They needed a way to correlate test plans running on individual server machines, something akin to the example described below.  Sometimes useful features come from our customers solving real-world issues, and this is an example of one such case.

This property – rl13_agentindex – joins two other similar properties (rl13_serverid and rl13_testid) that RedLine13 exposes. Here is a summary of these properties for reference:

  • rl13_agentindex:
    • Zero-based index of load generator (e.g., “0”, “1”, etc.)
  • rl13_serverid:
    • AWS-assigned unique identifier for a load generator instance
  • rl13_testid:
    • The test ID number that is assigned by RedLine13

In order to take advantage of these properties, you may use JMeter property variable notation in your request handlers or within your scripts.  The preferred shorthand for this notation is via use of the __P() function covered here in JMeter’s documentation and used as follows:

${__P(property_name,default_value)}

or, if no default value is needed:

${__P(property_name)}

If for instance we wanted to access the rl13_agentindex property, we could include the expression ${__P(rl13_agentindex)} in an HTTP request sampler or any BeanShell Post-processor script.

One useful case might be to match a specific load generator to a specific request.  In the following example we are passing rl13_agentindex to an API call to be correlated with application logs:

Passing rl13_agentindex through to an API endpoint.
Passing rl13_agentindex through to an API endpoint.

In our JMeter output we find this translates to the following request:

https://api.webservice.com/v1/widget?item_code=101&request_origin=3

From there we can find “request_origin=3” in our application logs, and also compare to output files generated for load agent server “3”:

server index is now a JMeter property
Output files for load generator server number “3” can be downloaded individually.

This can be immensely useful for both troubleshooting a test plan in development, as well as root cause analysis of a problem uncovered as a result of a performance test.

Did you know that RedLine13 offers a full-featured free trial?  Sign up now and follow these steps in your first cloud test with us today.

2022-03-15
Previous Post: How to Simulate Slow Internet Connections with JMeter
Next Post: JMeter Test Capacity Limits

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
  • 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
  • Functional Testing vs Performance Testing
  • A Gentle Introduction to Load Testing
  • Using the JMeter Counter Element

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

Designed using Responsive Brix. Powered by WordPress.