google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

Add a GwtTest to a JUnit TestSuite #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A test class that extends GwtTest cannot be added to a JUnit TestSuite.

Make GwtTest implementing JUnit Test interface would enable it.

Original issue reported on code.google.com by gael.laz...@gmail.com on 1 Aug 2011 at 9:44

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 6 Aug 2011 at 7:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
You now have two possibilities for creating JUnit TestSuite.

For example, with AnchorElementTest and AreaElementTest which are GwtTest 
instance, you can do it :

- with JUnit 4 style :

@RunWith(Suite.class)
@Suite.SuiteClasses({AnchorElementTest.class, AreaElementTest.class})
public class TestSuiteJUnit4Test {

}

- with JUnit 3 style :

public class TestSuiteJUnit3Test {

  public static Test suite() {
    TestSuite suite = new TestSuite("JUnit3TestSuite");
    suite.addTest(new AnchorElementTest());
    suite.addTest(new AreaElementTest());
    return suite;
  }

}

I've deployed new 0.32-SNAPSHOT, 0.22.3-SNAPSHOT, 0.25.3-SNAPSHOT and 
0.28.6-SNAPSHOT with the fix. 
Could you please give it a try and give me some feedback ?

Original comment by gael.laz...@gmail.com on 6 Aug 2011 at 7:39

GoogleCodeExporter commented 9 years ago
To  gael.laz...@gmail.com

It doest not work!

I use JUnit4, I test 2 of test class, it can run orderly as state in the 
annotation, but the latter does not call Init(), and run test as if if were 
part of first one.

Wutikrai

Original comment by wutik...@gmail.com on 23 Jul 2012 at 2:26