TestNG requires that we have an XML configuration file that it can look at before the tests begin. This means that we can control how our tests are run when we need to run them.
Create a new XML file in a text editor and call it
testng.xml
.Add the following to it:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Parallel Tests" verbose="1"> </suite>
We have just created our first part of TestNG file. This creates our test suite and will give us the scaffolding that is required to make our tests run in parallel later. Now that we have this in place we need to set parameters in the file that will be used to drive the tests.