“What’s the hierarchy
of TestNG annotations? Explain me about annotation hierarchy & execution
order?
Please find hierarchy below:
- org.testng.annotations.Parameters (implements java.lang.annotation.Annotation)
- org.testng.annotations.Listeners (implements java.lang.annotation.Annotation)
- org.testng.annotations.Test (implements java.lang.annotation.Annotation)
- org.testng.annotations.AfterMethod (implements java.lang.annotation.Annotation)
- org.testng.annotations.BeforeTest (implements java.lang.annotation.Annotation)
- org.testng.annotations.BeforeMethod (implements java.lang.annotation.Annotation)
- org.testng.annotations.Optional (implements java.lang.annotation.Annotation)
- org.testng.annotations.AfterTest (implements java.lang.annotation.Annotation)
- org.testng.annotations.Guice (implements java.lang.annotation.Annotation)
- org.testng.annotations.BeforeGroups (implements java.lang.annotation.Annotation)
- org.testng.annotations.ExpectedExceptions (implements java.lang.annotation.Annotation)
- org.testng.annotations.TestInstance (implements java.lang.annotation.Annotation)
- org.testng.annotations.NoInjection (implements java.lang.annotation.Annotation)
- org.testng.annotations.AfterSuite (implements java.lang.annotation.Annotation)
- org.testng.annotations.AfterClass (implements java.lang.annotation.Annotation)
- org.testng.annotations.AfterGroups (implements java.lang.annotation.Annotation)
- org.testng.annotations.DataProvider (implements java.lang.annotation.Annotation)
- org.testng.annotations.BeforeSuite (implements java.lang.annotation.Annotation)
- org.testng.annotations.BeforeClass (implements java.lang.annotation.Annotation)
- org.testng.annotations.Factory (implements java.lang.annotation.Annotation)
- org.testng.annotations.Configuration (implements java.lang.annotation.Annotation)
- org.testng.annotations.ObjectFactory (implements java.lang.annotation.Annotation)
Hi Ruchi Goyal Ji,Thanks for the content.
ReplyDeleteHey there just wanted to give you a quick heads up. The text
ReplyDeletein your article seem to be running off the screen in Chrome.
I'm not sure if this is a format issue or something to do
with browser compatibility but I figured I'd post to let you
know. The layout look great though! Hope you get the
problem resolved soon. Thanks