The scope of this page will not cover general JMeter scripting lessons as there is plenty of support out on the net. Rather, I will cover those areas relevant to this solution. There are just a few guidelines to follow here.
The controller will place a file on each injector that gives the injector id and the total number of injectors. Thus if we have 10 injectors and you are on injector number 4, the file (injector.properties) will read 4,10. The file is placed in the same directory as the jmeter script.
The injector Id is provided so you can manipulate data in your script, in particular splitting data files to cover unique data across all virtual users
In the example script included I have gone a bit over the top with reading this file (using my general ‘read a line from a file’ groovy routine I got off the net). And I have written out the injector number and total to file. This was just as a test for my script and is not generally needed. Here’s the code: