You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Ryan Wynn <bi...@gmail.com> on 2006/01/17 17:17:35 UTC

Problem running test cases with maven/continuum

I have a problem running a test case for my project with continuum. 
The test case executes cleanly and succesfully in eclipse.  Then when
continuum tries to run it continuum hangs.  The last log statement I
see is RUNNING TEST CASES.

If I set -Dmaven.test.skip=true Continuum runs to completion.

I think it has to do with classloaders.  The test case extends an
AbstractTestCase that is declared as a compile dependancy (no scope is
specified).  In the AbstractTestCase resources are loaded from the
classpath.  These resources live in the src/main/resources directory
for the AbstractTestCase project. AbstractTestCase lives in
src/main/java.

To make things more clear.

Project B defines Project A as a dependancy.
A
  |__src/main/java contains AbstractTestCase
  |__src/main/resources contains foo.xml

B
  |__src/main/test contains MyTestCase extends AbstractTestCase


Does continuum/maven do anything special involving classloaders when
running unit tests?

Actually, the more I look at this I am thinking AbstractTestCase
should probably live in src/main/test not src/main/java.  Is that
correct?

Thanks,
Ryan

Re: Problem running test cases with maven/continuum

Posted by Ryan Wynn <bi...@gmail.com>.
On 1/17/06, Emmanuel Venisse <em...@venisse.net> wrote:
> You can look at your test report in target/surefire-reports directory
>
> Emmanuel
>

Thanks.  That showed the source of the error.

Re: Problem running test cases with maven/continuum

Posted by Emmanuel Venisse <em...@venisse.net>.
You can look at your test report in target/surefire-reports directory

Emmanuel

Ryan Wynn a écrit :
> On 1/17/06, Ryan Wynn <bi...@gmail.com> wrote:
> 
>>I have a problem running a test case for my project with continuum.
>>The test case executes cleanly and succesfully in eclipse.  Then when
>>continuum tries to run it continuum hangs.  The last log statement I
>>see is RUNNING TEST CASES.
> 
> 
> I have gotten past the Continuum hanging problem.  I looked more into
> the Maven documentation, created attached tests for the parent
> project, referenced testResources in the parent project, and
> referenced the attached tests in the child with a scope of test.
> 
> The attached tests jar looks good.  It has the abstract test cases as
> well as the resources included.
> 
> Now the tests are executing but failing.  Not much description of the
> failure even with the -e switch.
> 
> Like I mention before, the unit tests complete successfully in
> eclipse.  This must be a classloader problem still.  Any ideas?


Re: Problem running test cases with maven/continuum

Posted by Ryan Wynn <bi...@gmail.com>.
On 1/17/06, Ryan Wynn <bi...@gmail.com> wrote:
> I have a problem running a test case for my project with continuum.
> The test case executes cleanly and succesfully in eclipse.  Then when
> continuum tries to run it continuum hangs.  The last log statement I
> see is RUNNING TEST CASES.

I have gotten past the Continuum hanging problem.  I looked more into
the Maven documentation, created attached tests for the parent
project, referenced testResources in the parent project, and
referenced the attached tests in the child with a scope of test.

The attached tests jar looks good.  It has the abstract test cases as
well as the resources included.

Now the tests are executing but failing.  Not much description of the
failure even with the -e switch.

Like I mention before, the unit tests complete successfully in
eclipse.  This must be a classloader problem still.  Any ideas?