In my jmeter test, I have a BSF PreProcessor step (using groovy) running before my HttpRequest step. I need to send a post with binary data in this HttpRequest step, but my binary data is compute on the fly. How can I set this binary data to the post body of my request? I see HTTPRequest has option to do binary post from file. But I don’t want to create a temporary file for each request.
Thanks,
As of jmeter version 2.6, there is no way to do that. Post of binary body expected file input HttpSampleProxy#setHTTPFiles(HTTPFileArg[] files). And the HTTPFileArg only contain the path to the real file on the file system. The UI has an option to set the post body as text but it is using HttpSampleProxy#setArguments(Arguments value). And the Arguments only use text body not binary. And I don’t know how to instantiate this object.