I’m having trouble triggering testng parallel test execution from within gradle. The tests just run serially, instead of parallel with 3 threads when I do this:
useTestNG{
useDefaultListeners = true
options {
suites file(testXML)
parallel = 'tests'
threadCount = 3
listeners.add("listeners.ScreenShotTestListener")
}
}
When I put parallel = ‘tests’ and thread-count = ‘3’ in the xml file, it does run in 3 threads. When I just put parallel = ‘tests’ in the xml file, it runs in the default 5 threads.
I also tried it without an xml file:
useTestNG{
useDefaultListeners = true
options {
include 'tests/MyTests/develop/**'
parallel = 'tests'
threadCount = 3
listeners.add("listeners.ScreenShotTestListener")
}
}
But again, this runs serially, instead of using 3 threads.
I’ve tried both gradle 1.11 and 2.1 testng-6.8.5.jar