If we have multiple test classes in the same suite we can run them parallely by using the command. For example if we have a suite named SuiteA we add parallel = "tests" like below
<suite name="Suite A" parallel="tests">
Then if we have some test cases in Suite B and we do the same
<suite name="Suite B" parallel="tests">
Then if we run both the suites together using testing.xml file then first all test cases of SuiteA will run parallely, then for SuiteB all tests run parallely ,but both suitees SuiteA and SuiteB will not run parallely together.
For that we can use a custom made java class.We run that class as a java file and it will invoke testing.xml and run all test cases parallely. That all can be done on one machine
But if we want to run tests parallely on multiple machines we use grid.More on grid in next post