I have created two transaction controllers in a thread group which accesses same csv file. My goal is to scan and pass a barcode through 2 transaction controllers. If first transaction controller scans a barcode then the 2nd one should scan or pass a barcode as they are accessing the same csv file.
When I execute my script the first transaction controller successfully scans and pass the barcode but the 2nd transaction controller's APIs shows 401 error. If I use only 1 transaction controller (Any of 2) then it shows no error but I want that both should work.
In order to make work both transaction controller with separate tokens what approach I should follow?
Note :
Both Transaction Controllers uses separate token values. For my script I have passed the tokens from a separate csv file (Token1, Token 2)
All barcodes are stored in another csv file that means both transaction controllers are accessing same csv file and for only tokens the script is accessing a separate csv.
Scenario: Suppose, Transaction Controller 1 scans a barcode (let's say 10010) and passes it then the 2nd transaction controller should not throw any error and should scan same barcode.
My Observation:
In both transaction controller the token value is different, Eg - for first it is "XYZ==" and for 2nd it is "mkp!=". If I provide same token value in both transaction controller then the script works fine but if I provide separate token values then only 1 works and second fails. Is there any solution by which I can manage multiple tokens in a single thread group?
Note: Tokens are passed in jmeter script by using separate csv file.
Please find the attached photo for further reference.Error
With default Sharing Mode of "All threads" JMeter will pick up the next line from the CSV on each iteration of each virtual user. If you want 2nd user to read the same value as 1st one - change Sharing Mode to "Current Thread"
Alternatively you can use __CSVRead() function where you decide when to proceed to the next line