Reputation: 185
I have tried using beanshell and groovey and OS proccess sampler but none seem to work for me.
any suggestions would be appreciated
thanks.
Upvotes: 1
Views: 1653
Reputation: 58772
You can add Post processor to OS Process sampler, as Regular Expression Extractor and use Regular Expression as (\w+)
to get output
This is assuming you left Standard output
empty which will return the output in response data
Standard output (stdout Name of output file for standard output (STDOUT). If omitted, output is captured and returned as the response data.
Upvotes: 1
Reputation: 168082
The easiest would be using JSR223 Sampler like
vars.put('foo', 'your_command_here'.execute().text)
More information: Apache Groovy - Why and How You Should Use It
Upvotes: 0