JMETER a ${__RandomString function that is used for creating email addresses
mail format:
RandomString(COUNT_OF_CHARS,LIST_OF_CHARS,) + '@' + RandomString(COUNT_OF_CHARS,LIST_OF_CHARS,) + '.' + RandomString(COUNT_OF_CHARS,LIST_OF_CHARS,)
We can specify how many characters it should contain using function ${__Random(MIN,MAX,)}
So finaly it may look like:
${__RandomString(${__Random(3,9,)},abcdefghijklmnopqrstuvwxyz,)}@${__RandomString(${__Random(2,3,)},abcdefghijklmnopqrstuvwxyz,)}.${__RandomString(${__Random(2,3,)},abcdefghijklmnopqrstuvwxyz,)}
As per Using JMeter Functions guide __RandomString() function takes 3 parameters:
- Length of the desired random string
- Source characters
- If you need to store generated string into a JMeter variable you can provide variable name as 3rd argument.
So to get line of 10 alphabet characters you can use __RandomString function as follows:
${__RandomString(10,abcdefghijklmnopqrstuvwxyz,)}