Advanced TestNG Tutorials 35: How To Pass Multiple Group Names to be Run at Runtime in TestNG XML Using Beanshell

Hello Folks, Before continuing this post, you must go through below posts: Integration of TestNG and Beanshell How To Pass a Group Name to be Run at Runtime in TestNG XML Using Beanshell Problem statement: You have created so many test methods with different groups. You do not need to run all group every time.

Read More

TestNG Tutorials 29: Grouping Configuration Methods in TestNG

Hello Folks, In previous post, we learnt about basics of group concepts in TestNG and how to use with @Test annotated methods. In this method we will see how can we use grouping concept with configuration methods. Below are the configuration methods provided by TestNG: @BeforeSuite @AfterSuite @BeforeTest @AfterTest @BeforeGroups @AfterGroups @BeforeClass @AfterClass @BeforeMethod @AfterMethod

Read More

TestNG Tutorials 27: Usage of alwaysRun Attribute With Configuration Methods of TestNG

Hello Folks, In last post we learn usage of of alwaysRun Attribute With Test Method of TestNG. In this post, we will see usage of alwaysRun attribute with configuration method in TestNG. What is a Configuration Method in TestNG? When we mark a method as @BeforeXXXX or @AfterXXXX, that method is called as Configuration method. Example:

Read More

TestNG Tutorials 26: Understand Usage of alwaysRun Attribute With Test Method of TestNG

Hello Folks, In this post we will learn about “alwaysRun” attribute and its usage with @Test annotated method in TestNG. “alwaysRun” attribute can be used with Configuration methods(BeforeXXXX and @AfterXXXX) and Test methods(@Test). TestNG documentation defines alwaysRun attribute as: For configuration methods: For before methods (beforeSuite, beforeTest, beforeTestClass and beforeTestMethod, but not beforeGroups): If set to

Read More

Please wait...

Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.