incubator-river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Dolan" <christopher.do...@avid.com>
Subject RE: test framework migration
Date Mon, 15 Nov 2010 17:38:06 GMT
While useful, I recommend against that feature in general.  Philosophically, it's bad practice
to connect the unit tests -- they should be as simple as possible and stand alone.  Technologically,
when the first test fails, then the second one fails with a really obscure error.  I can't
remember the specifics, but it was bad enough to convince me to rewrite all of my "dependsOnMethod"
tests.

Chris

-----Original Message-----
From: Zsolt Kúti [mailto:la.tinca@gmail.com] 
Sent: Saturday, November 13, 2010 7:29 AM
To: river-dev@incubator.apache.org
Subject: Re: test framework migration

On Fri, 12 Nov 2010 13:16:58 -0500
"Christopher Dolan" <christopher.dolan@avid.com> wrote:

> One more thing: the annotations are named similarly, but they are NOT
> shared.  It's @org.testng.Test vs. @org.junit.Test, for example. The
> similarity makes it easier to change the source code via
> s/junit/testng/g but it's not zero-effort.
> Chris

A further thing I found useful: test methods can be
ordered/made dependent.

@Test
public void m1() {...}

@Test(dependsOnMethods="m1")
public void m2() {...}


Zsolt

Mime
View raw message