Friday, June 19, 2009

Jmeter variable from Javascript

http://markmail.org/message/ulcmpdtuz7rumotp
http://www.mediacollege.com/internet/javascript/number/random.html
1. Create "User Defined Variables"

Variable SCRIPT:
var randomstring = ''; var chars = "abcdefghiklmnopqrstuvwxyz";for (var i=0; i
Originally from:



There is no need to escape the commas in the SCRIPT variable, because the above statement is parsed before the the variable is replaced by
its contents.



2. Use Variable in JMeter Sampler:
${__javascript(${SCRIPT})}

No comments: