Not quite. I want a specific error message printed when a user specifies a
test class to run, and the class does not exist.

I updated my surefire version to 2.12 and got the same behavior as before.


On Mon, Nov 25, 2013 at 4:28 PM, Robert Scholte <[email protected]>wrote:

> IIUC this has been fixed with version 2.12 by adding the
> failIfNoSpecifiedTests[1]
>
> Robert
>
> [1] http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#
> failIfNoSpecifiedTests
>
>
> Op Mon, 25 Nov 2013 16:07:53 +0100 schreef Andrew Pennebaker <
> [email protected]>:
>
>  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]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Cheers,

Andrew Pennebaker
[email protected]

Reply via email to