import random
randImageString = ''
for i in range(16):
    randImageString = randImageString + chr(random.randint(ord('A'), ord('Z')))
vars.put('randimage', randImageString)
JMeter - Run a python script before calling each HTTP request sampler