jav*_*uez -1 testing performance automated-tests qa jmeter
我需要做一些性能测试并模拟100个不同的用户,但是如何为用户和电子邮件创建随机变量?
您可以使用__RandomString()函数生成随机电子邮件,例如:
${__RandomString(10,abcdefghijklmnopqrstuvwxyz,)}@hotmail.com
the above function will return a random alphabetic string 10 characters long
Run Code Online (Sandbox Code Playgroud)
演示:
您可以将__RandomString()函数直接放入HTTP Request参数中,例如:
每次调用函数时,__RandomString()函数调用将被运行时生成的随机值替换.
请参阅Apache JMeter函数 -在JMeter测试中开始使用函数的简介指南