I've got the test classes with an XML suite as follows:
Class1:
public class TestReal1 {
@Test
public void testMethodClass1A_prio0() {
// some testing code
}
@Test(priority = 10)
public void testMethodClass1B_prio10() {
// some testing code
}
@Test(priority = 11)
public void testMethodClass1C_prio11() {
// some testing code
}
}
Class2:
public class TestReal2 {
@Test(priority = 1)
public void testMethodClass2A_prio1() {
// some testing code
}
@Test(priority = 2)
public void testMethodClass2B_prio2() {
// some testing code
}
@Test(priority = 3)
public void testMethodClass2C_prio3() {
// some testing code
}
}
TestSuite.xml :
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<test name="Test" preserve-order="true" verbose="10">
<classes>
<class name="com.test.radek.testngtest.TestReal1" />
<class name="com.test.radek.testngtest.TestReal2" />
</classes>
</test>
</suite>
Having such configuration, for TestNG 6.12+ only two methods are executed. TestNG output:
===== Invoked methods
TestReal1.testMethodClass1A_prio0()[pri:0, instance:com.test.radek.testngtest.TestReal1@54e156e1] 1424053985
TestReal2.testMethodClass2A_prio1()[pri:1, instance:com.test.radek.testngtest.TestReal2@5a311ade] 1513167582
=====
In older versions all methods were executed. For example TestNG 6.10:
===== Invoked methods
TestReal1.testMethodClass1A_prio0()[pri:0, instance:com.test.radek.testngtest.TestReal1@7adbe76f] 2061231983
TestReal2.testMethodClass2A_prio1()[pri:1, instance:com.test.radek.testngtest.TestReal2@d029f4] 13642228
TestReal2.testMethodClass2B_prio2()[pri:2, instance:com.test.radek.testngtest.TestReal2@d029f4] 13642228
TestReal2.testMethodClass2C_prio3()[pri:3, instance:com.test.radek.testngtest.TestReal2@d029f4] 13642228
TestReal1.testMethodClass1B_prio10()[pri:10, instance:com.test.radek.testngtest.TestReal1@7adbe76f] 2061231983
TestReal1.testMethodClass1C_prio11()[pri:11, instance:com.test.radek.testngtest.TestReal1@7adbe76f] 2061231983
=====
I guess it has something to do with implementation of @Test attribute importance introduced in 6.10:
Hierarchy on order features (from less important to more important): groupByInstance, preserveOrder, priority, dependsOnGroups, dependsOnMethods
But the question is is it ok that in my case, using 6.12+ versions of TestNG some test cases are unexecuted? If yes, why? Is it something connected to changes in DynamicGraph in TestNG implementation?
What is the correct behaviuor now?