Unanswered question

How to use Java Script in Neoload

How to use the java script in neoload

Nrusingh P.
Nrusingh P.

Nrusingh P.

Level
0
75 / 100
points

Answers

Ramchander D.
Ramchander D.

Ramchander D.

Level
0
24 / 100
points

Add javascript action to virtual script and add your code. For example, I added following code to retrieve load generator hostname, which worked for me:

if (context.currentLG.name==null) {
context.fail("Agent Name not found");
}
context.variableManager.setValue("AgentName", context.currentLG.name);
logger.debug("Agent Name=" + context.variableManager.getValue("AgentName"));