You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Mike Kienenberger <mk...@gmail.com> on 2014/03/29 14:00:33 UTC

Re: Upgraded to JUnit 4

For what it's worth, I upgraded my cayenne project from junit 3.8.1 to
junit4 a couple of weeks ago.

After a couple of days, I decided that upgrading to TestNG made more
sense, as it supports everything that junit4 did plus a lot more.  The
latest versions of TestNG will also run junit tests -- all 1500 of my
tests are running under it.

A couple of other testing libraries that I have found to be extremely
helpful are Mockito and fest.   Mockito has greatly reduced the amount
of work I needed to write tests, and fest has made the assertions
human-readable.  No more wondering whether I switched expected with
actual.



On Sat, Mar 29, 2014 at 7:30 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
> Just committed JUnit upgrade to version 4.11 from the ancient 3.8.1.
>
> Was pleasantly surprised that it is fully backwards compatible, so we don't need to rewrite all our existing tests to use annotations. I had to do some non-test file renaming though, so that surefire-plugin does not attempt to run them as tests.
>
> So for now it is business as usual, but we have the ability to use all the new features in JUnit 4, and eventually clean up our cross-DB test hacks.
>
> Andrus

Re: Upgraded to JUnit 4

Posted by Robert Zeigler <ro...@roxanemy.com>.
On Mar 29, 2014, at 3/295:09 PM , Mike Kienenberger <mk...@gmail.com> wrote:

> Test dependencies is probably the biggest one.
> 
> Tests grouping (easier in TestNG)
> 
> Parameterized Tests (easier in TestNG, although I haven't used this
> one yet, but I have several junit3 tests that try to do similar
> things)
> 

Have used parameterized tests a lot. Love them.

Robert

> Lots of small things, like not requiring static methods in TestNG for
> certain kinds of setup.
> 
> 
> 
> On Sat, Mar 29, 2014 at 11:46 AM, Andrus Adamchik
> <an...@objectstyle.org> wrote:
>> We are using Mockito in Cayenne.
>> 
>> As for TestNG, I recall we did a research some time ago and found a few things that we might take advantage of in Cayenne. Just don't remember what those are :)
>> 
>> Andrus
>> 
>> On Mar 29, 2014, at 4:00 PM, Mike Kienenberger <mk...@gmail.com> wrote:
>> 
>>> For what it's worth, I upgraded my cayenne project from junit 3.8.1 to
>>> junit4 a couple of weeks ago.
>>> 
>>> After a couple of days, I decided that upgrading to TestNG made more
>>> sense, as it supports everything that junit4 did plus a lot more.  The
>>> latest versions of TestNG will also run junit tests -- all 1500 of my
>>> tests are running under it.
>>> 
>>> A couple of other testing libraries that I have found to be extremely
>>> helpful are Mockito and fest.   Mockito has greatly reduced the amount
>>> of work I needed to write tests, and fest has made the assertions
>>> human-readable.  No more wondering whether I switched expected with
>>> actual.
>>> 
>>> 
>>> 
>>> On Sat, Mar 29, 2014 at 7:30 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>> Just committed JUnit upgrade to version 4.11 from the ancient 3.8.1.
>>>> 
>>>> Was pleasantly surprised that it is fully backwards compatible, so we don't need to rewrite all our existing tests to use annotations. I had to do some non-test file renaming though, so that surefire-plugin does not attempt to run them as tests.
>>>> 
>>>> So for now it is business as usual, but we have the ability to use all the new features in JUnit 4, and eventually clean up our cross-DB test hacks.
>>>> 
>>>> Andrus
>>> 
>> 


Re: Upgraded to JUnit 4

Posted by Mike Kienenberger <mk...@gmail.com>.
Test dependencies is probably the biggest one.

Tests grouping (easier in TestNG)

Parameterized Tests (easier in TestNG, although I haven't used this
one yet, but I have several junit3 tests that try to do similar
things)

Lots of small things, like not requiring static methods in TestNG for
certain kinds of setup.



On Sat, Mar 29, 2014 at 11:46 AM, Andrus Adamchik
<an...@objectstyle.org> wrote:
> We are using Mockito in Cayenne.
>
> As for TestNG, I recall we did a research some time ago and found a few things that we might take advantage of in Cayenne. Just don't remember what those are :)
>
> Andrus
>
> On Mar 29, 2014, at 4:00 PM, Mike Kienenberger <mk...@gmail.com> wrote:
>
>> For what it's worth, I upgraded my cayenne project from junit 3.8.1 to
>> junit4 a couple of weeks ago.
>>
>> After a couple of days, I decided that upgrading to TestNG made more
>> sense, as it supports everything that junit4 did plus a lot more.  The
>> latest versions of TestNG will also run junit tests -- all 1500 of my
>> tests are running under it.
>>
>> A couple of other testing libraries that I have found to be extremely
>> helpful are Mockito and fest.   Mockito has greatly reduced the amount
>> of work I needed to write tests, and fest has made the assertions
>> human-readable.  No more wondering whether I switched expected with
>> actual.
>>
>>
>>
>> On Sat, Mar 29, 2014 at 7:30 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>> Just committed JUnit upgrade to version 4.11 from the ancient 3.8.1.
>>>
>>> Was pleasantly surprised that it is fully backwards compatible, so we don't need to rewrite all our existing tests to use annotations. I had to do some non-test file renaming though, so that surefire-plugin does not attempt to run them as tests.
>>>
>>> So for now it is business as usual, but we have the ability to use all the new features in JUnit 4, and eventually clean up our cross-DB test hacks.
>>>
>>> Andrus
>>
>

Re: Upgraded to JUnit 4

Posted by Andrus Adamchik <an...@objectstyle.org>.
We are using Mockito in Cayenne.

As for TestNG, I recall we did a research some time ago and found a few things that we might take advantage of in Cayenne. Just don’t remember what those are :)

Andrus

On Mar 29, 2014, at 4:00 PM, Mike Kienenberger <mk...@gmail.com> wrote:

> For what it's worth, I upgraded my cayenne project from junit 3.8.1 to
> junit4 a couple of weeks ago.
> 
> After a couple of days, I decided that upgrading to TestNG made more
> sense, as it supports everything that junit4 did plus a lot more.  The
> latest versions of TestNG will also run junit tests -- all 1500 of my
> tests are running under it.
> 
> A couple of other testing libraries that I have found to be extremely
> helpful are Mockito and fest.   Mockito has greatly reduced the amount
> of work I needed to write tests, and fest has made the assertions
> human-readable.  No more wondering whether I switched expected with
> actual.
> 
> 
> 
> On Sat, Mar 29, 2014 at 7:30 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>> Just committed JUnit upgrade to version 4.11 from the ancient 3.8.1.
>> 
>> Was pleasantly surprised that it is fully backwards compatible, so we don't need to rewrite all our existing tests to use annotations. I had to do some non-test file renaming though, so that surefire-plugin does not attempt to run them as tests.
>> 
>> So for now it is business as usual, but we have the ability to use all the new features in JUnit 4, and eventually clean up our cross-DB test hacks.
>> 
>> Andrus
>