I have the following code in my beanshell postprocessor that executes a C# program and writes its output into Jmeter's console:
import it.sauronsoftware.base64.Base64;
prev.setDataEncoding("ANSI");
encoded = Base64.encode(prev.getResponseDataAsString());
print (exec("C:\\prog\\prog.exe decode " + encoded));
It works fast enough for me, but I want to pass the output from prog.exe
to a string (and then output that string as response data). Is it possible to do it using beanshell postprocessor? If not, what would be the easiest way to do it?