[testng-dev] Invoking org.testng.ISuite.addListener(ITestNGListener listener) doesn't do anything in a configuration method (@BeforeSuite)
I was exploring the API and ran across addListener and thought that I could programmatically add my listener. This functionality would save me from having to declare my custom listeners in my POM or in my Test Suite XML. It looks like that this method is used by SuiteRunner to initialize listeners in the initial TestNG setup. Meaning I shouldn't be able to invoke it, for example, in a BeforeSuite method. Is this expected behavior? I am afraid the answer is yes. So my follow up question is: it is possible to add listeners programmatically without a programmatic invocation of TestNG through the TestNG class?