You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Richard Lesley <Ri...@clearingcorp.com> on 2005/03/08 16:48:27 UTC

suite of suites?

Is a "suite of suites" supported?  

 

When attempt to run a "suite of suites" I get the following error:

warning(org.apache.cactus.internal.AbstractTestSuite$1)

No tests found in Suite2  

junit.framework.AssertionFailedError: No tests found in Suite2 

 

 

Details of problem:

Am using cactus-1.6.1

 

Suite1 contains Suite2.  Suite2 contains Test.class which contains
testWork() method.

 

When executing Suite1, receive the "no tests found" error.

When executing Suite2, the testWork() method is successfully called and
executed. 

 

Both suites are in the same package.

 

public class Suite1 extends TestCase {

    public Suite1(String name) {

        super(name);

    }

 

    public static Test suite() {

        ServletTestSuite suite = new ServletTestSuite();

        suite.addTestSuite(Suite2.class);

        return suite;

    }

}

 

public class Suite2 extends TestCase {

    public Suite2(String name) {

        super(name);

    }

 

    public static Test suite() {

        ServletTestSuite suite = new ServletTestSuite();

        suite.addTestSuite(Test.class);

        return suite;

    }

}


Re: suite of suites?

Posted by Milan Trajkovic <mi...@gmail.com>.
     public static Test suite() {
 
         ServletTestSuite suite = new ServletTestSuite();
 
         suite.addTestSuite(Suite2.class);
 
         return suite;
 
     }


This is the problem. I thin it should look like this:

 public static Test suite() {
 
         ServletTestSuite suite = new ServletTestSuite();
 
         suite.addTestSuite(Suite2.suite());
 
         return suite;
 
     }

Regards,
Milan



On Tue, 8 Mar 2005 09:48:27 -0600, Richard Lesley
<Ri...@clearingcorp.com> wrote:
> Is a "suite of suites" supported?
> 
> When attempt to run a "suite of suites" I get the following error:
> 
> warning(org.apache.cactus.internal.AbstractTestSuite$1)
> 
> No tests found in Suite2
> 
> junit.framework.AssertionFailedError: No tests found in Suite2
> 
> Details of problem:
> 
> Am using cactus-1.6.1
> 
> Suite1 contains Suite2.  Suite2 contains Test.class which contains
> testWork() method.
> 
> When executing Suite1, receive the "no tests found" error.
> 
> When executing Suite2, the testWork() method is successfully called and
> executed.
> 
> Both suites are in the same package.
> 
> public class Suite1 extends TestCase {
> 
>     public Suite1(String name) {
> 
>         super(name);
> 
>     }
> 
>     public static Test suite() {
> 
>         ServletTestSuite suite = new ServletTestSuite();
> 
>         suite.addTestSuite(Suite2.class);
> 
>         return suite;
> 
>     }
> 
> }
> 
> public class Suite2 extends TestCase {
> 
>     public Suite2(String name) {
> 
>         super(name);
> 
>     }
> 
>     public static Test suite() {
> 
>         ServletTestSuite suite = new ServletTestSuite();
> 
>         suite.addTestSuite(Test.class);
> 
>         return suite;
> 
>     }
> 
> }
> 
>