0

My application will take jmx file as test plan from user and execute it. I've JMeter distributed setup at the backend of my application (1 JMeter client and multiple JMeter servers).

The challenge I'm facing is with the #threads required to execute the test plan.

  1. If I take #instances (JMeter servers executing the test) and #threads explicitly from the user, how do I configure user-provided test plan with this Thread-group before execution? This will allow me to verify these values with my cluster and machine capacity beforehand.

I had read about Include Controller, but that necessarily requires user test plan to have Test Fragment.

  1. If not explicit, how do I verify the Thread group configuration in user test plan? Suppose, user has put large #threads in the test plan that could overload my JMeter server machine, how do I verify this value and probably warn the user to limit the #threads?
Madhuri Jain
  • 77
  • 1
  • 11

1 Answers1

1
  1. There is no such a thing as "#threads_per_instance" in JMeter world, if you run JMeter in distributed mode each server (or slave or load generator) executes .jmx test plan provided by the client as it is so if user uploads file with 100 threads in a Thread Group and you have 1 slave - you will have 100 users. If you have 2 slaves - you will have 200 users, etc.

    Another thing is that you cannot tell how many threads you will be able to simulate from a single JMeter slave beforehand as it mainly depends on the nature of the test: request/response size, number of pre/post processors, assertions, listeners, etc. I would recommend implementing some form of JMeter slaves health monitoring and warn the user if CPU or RAM or Network usage starts exceeding 80%. It can be easily achieved using JMeter PerfMon Plugin

  2. We don't know what technologies are being used in "your application" so this question is too broad. JMeter .jmx scripts are just XML files so you should be able to use XML parser to extract the number of threads in all Thread Groups and "validate" it somehow.

    enter image description here

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Hi @[Dmitri](https://stackoverflow.com/users/2897748/dmitri-t), is XML parsing the only way to get the thread groups in the user test plan? I'm using a Java app that's using JMeter API to load user test plan file. The caveat is that the user test plan might contain plugins like Ultimate Thread Group. How can I figure out the max number of concurrent users in the test plan for validation or manipulation in such scenario? – Madhuri Jain Sep 01 '20 at 06:40