3

WHAT I HAVE:

Huge Jmeter agents network, 1 master + many slaves. Master sends tasks to Slaves, they start test execution and report data to Master.

WHAT I WANT:

Be able to modify inputs (passed as global properties to Master, -G) on the fly, while test is executed, without necessity to stop/restart test.

WHAT I KNOW:

  1. I can use BeanShell server to modify Jmeter properties while running the test. It works fine. But BeanShell server starts only on Master, not on Slaves.
  2. Master sends -G properties to Slaves only once, before test execution. Even if Master properties are updated, slaves never get this information until test is restarted.

QUESTION:

How can I modify properties on Slaves as well? Is there any proper solution?

WHAT I THOUGHT ABOUT:

  1. Well, I can do the same trick with BeanShell server for every Slave node too. But this solution doesn't look really ideal for me as I have a lot of agents and have to update all of them. It takes time.
  2. I can change my test logic to update properties from file periodically, and then modify files on Slaves on the fly. Looks even easier for me than #1 as it's cheaper to modify a file over ssh remotely then to launch a separate server on every node.
  3. Actually, all I need in fact is to write a proper method/function for BeanShell server that not only changes properties locally but informs Slaves about it. I'm not so familiar with Jmeter source code yet (just started) but know that it's already implemented inside the code as a part of remote launching procedure. So, if you can point me to the right class to take a look into - it can help me a lot.

Any ideas appreciated. Thanks in advance.

1 Answers1

2

You can add to your Test Plan Property File Reader which will read and update properties in Slaves, you can add properties on runtime in Master using Beanshell/JSR233 element.

user7294900
  • 47,183
  • 17
  • 74
  • 157
  • Thanks for your reply. Actually, that's what I'm currently doing: update them manually on every node by reading from file periodically. However, I don't think that it's an ideal solution: Jmeter has build-in communication mechanism between slaves and master, I just need to find a proper way to use it. – Konstantin Dobroliubov Sep 19 '17 at 07:46