Need help. Need to log in multiple users, so, I'm using CSV Data Set Config. Received dynamic authCode I'm storing in another .csv file, and as the result finaly I'm receiving token, which I also store in .csv. While posting HTTP request I'm passing token with user data from .csv, How can I differentiate tokens, to post 1000 of request using 4 users only?
1
votes
1 Answers
0
votes
Short Answer: JMeter automatically does it for you. you no need to save authCode & token
in the CSV files.
Long Answer:
- Save the
authCode
usingRegular Expression Extractor
. name the variable asauthCode
. - Replace with
${authCode}
whereverauthCode
value is sent in subsequent requests. - Capture the token value using
Regular Expression Extractor
and store the value in a variabletoken
- Replace with
${token}
wherevertoken
value is sent in subsequent requests.
you no need to worry about the thread/vuser
, to associate authCode
, token
and the corresponding thread
. JMeter handles it for you by storing those authCode
, token
values for each thread
and maintains the state.
For more specific answer, please share your Test Plan and mention what exactly you want to achieve.