i would like to save the controller name from the current Scenario and save that to a custom variable in javascript. Maybe it is possible to get the name of the controller from the current run?
During a load test, run a single user for 1 iteration on the localhost LG (aka the Controller), this user can run a userpath containing some javascript that gets the hostname and stores it on a shared queue or in a constant variable (see context.CurrentLG.name). One thing to note, the "context.CurrentLG.name" method will return the name or IP that was used when you discovered your load generator. So if you would like to get the hostname make sure to discover your load generators using their hostnames. That includes the local load generator. That said, as you are running the test, you could pass in the hostname as a parameter on the command line using the variables switch
I don't think there's a way to retrieve the controller name. Why do you need it?
Neil was made best respondent
Neil answered
christophe answered
Louis posted a new question