Search code examples
jmeter

JMETER a ${__RandomString function that is used for creating email addresses


I have tried:

${__ RandomString (qwerty,"@",".com") }  

but it is not fine. I wonder how can I create this type of random email addresses? I haven't added anything in the Random Variable because I am not sure that I need to use it.


Solution

  • As per Using JMeter Functions guide __RandomString() function takes 3 parameters:

    1. Length of the desired random string
    2. Source characters
    3. 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,)}