Hi All,
I came across this behavior
I have 2 test classes as below :
=================================================
public class Test1
{
@Test
public void first()
{
System.out.println("first-class1");
}
@Test
public void second()
{
System.out.println("second-class1");
}
}
================================================
AND
public class Test2
{
@Test
public void first()
{
System.out.println("first-class2");
}
@Test
public void second()
{
System.out.println("second-class2");
}
}
================================================
And when i design my testNg xml as below and run it, i get org.testng.TestNGException: No free nodes found in:[DynamicGraph
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Default suite">
<test verbose="2" name="Default test1" group-by-instances="true">
<classes>
<class name="Test2"/>
<class name="Test1"/>
</classes>
</test>
</suite>
The issue can be resolved by removing the attribute group-by-instances="true from the test tag
and if there is only one test class present in the test tag, then also there wont be any issue
i know the default value of group-by-instances is false
and i wanted to know the functionality of group-by-instances attribute , is it to group the same test class instances together ,and then to run the methods present in that class ?
If we do not mention this attribute , then also the classes will be executed in the order as they are mentioned in the <test> tag
so what is the purpose of group-by-instances="true ?
Thanks & Warm Regards
Musaffir