简体   繁体   中英

How to pass unique data from csv file into jmeter

我正在使用 jmeter 对 Web 应用程序进行负载测试。我正在使用 csv 数据集配置传递电子邮件来测试登录场景。虽然我有 100 个并发用户运行,但它正在从 csv 文件中选择相同的电子邮件。我如何确保它将只使用一封电子邮件一次。

I was facing the same issue during concurrency testing using CSV data config. By enabling Sharing Mode=All Threads in CSV data config solved my problem and i was able to send unique data per request在此处输入图片说明

Use Random String Function for generation of different email ids,

RandomString function returns a random String of length using characters in chars to use. It has three 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.

${__RandomString(6,a12zeczclk, MYVAR)}

Example as,

${__RandomString(10,abcdefghijklmnopqrstuvwxyz,)}@MyMail.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM