As I am new to TestNG, I would like to request you guys to please give me a brief about @Listeners. If possible please provide a dummy code of the same.

  • Do you have specific questions that are not covered by the documentation?
    – user246
    Mar 7 '14 at 12:28
  • Thanks for the consideration, but even after going through the document i am not getting the idea of it. Please advise ... Any document apart from this or and location where I can get it.
    – Swap
    Mar 7 '14 at 13:33
  • Do you know how to program in Java?
    – user246
    Mar 7 '14 at 13:35
  • 1
    Well, TestNG has a number of listeners listed here: testng.org/javadocs/org/testng/package-frame.html . Some handling test results, some executed just before or after tests. We, for instance, use IInvokedMethodListener2 to setup SUT configuration before the test based on the annotations we used for the test case. So which of the listed listeners are you interested in?
    – dzieciou
    Mar 7 '14 at 21:15
  • Hi @swap, welcome to SQA. I'm putting this question on hold as it's pretty vague at the moment, so people are struggling to answer you. If you have more specific questions or can provide more information then people can be more helpful.
    – testerab
    Mar 9 '14 at 12:42