Reputation: 1071
I have a csv containing user login information. I need to make sure that no single user is logged on more than once at the same time. This csv only contains 50 users, so I can at maximum run 50 tests at the same time.
Using access method "Sequential" I run into an issue where it's possible for the load test to allow two tests using the same data from the data source simultaniously. For example say we have users 1-50 being used in test runs 1-50. Now if test 50 completes first it will trigger starting test 51, but because VS has looped through all users in the Data Source it moves back to the top and tries to use user 1. This user is already being used by the test run 1 which is still running.
is there a way to make sure that VS will not assign data from a Data Source if that row is still being used in a running test?
Upvotes: 0
Views: 348
Reputation: 14076
There is no support for what you request. You could set the access method to UNIQUE. But that would means that the test will only run through the users once.
Having 50 data source lines for 50 virtual users with the constraint you want is very unlikely to work. I suggest having many more data lines than the maximum number of virtual users. Having at least twice as many data lines as virtual users is a good first attempt. You could do some pen-and-paper trials based on the quickest and slowest possible test case execution times to see what kind of overlaps are likely and hence how many users you can get away with.
It may be worth adding some test validation rules to check whether the web site complains when the user logs in a second time. A plugin could have code to abandon the test case if that is detected.
Upvotes: 1