Perform the following test to run a dependency test sequentially:
factory-testng.xmlunder the existing project:
<suite name="Factory suite" verbose="1" > <test name="Factory test" group-by-instances="true"> <classes> <class name="test.factory.DependencyFactory" /> </classes> </test> </suite>
This XML configuration contains only a test inside it. This test executes the
DependencyFatory class. To run the dependent methods according to the sequence, they are supposed to run a configuration attribute
group-by-instance, which is set to
testngXML in Eclipse and run it as a TestNG suite. You will see the following test result in the Console ...