You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Bradley <de...@gmail.com> on 2005/07/15 21:04:24 UTC

Unit testing verbosity

I'm new to Maven, but can't find an resolution to this problem: unit
tests don't run with enough verbosity to be useful. When I run unit
tests that fail, there is nothing reported other than that the tests
failed. For example:

    [junit] Running com.foo.FooTest
    [junit] Tests run: 4, Failures: 0, Errors: 4, Time elapsed: 1.875 sec
    [junit] [ERROR] TEST com.foo.FooTest FAILED

If I want to see the reason the test failed I have to generate the
site and then look at the HTML output, which takes a lot longer, but
does provide the full reason for failure:

Error creating bean with name 'com.foo.FooTest' defined in null:
Unsatisfied dependency expressed through bean property 'fooManager':
There are 2 beans of type [class com.foo.FooTest] for autowire by
type. There should have been 1 to be able to autowire property
'productManager' of bean 'com.foo.FooTest'.

Is there a way to get the failure reason on the command line?

In a separate problem, when I run test:ui it appears to have a
different classpath than when running test. Is there a way to make
sure these are the same? When running the Swing test runner from Maven
I get classpath-related errors in my unit tests that don't appear when
I run the console tests.

Thanks

Dan Bradley
debradley@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Unit testing verbosity

Posted by Dan Bradley <de...@gmail.com>.
Exactly what I needed - thanks!

On 7/15/05, Charles Daniels <cj...@gmail.com> wrote:
> maven.junit.usefile=false
> 
> On 7/15/05, Dan Bradley <de...@gmail.com> wrote:
> > I'm new to Maven, but can't find an resolution to this problem: unit
> > tests don't run with enough verbosity to be useful. When I run unit
> > tests that fail, there is nothing reported other than that the tests
> > failed. For example:
> >
> >    [junit] Running com.foo.FooTest
> >    [junit] Tests run: 4, Failures: 0, Errors: 4, Time elapsed: 1.875 sec
> >    [junit] [ERROR] TEST com.foo.FooTest FAILED
> >
> > If I want to see the reason the test failed I have to generate the
> > site and then look at the HTML output, which takes a lot longer, but
> > does provide the full reason for failure:
> >
> > Error creating bean with name 'com.foo.FooTest' defined in null:
> > Unsatisfied dependency expressed through bean property 'fooManager':
> > There are 2 beans of type [class com.foo.FooTest] for autowire by
> > type. There should have been 1 to be able to autowire property
> > 'productManager' of bean 'com.foo.FooTest'.
> >
> > Is there a way to get the failure reason on the command line?
> >
> > In a separate problem, when I run test:ui it appears to have a
> > different classpath than when running test. Is there a way to make
> > sure these are the same? When running the Swing test runner from Maven
> > I get classpath-related errors in my unit tests that don't appear when
> > I run the console tests.
> >
> > Thanks
> >
> > Dan Bradley
> > debradley@gmail.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Unit testing verbosity

Posted by Charles Daniels <cj...@gmail.com>.
maven.junit.usefile=false

On 7/15/05, Dan Bradley <de...@gmail.com> wrote:
> I'm new to Maven, but can't find an resolution to this problem: unit
> tests don't run with enough verbosity to be useful. When I run unit
> tests that fail, there is nothing reported other than that the tests
> failed. For example:
> 
>    [junit] Running com.foo.FooTest
>    [junit] Tests run: 4, Failures: 0, Errors: 4, Time elapsed: 1.875 sec
>    [junit] [ERROR] TEST com.foo.FooTest FAILED
> 
> If I want to see the reason the test failed I have to generate the
> site and then look at the HTML output, which takes a lot longer, but
> does provide the full reason for failure:
> 
> Error creating bean with name 'com.foo.FooTest' defined in null:
> Unsatisfied dependency expressed through bean property 'fooManager':
> There are 2 beans of type [class com.foo.FooTest] for autowire by
> type. There should have been 1 to be able to autowire property
> 'productManager' of bean 'com.foo.FooTest'.
> 
> Is there a way to get the failure reason on the command line?
> 
> In a separate problem, when I run test:ui it appears to have a
> different classpath than when running test. Is there a way to make
> sure these are the same? When running the Swing test runner from Maven
> I get classpath-related errors in my unit tests that don't appear when
> I run the console tests.
> 
> Thanks
> 
> Dan Bradley
> debradley@gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Unit testing verbosity

Posted by Dan Bradley <de...@gmail.com>.
That's a very useful tip as well! Thanks! 


On 7/15/05, Dennis Geurts <de...@gmail.com> wrote:
> Hi Dan, 
>   
> After testing, did you have a look at the files in 'target\test-reports' ?? 
>   
> Dennis
> 
>   
> On 7/15/05, Dan Bradley <de...@gmail.com> wrote: 
> > 
> > I'm new to Maven, but can't find an resolution to this problem: unit
> > tests don't run with enough verbosity to be useful. When I run unit 
> > tests that fail, there is nothing reported other than that the tests
> > failed. For example:
> > 
> >    [junit] Running com.foo.FooTest
> >    [junit] Tests run: 4, Failures: 0, Errors: 4, Time elapsed: 1.875 sec
> >    [junit] [ERROR] TEST com.foo.FooTest FAILED
> > 
> > If I want to see the reason the test failed I have to generate the
> > site and then look at the HTML output, which takes a lot longer, but
> > does provide the full reason for failure:
> > 
> > Error creating bean with name 'com.foo.FooTest' defined in null:
> > Unsatisfied dependency expressed through bean property 'fooManager':
> > There are 2 beans of type [class com.foo.FooTest] for autowire by
> > type. There should have been 1 to be able to autowire property 
> > 'productManager' of bean 'com.foo.FooTest'.
> > 
> > Is there a way to get the failure reason on the command line?
> > 
> > In a separate problem, when I run test:ui it appears to have a
> > different classpath than when running test. Is there a way to make 
> > sure these are the same? When running the Swing test runner from Maven
> > I get classpath-related errors in my unit tests that don't appear when
> > I run the console tests.
> > 
> > Thanks
> > 
> > Dan Bradley
> > debradley@gmail.com
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> > 
> > 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Unit testing verbosity

Posted by Dennis Geurts <de...@gmail.com>.
Hi Dan, 
 After testing, did you have a look at the files in 'target\test-reports' ??
 Dennis

 On 7/15/05, Dan Bradley <de...@gmail.com> wrote: 
> 
> I'm new to Maven, but can't find an resolution to this problem: unit
> tests don't run with enough verbosity to be useful. When I run unit
> tests that fail, there is nothing reported other than that the tests
> failed. For example:
> 
> [junit] Running com.foo.FooTest
> [junit] Tests run: 4, Failures: 0, Errors: 4, Time elapsed: 1.875 sec
> [junit] [ERROR] TEST com.foo.FooTest FAILED
> 
> If I want to see the reason the test failed I have to generate the
> site and then look at the HTML output, which takes a lot longer, but
> does provide the full reason for failure:
> 
> Error creating bean with name 'com.foo.FooTest' defined in null:
> Unsatisfied dependency expressed through bean property 'fooManager':
> There are 2 beans of type [class com.foo.FooTest] for autowire by
> type. There should have been 1 to be able to autowire property
> 'productManager' of bean 'com.foo.FooTest'.
> 
> Is there a way to get the failure reason on the command line?
> 
> In a separate problem, when I run test:ui it appears to have a
> different classpath than when running test. Is there a way to make
> sure these are the same? When running the Swing test runner from Maven
> I get classpath-related errors in my unit tests that don't appear when
> I run the console tests.
> 
> Thanks
> 
> Dan Bradley
> debradley@gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>