1
votes

I am new to Jmeter and trying to carry out the following flows:

  1. User Login with username and password
  2. Page 1 is displayed with 10 invoices - User select ten invoices - 10 ajax call is executed (invoice1, invoice2,invoice3.. json file is generated with invoices as request)
  3. Page 2 is displayed to view invoices
  4. User log out

I have recorded the flow with blazemeter plugin on chrome.

The thread group in Jmeter has the following tasks:

  1. I have 10 users in a file called users.txt and i am using CSV Data set config to load them.
  2. For each user I will load only 10 invoices from invoices.txt using CSV Data set config to load them.
  3. Since I have 10 users and each user needs 10 invoices, my invoices.txt has 100 unique invoices.

Please find csv config for invoice below:

enter image description here

The problem is that I need each user to be assigned with 10 unique invoices and those 10 invoices cannot be allocated to another user.

Any idea how I can load 10 unique invoices for each user and make sure those invoices are not assigned again to another user?

2
invoices.txt have unique IDs? is its CSV Data Set sharing mode is All Threads?user7294900
yes they are unique and sharing mode is All threads. I have updated my post with this infouser1999453

2 Answers

1
votes

invoices.txt should have only unique IDs before test start, you can share the IDs using:

CSV Data Set Config inside loop of users with attributes:

Sharing mode - All Threads - ID won't be repeated

Recycle on EOF? - False - for not to get invalid Id (<EOF>)

Stop thread on EOF? - True - Stop when file with unique IDs ends
1
votes

You can consider using HTTP Simple Table Server instead of 2nd CSV Data Set Config.

HTTP Simple Table Server has KEEP option, given you set it to FALSE each used "invoice" will be removed, it will guarantee uniqueness even in case when you run your test in Distributed (Remote) mode

You can install HTTP Simple Table Server (as well as any other JMeter Plugin) using JMeter Plugins Manager

JMeter Plugins Manager HTTP Simple Table Server