As you correctly mentioned, "it's working perfect on bash". 

Groovy knows nothing about the pipe symbol so you need to execute  bash -c
command <https://www.gnu.org/software/bash/manual/bash.html>   and pass your
whole command as the parameter, something like:


> "/bin/bash -c \"echo -en \\\"https://my-url.com:8888\\\"; | openssl smime
> -sing -signer cert.crt -inkey cert.key -outform der -binary -md sha384
> -out blah.p7\"".execute().text

Groovy neither knows your *$path* environment variable, if the environment
variable exists and is available to JVM you can read its value using 
System.getEnv()
<https://docs.oracle.com/javase/tutorial/essential/environment/env.html>  
function

It might be easier to go for  OS Process Sampler
<https://jmeter.apache.org/usermanual/component_reference.html#OS_Process_Sampler>
 
, check out  How to Run External Commands and Programs Locally and Remotely
from JMeter
<https://www.blazemeter.com/blog/how-run-external-commands-and-programs-locally-and-remotely-jmeter/>
  
article for details. 

And from the performance perspective instead of calling external
applications you should rather consider creating the CSR request using i..e 
BouncyCastle API <https://www.bouncycastle.org/>  
 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to