Search code examples
jmeterlockingdistributed-testing

JMeter - add Lock in a Distributed testing


I use a Critical Section Controller in my jmx and I want to use jmx in Distributed enviroment, but there is a warning that it can't be done:

Critical Section Controller takes locks only within one JVM, so if using Distributed testing ensure your use case does not rely on all threads of all JVMs blocking.

How can I still block multi threads for accessing same block for when using master-salve execution?

Can I use blocking using file system with OS Process Sampler?


Solution

  • I would rather go for HTTP Simple Table Server as in case of creating a lock file you will need to set up some form of shared folder via CIFS or NFS and HTTP Simple Table server can be used to orchestrate all the remote engines from a single host (i.e. JMeter Master instance)

    You can install HTTP Simple Table server using JMeter Plugins Manager

    JMeter HTTP Simple Table Server


    Another, easier, option would be going for If Controller in conjunction with __machineName() or __machineIP() function so the "critical" section would be executed by only one specified slave.