Sunday, 15 June 2014

how to pass an image byte array to jdbc function call in Jmeter -


I want to call the JMBC function via Jmter and I'm able to do it with simple functions which are the text parameters But the function is now slightly changed and it takes the parameter as the byte array of the image. Please suggest how to browse an image from my PC local directory and how can I convert that image to a byte array and pass that array in JMBC call.

I think you should be able to use the solution option 3, such as with code Add a child to your JDBC request like

  import org.apache .commons.compress.utils.IOUtils; FileInputStream = New FileInputStream ("/ path / to / your / image.jpg"); Bytereon OutputStream Boss = New Bytereunootstream (); IOUtils.copy (in Bos,); Byte [] data = boss Batteryre (); Vars.put ("image", new string (data)); See image byte as  $ {image}  in the JDBC request sample and  

See Guide for Advanced Information on Bean Shell Scripting


No comments:

Post a Comment