O'Reilly logo

TestNg Beginner's Guide by Varun Menon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Default group

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required