Clarify why surefire filters tests (*Test/Test*)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Clarify why surefire filters tests (*Test/Test*)

Romain Manni-Bucau
Hi everyone,

Today a colleague asked me why "FooWhateverBla" test was not executed with
maven whereas it works well in Intellij.

Indeed I explained him Surefire does its own scanning and the hardcoded
defaults but I actually wonder why we still do that and if it is not just
something inherited from early times.

Concretely, scanning target/test-classes we can find all @[whatever
package]Test (and meta @Test), subclasses of Specification or whatever
parent etc. In other words the scanning can default to the supported
providers (any other pattern is useless since it will not run anyway) and
we can even just delegate the scanning to the underlying engine in a lot of
The gain is to drop code in surefire but also expose something more user
friendly (aligned on the used engine).

Any rational I'm missing to still have an abstraction there?

Romain Manni-Bucau
@rmannibucau <> |  Blog
<> | Old Blog
<> | Github <> |
LinkedIn <> | Book