Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
220 views
in Technique[技术] by (71.8m points)

java - How to specify which @Tag should be used for JUnit in IntelliJ IDEA

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...