[xwiki-devs] [VOTE] Start using Mockito instead of JMock
Hi devs, This week end I've been (at last) experimenting with Mockito (http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html) and it's been successful so far :) I've converted a first test to use it as a demonstrator of its power (http://jira.xwiki.org/browse/XCOMMONS-316): https://github.com/xwiki/xwiki-commons/commit/7b45b48de1c6915294736dfddda747... I'd like to propose to start using it and start writing our tests with it since: * It's very easy to use. I was able to very simply migrate an existing test to it * It makes our tests much more readable to read and maintain IMO because 1) there's less boilerplate code, 2) it provides default values for mocks and 3) no more of ugly expectations syntax * It's powerful, just see http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html * It's actively maintained and developed, see http://code.google.com/p/mockito/downloads/list and http://code.google.com/p/mockito/source/list and http://code.google.com/p/mockito/people/list After we've written/converted a few tests (let's say in 1 month or so) we can really decide if we like it and make it our official mocking tool or if we should go back to JMock (but I have little doubts ;)). WDYT? Thanks -Vincent
On Dec 8, 2012, at 3:12 PM, Vincent Massol <[email protected]> wrote:
Hi devs,
This week end I've been (at last) experimenting with Mockito (http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html) and it's been successful so far :)
I've converted a first test to use it as a demonstrator of its power (http://jira.xwiki.org/browse/XCOMMONS-316): https://github.com/xwiki/xwiki-commons/commit/7b45b48de1c6915294736dfddda747...
I'd like to propose to start using it and start writing our tests with it since: * It's very easy to use. I was able to very simply migrate an existing test to it * It makes our tests much more readable to read and maintain IMO because 1) there's less boilerplate code, 2) it provides default values for mocks and 3) no more of ugly expectations syntax * It's powerful, just see http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html * It's actively maintained and developed, see http://code.google.com/p/mockito/downloads/list and http://code.google.com/p/mockito/source/list and http://code.google.com/p/mockito/people/list
After we've written/converted a few tests (let's say in 1 month or so) we can really decide if we like it and make it our official mocking tool or if we should go back to JMock (but I have little doubts ;)).
WDYT?
+1 Thanks -Vincent
On 12/08/2012 09:12 AM, Vincent Massol wrote:
Hi devs,
This week end I've been (at last) experimenting with Mockito (http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html) and it's been successful so far :)
I've converted a first test to use it as a demonstrator of its power (http://jira.xwiki.org/browse/XCOMMONS-316): https://github.com/xwiki/xwiki-commons/commit/7b45b48de1c6915294736dfddda747...
I'd like to propose to start using it and start writing our tests with it since: * It's very easy to use. I was able to very simply migrate an existing test to it * It makes our tests much more readable to read and maintain IMO because 1) there's less boilerplate code, 2) it provides default values for mocks and 3) no more of ugly expectations syntax * It's powerful, just see http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html * It's actively maintained and developed, see http://code.google.com/p/mockito/downloads/list and http://code.google.com/p/mockito/source/list and http://code.google.com/p/mockito/people/list
After we've written/converted a few tests (let's say in 1 month or so) we can really decide if we like it and make it our official mocking tool or if we should go back to JMock (but I have little doubts ;)).
WDYT?
Looks good, +1. -- Sergiu Dumitriu http://purl.org/net/sergiu/
+1, sounds good On Sat, Dec 8, 2012 at 6:10 PM, Sergiu Dumitriu <[email protected]> wrote: > On 12/08/2012 09:12 AM, Vincent Massol wrote: > > Hi devs, > > > > This week end I've been (at last) experimenting with Mockito ( > http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html) > and it's been successful so far :) > > > > I've converted a first test to use it as a demonstrator of its power ( > http://jira.xwiki.org/browse/XCOMMONS-316): > > > https://github.com/xwiki/xwiki-commons/commit/7b45b48de1c6915294736dfddda7479213e754fd > > > > I'd like to propose to start using it and start writing our tests with > it since: > > * It's very easy to use. I was able to very simply migrate an existing > test to it > > * It makes our tests much more readable to read and maintain IMO because > 1) there's less boilerplate code, 2) it provides default values for mocks > and 3) no more of ugly expectations syntax > > * It's powerful, just see > http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html > > * It's actively maintained and developed, see > http://code.google.com/p/mockito/downloads/list and > http://code.google.com/p/mockito/source/list and > http://code.google.com/p/mockito/people/list > > > > After we've written/converted a few tests (let's say in 1 month or so) > we can really decide if we like it and make it our official mocking tool or > if we should go back to JMock (but I have little doubts ;)). > > > > WDYT? > > Looks good, +1. > > -- > Sergiu Dumitriu > http://purl.org/net/sergiu/ > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > -- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
+1, Thanks, Eduard On Sat, Dec 8, 2012 at 8:09 PM, Denis Gervalle <[email protected]> wrote: > +1, sounds good > > > On Sat, Dec 8, 2012 at 6:10 PM, Sergiu Dumitriu <[email protected]> wrote: > > > On 12/08/2012 09:12 AM, Vincent Massol wrote: > > > Hi devs, > > > > > > This week end I've been (at last) experimenting with Mockito ( > > http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html) > > and it's been successful so far :) > > > > > > I've converted a first test to use it as a demonstrator of its power ( > > http://jira.xwiki.org/browse/XCOMMONS-316): > > > > > > https://github.com/xwiki/xwiki-commons/commit/7b45b48de1c6915294736dfddda7479213e754fd > > > > > > I'd like to propose to start using it and start writing our tests with > > it since: > > > * It's very easy to use. I was able to very simply migrate an existing > > test to it > > > * It makes our tests much more readable to read and maintain IMO > because > > 1) there's less boilerplate code, 2) it provides default values for mocks > > and 3) no more of ugly expectations syntax > > > * It's powerful, just see > > http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html > > > * It's actively maintained and developed, see > > http://code.google.com/p/mockito/downloads/list and > > http://code.google.com/p/mockito/source/list and > > http://code.google.com/p/mockito/people/list > > > > > > After we've written/converted a few tests (let's say in 1 month or so) > > we can really decide if we like it and make it our official mocking tool > or > > if we should go back to JMock (but I have little doubts ;)). > > > > > > WDYT? > > > > Looks good, +1. > > > > -- > > Sergiu Dumitriu > > http://purl.org/net/sergiu/ > > _______________________________________________ > > devs mailing list > > [email protected] > > http://lists.xwiki.org/mailman/listinfo/devs > > > > > > -- > Denis Gervalle > SOFTEC sa - CEO > eGuilde sarl - CTO > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs >
+1 Thanks, Marius On Sat, Dec 8, 2012 at 4:12 PM, Vincent Massol <[email protected]> wrote:
Hi devs,
This week end I've been (at last) experimenting with Mockito (http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html) and it's been successful so far :)
I've converted a first test to use it as a demonstrator of its power (http://jira.xwiki.org/browse/XCOMMONS-316): https://github.com/xwiki/xwiki-commons/commit/7b45b48de1c6915294736dfddda747...
I'd like to propose to start using it and start writing our tests with it since: * It's very easy to use. I was able to very simply migrate an existing test to it * It makes our tests much more readable to read and maintain IMO because 1) there's less boilerplate code, 2) it provides default values for mocks and 3) no more of ugly expectations syntax * It's powerful, just see http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html * It's actively maintained and developed, see http://code.google.com/p/mockito/downloads/list and http://code.google.com/p/mockito/source/list and http://code.google.com/p/mockito/people/list
After we've written/converted a few tests (let's say in 1 month or so) we can really decide if we like it and make it our official mocking tool or if we should go back to JMock (but I have little doubts ;)).
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
looks good, +1 On Sat, Dec 8, 2012 at 3:12 PM, Vincent Massol <[email protected]> wrote:
Hi devs,
This week end I've been (at last) experimenting with Mockito ( http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html) and it's been successful so far :)
I've converted a first test to use it as a demonstrator of its power ( http://jira.xwiki.org/browse/XCOMMONS-316):
https://github.com/xwiki/xwiki-commons/commit/7b45b48de1c6915294736dfddda747...
I'd like to propose to start using it and start writing our tests with it since: * It's very easy to use. I was able to very simply migrate an existing test to it * It makes our tests much more readable to read and maintain IMO because 1) there's less boilerplate code, 2) it provides default values for mocks and 3) no more of ugly expectations syntax * It's powerful, just see http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html * It's actively maintained and developed, see http://code.google.com/p/mockito/downloads/list and http://code.google.com/p/mockito/source/list and http://code.google.com/p/mockito/people/list
After we've written/converted a few tests (let's say in 1 month or so) we can really decide if we like it and make it our official mocking tool or if we should go back to JMock (but I have little doubts ;)).
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
a little late. :-) But yep, looks good to me, +1 I think it even has the potential to replace the easymock usage in the xwiki based celements-web project. :-) Fabian. 2012/12/8 Vincent Massol <[email protected]>
Hi devs,
This week end I've been (at last) experimenting with Mockito ( http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html) and it's been successful so far :)
I've converted a first test to use it as a demonstrator of its power ( http://jira.xwiki.org/browse/XCOMMONS-316):
https://github.com/xwiki/xwiki-commons/commit/7b45b48de1c6915294736dfddda747...
I'd like to propose to start using it and start writing our tests with it since: * It's very easy to use. I was able to very simply migrate an existing test to it * It makes our tests much more readable to read and maintain IMO because 1) there's less boilerplate code, 2) it provides default values for mocks and 3) no more of ugly expectations syntax * It's powerful, just see http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html * It's actively maintained and developed, see http://code.google.com/p/mockito/downloads/list and http://code.google.com/p/mockito/source/list and http://code.google.com/p/mockito/people/list
After we've written/converted a few tests (let's say in 1 month or so) we can really decide if we like it and make it our official mocking tool or if we should go back to JMock (but I have little doubts ;)).
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (7)
-
Denis Gervalle -
Eduard Moraru -
Fabian Pichler -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol