Answered question

How can i get the available Controller Name and save it into a variable?

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

Did you find this useful ?

No (0)

Yes (1)

100%

100% of users found this answer useful

Other answers