On 13/10/2009, Circle Computers <[email protected]> wrote: > > Hi > > First post, I've searched and cannot find the answer to my question so here > goes. > > I've been using JMeter for about 6 months now with great success. > > For my next project I need to be able to encode the data I'm sending to a > HTTP server into Base64 (querystring & post data). The data source will be > an external CSV file so theoretically I could encode the source before > reading into Jmeter but for all kinds of reasons that is not the best way to > do it. > > So the idea is to read the CSV file as normal ASCII, then encode the > particular strings as Base64 ready for posting. > > It does not look like this a standard function of JMeter but from some other > references I googled it appears as though you could achieve this by making > reference to external Java function, but thats where I get stuck as the > information I can find does not seem to go far enough to explain how. > > Does anyone have experience with Base64 encoding in JMeter or event just > calling an external Java function in Jmeter?
You can use the BSF or BeanShell pre-processors to call any Java function you like, and save the converted result in a variable. Or you can use the __jexl() or __BeanShell() - or perhaps __javaScript() - functions directly Or you can write your own function. > Thanks. > > Gary > > -- > View this message in context: > http://www.nabble.com/Encode-HTTP-QueryString---Post-Data-to-Base64-tp25868105p25868105.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

