Description and Grouping Concept in TestNG
Posted By : Manish Kumar | 26-Feb-2018
As the number of modules in a project is increasing so as the number of methods in automation framework, with the same difficulty level of maintaining methods which need to be executed at a time and which are not.
package testng; import org.testng:grouping.one; public class TestNG_group { @Test(description="This is new account method", groups={"function", "smoke"}) public void NewAccount() { System.out.println("This is new account method "); } @Test(description="This is new user method ", groups={"function"}) public void NewUser() { System.out.println("This is new user method "); } @Test(description="This is new freelancer method ", groups={"smoke"}) public void test3() { System.out.println("This is new freelancer method "); } }
The test.xml file will have below
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Manish Kumar
Manish is Adaptive and passionate to learn new technical skills, have knowledge of testing and love to play badminton in free time