TestNG Thread Control: Join the Discussion on Google Groups
There is an interesting discussion happening on the TestNG-Users group about thread control in TestNG . The author of TestNG asks us all:
I’d like to take this opportunity to see what kinds of improvements people would like to see in the thread support. In particular, have you ever needed to limit the number of invocations for certain threads, as Ilya is suggesting? Cédric Beust
The TestNG threading model has been the primary reason that I want to switch to it and the primary reason that I haven’t. TestNG, unlike JUnit, allows you to run multiple threads in parallel by using threads, however the subtlety involved in doing that correctly is complex; as you can tell by this nearly incomprehensible portion of a post:
Right now, the threads and invocation don’t really have a 1 to 1 mapping, so although there are three threads, there is no guarantee that say 2 invocations will run in the same thread, etc… It would be nice to add such a feature.
ilya sterin
I hope this discussion clears up the confusion and gets us an implementation that works better for everyone.