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?