Explain what is Group Test in TestNG?

In TestNG, methods can be categorized into groups. When a particular group is being executed, all the methods in that group will be executed.  We can execute a group by parameterizing it’s name in group attribute of @Test annotation.

Example:

@Test(groups={"Smoke"})
public void one()
{
}
 
@Test(groups={"Smoke"})
public void Two()
{
}
 
@Test(groups={"Sanity"})
public void Three()
{
}