How to specify which @Tag should be used for JUnit in IntelliJ IDEA
Asked Answered
G

2

12

Is there a way to specify from the build in JUnit5 Runner of IntelliJ that only test methods with specific @Tag should be tested (or the opposite, that all tests except those with a specific @Tag, should be executed)?

I know how to do it with maven, but is it possible with just the IntelliJ UI?

Best regards, Dieter

Gains answered 31/5, 2017 at 20:26 Comment(0)
B
2

With https://youtrack.jetbrains.com/issue/IDEA-163481 fixed, it is now possible since IJ 2018.1 -- for details see @Nicolau 's answer.

Bilious answered 1/6, 2017 at 9:7 Comment(0)
L
17

Now it is possible with Intellij IDEA 2018.1:

enter image description here

See Tag Expressions to select which tests to execute according with their tagging.


Also, you can take a look at this answer for details on how to achieve the same goal using maven-surefire-plugin.

Ligule answered 21/6, 2018 at 0:50 Comment(0)
B
2

With https://youtrack.jetbrains.com/issue/IDEA-163481 fixed, it is now possible since IJ 2018.1 -- for details see @Nicolau 's answer.

Bilious answered 1/6, 2017 at 9:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.