2

I am trying to run one shell script file from jmeter. My jmeter version is 2.11. I am using OS Process Sampler to run shell commands. sh search.sh is my command and working directory is /root/. File is present under root directory. Above command runs when we try to run it from linux cli.

But, if we try to run it from jmeter then it gives error,

Exception occured while executing System Call:java.io.IOException: Cannot run program sh search.sh (in directory /root): java.io.IOException: error=2 NO such file or directory.

Kaustubh Khare
  • 153
  • 1
  • 9

2 Answers2

1

Use SSH sampler to run shell scripts.You can get it from google code .

http://code.google.com/p/jmeter-ssh-sampler/

user229534
  • 154
  • 3
1

i got solution for my problem. OS Process Sampler works differently. In command section we have to pass only core command. In above condition is sh. Then in working directory field, provide directory path, where command is present. Provide file name in parameter section. In this condition parameter field is search.sh. Now it will work.

It will execute above command as

  1. cd working dir
  2. sh search.sh
Kaustubh Khare
  • 153
  • 1
  • 9