Overriden TestSuite.run() not being invoked

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Overriden TestSuite.run() not being invoked

Tony Seebregts
Hi,

I'm attempting to use the continuous testing Eclipse plugin with a test
suite that is derived from the JUnit TestSuite (necessary to perform
once off initialization for all the tests in the suite). The
initialization is performed in the run() method - which seemingly
doesn't get invoked if I have the continuous testing plugin installed
and enabled in Eclipse.

The test suite works fine if I disable the continuous testing plugin again.

Any ideas ?

regards

Tony Seebregts



_______________________________________________
Continuous-testing-plugin-discuss mailing list
[hidden email]
https://lists.csail.mit.edu/mailman/listinfo/continuous-testing-plugin-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Overriden TestSuite.run() not being invoked

dsaff
Tony,

Thanks for your mail.  What you describe should work fine.  Can you boil
it down to a small example that doesn't work?  Thanks,

    David Saff

Tony Seebregts wrote:

>Hi,
>
>I'm attempting to use the continuous testing Eclipse plugin with a test
>suite that is derived from the JUnit TestSuite (necessary to perform
>once off initialization for all the tests in the suite). The
>initialization is performed in the run() method - which seemingly
>doesn't get invoked if I have the continuous testing plugin installed
>and enabled in Eclipse.
>
>The test suite works fine if I disable the continuous testing plugin again.
>
>Any ideas ?
>
>regards
>
>Tony Seebregts
>
>
>
>_______________________________________________
>Continuous-testing-plugin-discuss mailing list
>[hidden email]
>https://lists.csail.mit.edu/mailman/listinfo/continuous-testing-plugin-discuss
>  
>


_______________________________________________
Continuous-testing-plugin-discuss mailing list
[hidden email]
https://lists.csail.mit.edu/mailman/listinfo/continuous-testing-plugin-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Overriden TestSuite.run() not being invoked

Tony Seebregts
Hi David,

Thanks for the prompt reply. I've just tested the code below and it
doesn't create the test file (or print out the "Initialising ..."
message) so hope that helps. I'm running an Eclipse SDK setup that is
almost exactly as it comes "out of the box" - so hopefully there
shouldn't be any library type conflicts.

--------
package com.cibecs;

import java.io.FileWriter;
import java.io.IOException;

import junit.framework.Test;
import junit.framework.TestResult;
import junit.framework.TestSuite;

public class   ContinousTests
       extends TestSuite {

    // CLASS METHODS
   
    public static Test suite() {
        return new ContinousTests();
    }
   
    // CONSTRUCTOR
   
    public ContinousTests () {
        super ("Continuous Test Suite");
       
        addTestSuite(TestXXX.class);
    }

    // INSTANCE METHODS
   
    public void run (TestResult result) {
        initialise();
        super.run (result);
        cleanup   ();
    }
   
    private void initialise () {
        System.out.println("**** Initialising ...");

        // ... create test file just in case console stuff doesn't work
       
        FileWriter writer;
        try {
           
            writer = new FileWriter("xxx.txt");
            writer.write("Zippity Do Dah Day");
            writer.close();
        } catch (IOException x) {
        }
    }

    private void cleanup () {
        System.out.println("**** Cleaning up ...");
    }

}
----------------

regards

Tony


David Saff wrote:

> Tony,
>
> Thanks for your mail.  What you describe should work fine.  Can you
> boil it down to a small example that doesn't work?  Thanks,
>
>    David Saff
>
> Tony Seebregts wrote:



_______________________________________________
Continuous-testing-plugin-discuss mailing list
[hidden email]
https://lists.csail.mit.edu/mailman/listinfo/continuous-testing-plugin-discuss