O'Reilly logo

Mastering Software Testing with JUnit 5 by Boni García

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Maven regular support

The regular inclusion/exclusion support of the Maven plugin can still be used to select which tests are going to be executed by maven-surefire-plugin. To that aim, we use the keywords includes and excludes to configure the test name pattern used to filter the execution by the plugin. Notice that for both inclusions and exclusions, regular expressions can be used to specify a pattern of the test filenames:

<configuration>   <includes>      <include>**/Test*.java</include>      <include>**/*Test.java</include>      <include>**/*TestCase.java</include>   </includes></configuration><configuration>   <excludes>      <exclude>**/TestCircle.java</exclude>      <exclude>**/TestSquare.java</exclude>   </excludes></configuration>
These three patterns, that is, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required