how can I dynamically schedule the tests to be run by TestNG?
In a given suite which uses 10 threads and has 100 tests I want to provide tests to be run dynamically so that next to be run test case out of remaining tests need to determined by my own logic and given to TestNg when thread(s) completes current test/tests.
Simply put how can I dynamically schedule the tests to be run by TestNG?
Adding more info below
Let's say I have 100 tests to run with say 10 threads. typically tests will be picked up in random and executed. Here I need control on next test to be run when a thread finishes current test run. In simple terms this will help us to lock and unlock the objects on product and schedule the tests such that more tests can run in parallel by sharing existing resources.
Ultimately need to reorder the remaining tests every time want to run the next test & need a way to d开发者_如何学运维o it in testNg
@Factory lets you create test classes dynamically.
精彩评论