October 2017
Intermediate to advanced
350 pages
7h 29m
English
As we already know, we need to use maven-surefire-plugin in a Maven project to execute Jupiter test. Moreover, this plugin allows us to filter the test execution in several ways: filtering by JUnit 5 tags and also using the regular inclusion/exclusion support of maven-surefire-plugin.
In order to filter by tags, the properties includeTags and excludeTags of the maven-surefire-plugin configuration should be used. Let's see an example to demonstrate how. Consider the following tests contained in the same Maven project. On the one hand, all tests in this class are tagged with the functional word.
package io.github.bonigarcia;import org.junit.jupiter.api.Tag;import org.junit.jupiter.api.Test;@Tag("functional")class ...Read now
Unlock full access