Im trying to access the org.testng.reporters.XMLReporter from my Java code. I am writing code with eclipse plugin and I am new to testNG.
I have a simple class with a @BeforeSuite, @AfterSuite and 1 @Test (Just as a demo) I thought I could simply add Reporter.getOutput(); to my @AfterSuite method which looks like it returns a list but it is always null. I assume I need a listener but im not sure where or how to add it.
My end goal is to access the XML results that get generated in a file by default to write to my own test DB I have created I can parse the XML since its generated by default I would rather do it all in code.
I’m not sure what you’re trying to do. If you want to access the generated XML, why not do this in a SuiteListener? Or even in a process that gets run after TestNG has finished?