Just to further participate in my own research (for clarity and completeness, I hope):
- ThreadGroup has queries / "operations" as described above (in the summary of Manjula Weerasinge), but also has user and loop configurations.
- ThreadGroup creates a thread for each user. This thread (representing the user) performs all the operations in this ThreadGroup, sequentially in this loop.
- These threads are reused in all loops - this is: loop 2 will also perform the same set of operations as n different users, but it will reuse the same threads as loop 1.
Thus, ThreadGroup has a thread for each user and is used to run all the tests in this group for all loops.
This was true for two cycles with 10 users, where my test contained the following:
System.out.println("MyTest#testSearchNodeByNodeNameExactMatch: MyTest=" +this + "(" +System.identityHashCode(this) +")" +", thread=" +System.identityHashCode(Thread.currentThread()));
And the logs can be summarized using (assuming println output written to thread-output.2.txt):
grep MyTest
wmorrison365
source share