How to run JUnit 5 @Tag tests with Ant?

How to use Ant to run a JUnit 5 test annotated with @Tag?

For instance:

class Tax {
    @Test
    @Tag("taxes")
    void testingTax() {
    }
}

In Maven, I can do the following to include or exclude. However, I do not know how to make it work in Ant.

<properties>
    <includeTags>taxes</includeTags>
    <excludeTags>Promo</excludeTags>
</properties>

Please inform.

+4
source share
2 answers

According to Apache Ant, JUnit5 developers are not currently supported. However, according to this bug report , they started to work. There is also a message about this here .

0
source

Starting with 10.7, it is now supported.

https://ant.apache.org/manual/Tasks/junitlauncher.html

(includeTags excludeTags)

, .

+1

Source: https://habr.com/ru/post/1677988/


All Articles