Is there a reliable way to have some sections of a JMeter test only run on some engines?

Scalise, Michael 20 Reputation points
2024-11-04T13:59:26.75+00:00

I have an Azure Load Test that requires multiple engine instances to reach the required traffic load. However, one endpoint is expected to have much lower traffic than the others. As such, I want to be able to isolate the tests for that endpoint and only some engine instances run those while all of the others run across all instances.

Is there a reliable way to do this? JMeter has the system variable ${__machineName()}, so if the engine instances have reliably predictable names then it would be simple enough to only have the one with a given machineName run that set of tests, but I can not find any documentation about what Azure Load Test names the engine instances. Is there a way to reliably predict this value so that tests can be isolated to just some of them?

Is there some other reliable way to isolate tests to only some engine instances instead of having all of them run identical scripts?

Azure Load Testing
Azure Load Testing

An Azure service that enables developers and testers to generate insights on how to improve the performance, scalability, and capacity usage of their application

0 comments No comments

1 answer

Sort by: Most helpful
  1. Christos Panagiotidis 3,546 Reputation points
    2026-07-29T12:27:29.4233333+00:00

    You’re running a distributed JMeter test in Azure Load Testing and want a low-volume section to execute on only one engine. Azure Load Testing deploys the same JMX plan to every engine, and engine host names are implementation details, so branching on __machineName() is not a reliable allocation mechanism. For deterministic behavior, place that endpoint in a separate load test configured with one engine and coordinate its start with the main test. If one combined test is required, put the sampler under a Throughput Controller or Constant Throughput Timer and divide the intended aggregate rate by the configured engine count; every engine will contribute a small share, but the total rate is controlled. CSV split mode can distribute data rows among engines, yet it does not guarantee that a sampler runs on just one engine. Therefore, use a separate one-engine test when single-engine execution is a hard requirement.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.