Tuesday 25 March 2014

TestNG Annotations

What’s the hierarchy of TestNG annotations? 


Ans:
  1. org.testng.annotations.Parameters (implements java.lang.annotation.Annotation)
  2. org.testng.annotations.Listeners (implements java.lang.annotation.Annotation)
  3. org.testng.annotations.Test (implements java.lang.annotation.Annotation)
  4. org.testng.annotations.AfterMethod (implements java.lang.annotation.Annotation)
  5. org.testng.annotations.BeforeTest (implements java.lang.annotation.Annotation)
  6. org.testng.annotations.BeforeMethod (implements java.lang.annotation.Annotation)
  7. org.testng.annotations.Optional (implements java.lang.annotation.Annotation)
  8. org.testng.annotations.AfterTest (implements java.lang.annotation.Annotation)
  9. org.testng.annotations.Guice (implements java.lang.annotation.Annotation)
  10. org.testng.annotations.BeforeGroups (implements java.lang.annotation.Annotation)
  11. org.testng.annotations.ExpectedExceptions (implements java.lang.annotation.Annotation)
  12. org.testng.annotations.TestInstance (implements java.lang.annotation.Annotation)
  13. org.testng.annotations.NoInjection (implements java.lang.annotation.Annotation)
  14. org.testng.annotations.AfterSuite (implements java.lang.annotation.Annotation)
  15. org.testng.annotations.AfterClass (implements java.lang.annotation.Annotation)
  16. org.testng.annotations.AfterGroups (implements java.lang.annotation.Annotation)
  17. org.testng.annotations.DataProvider (implements java.lang.annotation.Annotation)
  18. org.testng.annotations.BeforeSuite (implements java.lang.annotation.Annotation)
  19. org.testng.annotations.BeforeClass (implements java.lang.annotation.Annotation)
  20. org.testng.annotations.Factory (implements java.lang.annotation.Annotation)
  21. org.testng.annotations.Configuration (implements java.lang.annotation.Annotation)
  22. org.testng.annotations.ObjectFactory (implements java.lang.annotation.Annotation)

No comments:

Post a Comment