I think that the documentation for the
parallel attribute is unclear. It says this:
parallel="methods": TestNG will run all your test methods in separate threads. Dependent methods will also run in separate threads but they will respect the order that you specified.
I thought that parallel="methods" would provide the highest degree of parallelism possible, in the sense that any two methods, from any two tests, classes, or instances, could be run in parallel. In fact, the methods within a particular class or test might be run in parallel, but the tests themselves will be run sequentially unless parallel="tests" because of this code in SuiteRunner.privateRun():
//
// Run all the test runners
//
boolean testsInParallel = XmlSuite.PARALLEL_TESTS.equals(m_suite.getParallel());
if (!testsInParallel) {
runSequentially();
}
else {
runInParallelTestMode();
}