0

I would like to start jmeter load test via console but it's Data Driven Load Test, so I need to read some information from csv files. I found a solution to include into User Parameters row to get the path to the place where the script was launched:

${__BeanShell(newFile(org.apache.jmeter.gui.GuiPackage.getInstance().getTestPlanFile().toString()).getParent())}

but I got an error in logs:

2013/06/11 15:23:54 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``newFile(org.apache.jmeter.gui.GuiPackage.getInstance().getTestPlanFile().toStrin . . . '' : Command not found: newFile( java.lang.String )

2013/06/11 15:23:54 WARN - jmeter.functions.BeanShell: Error running BSH script org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``newFile(org.apache.jmeter.gui.GuiPackage.getInstance().getTestPlanFile().toStrin . . . '' : Command not found: newFile( java.lang.String ) at org.apache.jmeter.util.BeanShellInterpreter.bshInvoke(BeanShellInterpreter.java:192)

What's wrong with this method?

Aliaksandr Belik
  • 12,725
  • 6
  • 64
  • 90
ShurupuS
  • 2,923
  • 2
  • 24
  • 44

1 Answers1

2

The issue is you have:

  • newFile

instead of:

  • new File
girlytech59
  • 408
  • 2
  • 6