Wednesday, 28 September 2022
Test NG Tricky Questions
Below is the list of most important attributes for TestNG annotations, in terms of day to day work and interview preparation
1. Description - The description of the method
@Test(Description="Login to Application")
2. Enabled - Whether methods/class are enabled
@Test(Description="Login to Application", enabled=false)
3. AlwayRun - If set to True, this method will always be run even if it depends on a method failed
@Test(Description="Login to Application", alwaysRun=false)
4. priority - Priority of this method . Lower priority methods will be scheduled First
@Test(Description="Login to Application", priority=1)
5. Can priority negative or zero values?
Yes, we can
6. groups - the list of groups this method belongs to?
@Test(Description="Login to Application", groups={"Smoke","Regression"})
7.
Subscribe to:
Post Comments (Atom)
TestNG Annotations :(STCM )
ReplyDelete@before suite
@before Test
@before Class
@after Method
@before suite
@after Test
@after Class
@after Method
Thanks for sharing valuable content to us.
ReplyDelete