If I try to run a single test class with:

mvn test -Dtest=namespace1.TestClass

But TestClass is really in namespace1.namespace2, then Maven reports:

Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on
project p1: No tests were executed!  (Set -DfailIfNoTests=false to ignore
this error.)

Which is misleading. In fact, there is no class namespace1.TestClass. Would
be nice if the message for this edge case were changed to something like:

No such class: namespace1.TestClass.

The current error message had me scratching my head for a while--TestClass
*does* have @Test methods!--before I realized I had forgotten to go one
level deeper in my namespace.

--
Cheers,

Andrew Pennebaker
[email protected]

Reply via email to