简体   繁体   中英

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

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:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM