Sometimes we may need to assign a default group to a set of test methods that belong to a class. This can be achieved by using the
@Test annotation at class level and defining the default group in the said
@Test annotation. This way all the public methods that belong to the said class will automatically become TestNG test methods and become part of the said group.
Let's write an example and learn how it works.