Answered question

How do I retrieve machine name using Javascript or other way in Neoload

In my script I need to send machine and username in request header, I couldn't find a way to retrieve machine name in neo load, I was able to use context.CurrentLG.name, and it returns as "localhost" all the time, not machine name. how can I get machine name in neoload?

Ramchander D.
Ramchander D.

Ramchander D.

Level
0
24 / 100
points

The "context.CurrentLG.name" method is the right method to use. But this 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.

Did you find this useful ?

No (0)

Yes (0)

0% of users found this answer useful

Other answers

Ramchander D.
Ramchander D.

Ramchander D.

Level
0
24 / 100
points

Thanks Nouredine, In Runtime tab, I added load generator host name instead of localhost and it worked.