简体   繁体   中英

How capture unique id's from different match count for every user with or with out regex

I want to capture the id's for different users.when we put the load test or run with multiple usersin jmeter

I am capturing the id's of the users. Whem i am runing the script with different users the id was generating for the users.By using regex for the first user the id was generating in 5th match count position. For the second user the id was generating in 11 th position. For third user the id was generating in 46 th position. So i am unable parameterize these values through regex. So please help me how to pass id's for the corresponding user when we run script for more than 20 users. Without passing the correct id the scripit was failing.

As per JMeter Variables documentation:

Variables are local to a thread

So theoretically 2nd JMeter thread (virtual user) should know nothing about the variables which are set for the 1st JMeter thread and vice versa.

If you're hitting an endpoint which shows IDs for all users which are in the system, they you should apply some filtering in your regular expression so it would return only one match or consider other Post-Processor, ie

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