Hello,

I would like to  run the same tests on different frameworks but with
different configuration options (specifically different set of bundles).
What is the best practice doing that? I tried subclassing tests and it does
not work properly for some reason using Pax's JUnit4Runner.
 
Here is what I did:
 
public class TestMain   {
  @Test
  public void testSomething  {
     assertTrue(false);
  } 
   // more tests and some utility methods
}

public class TestEquinox extends TestMain
{
    @Configuration
    public static Option[] configure() throws Exception {
       return options(equinox(), waitForFrameworkStartup(), provision(
               scanFile("file:bundles-equinox.lst"),
               scanFile("file:bundles.lst")));
    } 
 
    @Test
    public void testSomethingElse {
        // this runs fine, but results in duplicated code
    } 
}

In this setup, the tests in the main class pass without even running (!), I
checked with adding some logging to them. If I add tests to the subclass,
they run fine, but my plan was to put only the different configurations to
the subclasses and not to duplicate all test code  there. What am I doing
wrong? 

Thanks, Norbert

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to