[hibernate-dev] JUnit 4.8
Sanne Grinovero
sanne at hibernate.org
Wed Jan 19 14:39:00 EST 2011
2011/1/19 Steve Ebersole <steve at hibernate.org>:
> Yes alignment should definitely be a goal. I've spoken with Adam and he is
> not particularly tied to testng and would be fine switching over to junit if
> that is the decision.
>
> The biggest issue I have with junit is the class instance per test method.
> It makes setup and teardown code fugly because everything needs to be done
> statically. I have actually prototypes using junit4 long time ago and asked
> y'all to take a look ;) It is in the sourceforge got repo. It does
> leverage rules and other junit4 newness. Still was not overly happy with it
> mainly due again to its instantiation policies.
>
> I have tried testng in the past and was not overly happy there either. If I
> remember correctly the issue there was an inability to alter test outcome
> (altering failures to success due to @FailureExpected e.g.).
That seems to be supported in TestNG:
@Test(expectedExceptions = "...")
Infinispan is using TestNG, and it seems great. It also has the
benefit of being able to run JUnit3 tests, so both with JUnit4 or
TestNG we don't need to change all tests at once.
Sanne
> On Jan 19, 2011 11:06 AM, "Hardy Ferentschik" <hibernate at ferentschik.de>
> wrote:
>> Forgot to mention, Envers is using testNG. It would be nice to align
>> frameworks.
>>
>> On Wed, 19 Jan 2011 17:23:14 +0100, Emmanuel Bernard
>> <emmanuel at hibernate.org> wrote:
>>
>>> AFAIK we stayed on JUnit 3.8 to keep 1.4 compatibility.
>>> Now that this is gone, what do you think about moving to JUnit 4.8
>>>
>>> There are a few interesting new features besides the annotation goodness.
>>> I am particularly interested in Rules which is essentially behavioral
>>> injection before / after test
>>> http://kentbeck.github.com/junit/doc/ReleaseNotes4.7.html
>>>
>>> What do you think?
>>> _______________________________________________
>>> hibernate-dev mailing list
>>> hibernate-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
More information about the hibernate-dev
mailing list