Search⌘ K
AI Features

Tags and Filtering

Explore how to apply and manage JUnit 5 tags using the @Tag annotation. Understand type-safe tags, multiple tagging, and syntax rules. Learn to filter tests by tags in Gradle and Maven to control test execution efficiently.

Testing with @Tag

Tags are added using the annotation org.junit.jupiter.api.Tag. The @Tag annotation is repeatable, so we can put multiple annotations in the same class or method. We can also use org.junit.jupiter.api.Tags to specify multiple tags. Tags are first trimmed by using ...