Hello Peter
Le 20/09/12 18:32, Peter K a écrit :
although I find TestNG to be a better tool I don't think that switching
makes sense (now).
I would go making the Geo* integration, adding tests (! which is more
important then everything else IMO :)),
making a first release and then probably switch if it is really worth
the effort
(e.g. junit is still more wide spread yet and has better tool support
yet. Probably in some months this gets better for TestNG **).
This is fine for me, thanks for the feedback.
BTW: Switching can be done nearly automatically via an eclipse plugin:
http://testng.org/doc/migrating.html
That would probably be useful for a large amount of tests. But
GeoAPI-conformance makes extensive use of parametrized tests (since the
implementation must be specified) and listeners; I would be impressed if
the plugin was sophisticated enough for converting such tests automatically.
The capability to specify tests dependencies seems attractive
you can do so for junit too or what do you mean here?
JUnit provides TestSuite, but I was hopping for a simpler annotation like:
class TestA {...}
@Depends(TestA.class)
class TestB {...}
or maybe I missed an equivalent functionality in JUnit?
, and the fact that TestNG doesn't recreate new "FooTest" instance for
every tests may speed-up when the constructor performs heavy
initialization.
Constructors shouldn't do that ;)
I should have mentioned methods annotated by @Before instead. JUnit has
@BeforeClass for initializing resources only once, but it force us to
store the resources in static fields, which may cause the JVM to retain
them longer then needed (while I admit we can set the static fields to
null explicitly in an @AfterClass method).
Regards,
Martin