Earlier we learned about creating tests that belonged to a single group, but TestNG allows test methods to belong to multiple groups also. This can be done by providing the group names as an array in the
groups attribute of the
@Test annotation. Let's create a sample program with multiple groups to learn how it is done.