Klaus
Klaus

Reputation: 767

Start shell script from jmeter in directory of jmx

I have got a jmeter test that needs to run a shell script before it can start. The shell script lays in the directory of the jmx file. I use an OS Process Sampler to invoke the script, but the working directory is set to the bin/ folder of apache jmeter, and thus causing an error.

Is there a property for the current directory where my jmx testplan is?

apache jmeter 2.8 on ubuntu 12.04

Upvotes: 0

Views: 2496

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34516

The way to to it :

  • Add a User Defined Variables called shellDir with value ${__P(shellDir,default folder)}

  • Use it in your path as ${shellDir}/

  • Define this property at startup using -JshellDir=

See:

Upvotes: 1

Related Questions