Agent use different test user infos with each test run


I would like to know if it is possible to iterate over the data the agents use with each test run. To be more specific:

I have two agents, a set of test data containing 10 users (username and password combo) and I want to run the testrun 100 times. Both agents are performing the same log in, read page, log out testrun. Agent 1 would use the first user on the first run, agent two would use the second user and so on. Once the end of the user list is reached the agents start from the first user again. The agents never use the same user at the same time. Is this possible to do with XLT?

Thank you!

Kind regards,

Welcome to the forum and thanks for using XLT. You have at least two options.

ExclusiveDataProvider has been designed to permit exclusive handling of data across a test. If you use it to access a data file, this file will be divided into chunks and each agent (aka JVM that runs the test) sees only its chunk. When a user on that agents asks for data, this data set is blocked/checked out and nobody else will use it. At the end of the test, you have to return that to the pool otherwise it will be lost (recommended is a finally approach or via @After.

You can find a very complex use case in our advanced test suite:

Feel free to check the code in XLT that does that:

You can also do that all manually and basically do what the ExclusiveDataProvider does on your own. It will basically check the user number the test uses as well as the total user number and use that to calculate the chunks. gives you the ability to get to that data with Session.getCurrent().getTotalUserCount() for instance. There are many more data points available. Based on that data, you can calculate the validate positions in a data file yourself and make sure each user only uses these.

thank you, I will look into it.