I would like to use the @Tag
available in JUnit 5 in order to easily filter my tests.
I have found in this blog input from September 2016 that IntelliJ was not supporting @Tag
. Not sure what the current status is though.
Also, I am very new to using Maven but I have tried modifying the POM file in order to filter tests when executing mvn test
in a command prompt. No luck.
Now it is possible with Intellij IDEA 2018.1, take a look at this answer for details (including screenshot).
Also, you can see Build Support with Maven in JUnit official documentation for a proper configuration of
maven-surefire-plugin
. The section Filtering by Tags can be especially useful to filter tests by tags.Here's the solution I found: changing the JUnit versions in the POM file from ...
to
allowed Maven to recognize the @Tag.