testng icon indicating copy to clipboard operation
testng copied to clipboard

Support meta-annotations

Open vlsi opened this issue 2 years ago • 1 comments

TestNG Version

7.6.1

Expected behavior

There should be a way to define custom annotation that groups several existing annotations with predefined values.

For instance, instead of @Test(groups={"Database"}, timeOut = 10) everywhere users could write @DatabaseTest where DatabaseTest is annotation that composes other annotations.

See https://junit.org/junit5/docs/current/user-guide/#writing-tests-meta-annotations

Actual behavior

TestNG forces users to duplicate annotations everywhere.

vlsi avatar Jul 27 '22 15:07 vlsi

What do you think of reusing https://github.com/junit-team/junit5/blob/main/junit-platform-commons/src/main/java/org/junit/platform/commons/support/AnnotationSupport.java ?

It sounds like a reasonable dependency for the task.

vlsi avatar Jul 28 '22 20:07 vlsi