You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JUnit Jupiter annotations can be used as meta-annotations. That means that you can define your own composed annotation that will automatically inherit the semantics of its meta-annotations.
A number of other frameworks (e.g. Spring) support meta-annotations as well.
I don't believe JUnit 4 or TestNG has support for meta-annotations.
The Groovy language has built-in support for meta-annotations, which means that Spock already gets meta-annotations for free. Additionally, JUnit 4 and TestNG tests written in Groovy would also get meta-annotations for free.
The text was updated successfully, but these errors were encountered:
mjustin
changed the title
Support meta-annotations
Support meta-annotations for includeAnnotationClasses & excludeAnnotationClasses
Feb 11, 2021
It would be nice if
includeAnnotationClasses
&excludeAnnotationClasses
supported meta-annotations.Meta-annotations are handy when creating a hierarchy of annotations, some of which are often but not always grouped together.
Example
Given the following classes in package
com.example
:And given the following Gradle config:
I would want
MyIntegrationTest
to be retried on failure, since its@IntegrationTest
is annotated with@Flaky
.Additional notes
JUnit 5 annotations can be used as meta-annotations:
A number of other frameworks (e.g. Spring) support meta-annotations as well.
I don't believe JUnit 4 or TestNG has support for meta-annotations.
The Groovy language has built-in support for meta-annotations, which means that Spock already gets meta-annotations for free. Additionally, JUnit 4 and TestNG tests written in Groovy would also get meta-annotations for free.
The text was updated successfully, but these errors were encountered: