Whenever you run a suite that contains errors, TestNG will automatically generate a file called testng-failed.xml in your output directory (by default, test-output/). This XML file contains a subset of the original testng.xml with only the methods that failed.