Perform the following steps for executing testng.xml
using Eclipse:
Open Eclipse and go to the project where we have created the
testng.xml
file.Select the
testng.xml
file, right-click on it, and select Run As | TestNG suite.Eclipse will execute the XML file as TestNG suite and you can see the following report in Eclipse:
Note
The preceding window may not be shown by default in Eclipse after execution and you may have to click on the window to see the results.
You can also use the Run Configuration option provided by Eclipse to customize your TestNG tests in Eclipse. Let's learn how to configure Eclipse to run testng
XML files.