Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
LoadTest - is there an accessible virutal user id?
LegacyForum
Posts: 1,664 ✭✭
I'd like to run load tests where each user has an ID definied in a data bank. That ID is used as one of the parmeters in a test. I've created a data table, which that has a row defined each valid user ID.
The objective would be to define load tests, where each virtual user is a user from that table. For example, if 20 users were defined for that load test, it would be using the IDs from rows 1 to 20 in the table. A 100 user test, would used the IDs from row 1 to 100, etc.
I was thinking that I'd create a method to retrieve the ID in table, based on the virtual user #. How could I access a value which indicates the virtual user? Is a better way to approach this?
thanks!
0
Comments
-
Hello,
You want to look at the "Different virtual users can use the same row concurrently" option found in the Data Source configuration by click on the "Data Source Options" button. This option is enabled by default. Disabling this option will ensure that no two virtual users are ever using the same row of data.
Additionally, there is a virtual user id that can be accessed from the method tool. You can call webtool.loadtest.LoadTestRunnable.getId() to get this value.
One thing about these ID values is that when a virtual user finishes running through its profile, a new virtual user(with a new ID) is created to replace it.
~Joe0