Is anyone working on an (e)book which is covering Mockito from front to back?

228 views
Skip to first unread message

strug

unread,
Sep 29, 2011, 6:05:22 PM9/29/11
to mockito
Hi there,

is anyone working on an (e)book which is covering Mockito from front
to back? Or did anyone plan to write one?

A common pattern is to introduce mocking frameworks in books that
cover TDD. Most of the time the mocking framework is just touched.

I think it could be valuable to have a book that focus on the mocking
framework itself.

What did you thing?

Best regards, Leif

Szczepan Faber

unread,
Sep 29, 2011, 6:27:08 PM9/29/11
to moc...@googlegroups.com
Hey

I don't work on Mockito book at the moment and I don't know if anyone does :)

AFAIK, Mockito was mentioned (e.g. with some examples & patterns, etc.) in 2 books I know of: Agile ALM (I contributed a chapter myself ;) and http://www.stripesbook.com.

I could be wrong but that's what I know.

Cheers!
Szczepan


--
You received this message because you are subscribed to the Google Groups "mockito" group.
To post to this group, send email to moc...@googlegroups.com.
To unsubscribe from this group, send email to mockito+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mockito?hl=en.




--
Szczepan Faber
Principal engineer@gradleware
Lead@mockito

David Wallace

unread,
Oct 3, 2011, 3:43:04 AM10/3/11
to mockito
I'm not sure how much demand there would be for such a book, either as
paper or in electronic form. My opinion is that the Mockito javadocs
are excellent. They're written at just the right level for a Java
programmer using mockito, and contain pretty much everything one would
ever need to know.

However, if enough of the mockito community feel that there's a need
for such a book, I would like to be the author, or a contributing
author. Hopefully, some other people could help me, particularly with
reviewing/proofreading it from a technical point of view. It wouldn't
be a large book - really just a supplement to the existing
documentation, maybe written in tutorial form. I would release it as
a free download; and if it's well received, I might try to get it
published as paper.

Please, people, give me some feedback on this idea. I'm happy to
spend my time doing this, but not if nobody's interested.

Regards,
David

Szczepan Faber

unread,
Oct 3, 2011, 11:50:56 AM10/3/11
to moc...@googlegroups.com
Due to my current life priorities I won't be available to author / co-author. However, I'd more than happy to support the efforts! (e.g. reviewing, etc.)

Cheers!

--
You received this message because you are subscribed to the Google Groups "mockito" group.
To post to this group, send email to moc...@googlegroups.com.
To unsubscribe from this group, send email to mockito+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mockito?hl=en.

Paul Mendelson

unread,
Oct 3, 2011, 10:59:20 PM10/3/11
to moc...@googlegroups.com
I think there would be demand for some sort of book.  The API documentation is a great reference for getting detailed information about using capabilities you already know that you want to use.
 
For me the benefit of a book would be if it was organized around 5 or 6 different testing patterns and how to realize them in Mockito.
 
Personally, I would look for guidance on the benefits of stubing almost any call in a service i'm mocking vs just mocking the very specific calls I expect my test to lead to the invocation of.


 

Thomas Sundberg

unread,
Oct 4, 2011, 1:05:00 AM10/4/11
to moc...@googlegroups.com
Hi!

I could argue that if there is a book available, then it is easier to
point at for people in organizations that only uses large and well
known tools. A tool with a great book written about it is obviously a
large and well known tool.

If needed, I could participate in some way.
Thomas

> --
> You received this message because you are subscribed to the Google Groups "mockito" group.
> To post to this group, send email to moc...@googlegroups.com.
> To unsubscribe from this group, send email to mockito+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mockito?hl=en.
>
>

--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

Tomek Kaczanowski

unread,
Oct 4, 2011, 4:42:43 PM10/4/11
to mockito
Hi All,

this is my first post on Mockito group, and I'm happy to announce,
that YES, I'm currently working on a book which to some extent covers
Mockito! :) The book is devoted to unit tests, and Mockito plays an
important role there, as the whole part on test doubles (roughly 1/3
of the book) is written with all code examples based on Mockito. Not
really a Mockito tutorial (I believe the original documentation is
very good), but definitely a good starting point for anyone planning
to use Mockito for real.

On Oct 3, 5:50 pm, Szczepan Faber <szcze...@gmail.com> wrote:
> Due to my current life priorities I won't be available to author /
> co-author. However, I'd more than happy to support the efforts! (e.g.
> reviewing, etc.)
As the polish saying goes, now I "trzymam Cię za słowo" ;) Heh, I
don't think you expected this to happen so soon, did you?. :)

P.S. Anyone willing to be up-to-date with the book development, please
check my blog or twitter. I still need some time to finish it, but it
is already very advanced.

--
Cheers,
Tomek Kaczanowski
http://kaczanowscy.pl/tomek
http://twitter.com/#!/tkaczanowski

>
> Cheers!

Szczepan Faber

unread,
Oct 5, 2011, 1:11:24 AM10/5/11
to moc...@googlegroups.com
Cool :)

I'm assuming the book will be in english?

Cheers!

2011/10/4 Tomek Kaczanowski <kaczanow...@gmail.com>

David Wallace

unread,
Oct 5, 2011, 3:29:24 AM10/5/11
to mockito
Hi Tomek,
This is good to know. Since you're obviously well on the way to
publishing this, I probably won't bother making the effort. I still
haven't made up my mind for sure.

I'd like to ask a question though. Do you intend to have the word
"mockito" in the title of your book?

I'm thinking about Thomas's point about the existence of a book about
a product enhancing the reputation of that product. I think a great
piece of software like mockito deserves to have its name on the cover
of a well known book. I would like to see mockito become the
"industry standard" mocking framework, as I think it's an exceptional
product. And so, I would like to encourage you to consider using the
word "mockito" in your title, if it's appropriate to the content of
your book, for you to do so.

Kind regards,
David.

On Oct 5, 9:42 am, Tomek Kaczanowski <kaczanowski.to...@gmail.com>
wrote:
> Hi All,
>
> this is my first post on Mockito group, and I'm happy to announce,
> that YES, I'm currently working on a book which to some extent covers
> Mockito! :) The book is devoted to unit tests, and Mockito plays an
> important role there, as the whole part on test doubles (roughly 1/3
> of the book) is written with all code examples based on Mockito. Not
> really a Mockito tutorial (I believe the original documentation is
> very good), but definitely a good starting point for anyone planning
> to use Mockito for real.
>
> On Oct 3, 5:50 pm, Szczepan Faber <szcze...@gmail.com> wrote:> Due to my current life priorities I won't be available to author /
> > co-author. However, I'd more than happy to support the efforts! (e.g.
> > reviewing, etc.)
>
> As the polish saying goes, now I "trzymam Ciê za s³owo" ;) Heh, I
> don't think you expected this to happen so soon, did you?. :)
>
> P.S. Anyone willing to be up-to-date with the book development, please
> check my blog or twitter. I still need some time to finish it, but it
> is already very advanced.
>
> --
> Cheers,
> Tomek Kaczanowskihttp://kaczanowscy.pl/tomekhttp://twitter.com/#!/tkaczanowski
> > Lead@mockito- Hide quoted text -
>
> - Show quoted text -

Tomek Kaczanowski

unread,
Oct 6, 2011, 1:54:06 AM10/6/11
to mockito
> I'm assuming the book will be in english?
Yes. Then I will translate it into polish.

--
Cheers,
Tomek Kaczanowski
http://kaczanowscy.pl/tomek
http://twitter.com/#!/tkaczanowski

>
> Cheers!
>
> 2011/10/4 Tomek Kaczanowski <kaczanowski.to...@gmail.com>

Tomek Kaczanowski

unread,
Oct 6, 2011, 2:00:27 AM10/6/11
to mockito
Hi David,

Surely I agree that Mockito deserves to be on the front page! :) Right
now I plan to have "Mockito" in the subtitle - something like "Unit
Tests blah blah blah... with TestNG and Mockito", e.g. "Sex, drugs and
unit tests, with TestNG and Mockito" ;)

The point is, my book is not really devoted to tools, but to
techniques and ideas. Of course, there is plenty about the tools also.
I find TestNG and Mockito to be superior at the moment, and thus I use
them, and am glad to promote them.
--
> I'd like to ask a question though.  Do you intend to have the word
> "mockito" in the title of your book?
"Unit Tests blah blah blah... with TestNG and Mockito".

strug

unread,
Oct 7, 2011, 6:39:55 PM10/7/11
to mockito

> The point is, mybookis not really devoted to tools, but to
> techniques and ideas.

What do you think about having a kind of "reference documentation". I
think of s.th. like spring has (e.g.
http://static.springsource.org/spring/docs/3.1.0.M2/spring-framework-reference/html/index.html).

This documentation could be driven by the community and the developer
(sources hosted on github or elsewhere).
All the details of http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html
should be in and parts of the current FAQ. Furthermore this
documentation should be extended by repeated and/or interesting
questions/posts from this group here.

The advantage of this approach might be a common entry point for
starting and working with mockito.

What do you think?

Graham Allan

unread,
Oct 8, 2011, 6:22:41 AM10/8/11
to moc...@googlegroups.com
If you haven't discovered it already, I'd recommend taking a look at 'Growing Object-Oriented Software Guided By Tests'[1]. It's about using mocking techniques to drive design. It uses JMock for it's examples, but the fundamentals are mocking-framework-agnostic. Might be worth taking a look, to see what's out there/what is missing etc.

Kind regards,
Graham

David Wallace

unread,
Oct 9, 2011, 4:59:15 AM10/9/11
to mockito
Maybe the "reference documentation" could start out as some kind of
Wiki; where the Javadocs and FAQ are the initial content.
Contributions could be invited for a set period, for example three
months. At the end of that time, somebody could pick it all up and
convert it all to a book-like format. That would then be version 1.0
of the reference documentation, and there could be a link to it from
the Mockito home page.

What do you all think?



On Oct 8, 11:39 am, strug <struggyst...@googlemail.com> wrote:
> > The point is, mybookis not really devoted to tools, but to
> > techniques and ideas.
>
> What do you think about having a kind of "reference documentation". I
> think of s.th. like spring has (e.g.http://static.springsource.org/spring/docs/3.1.0.M2/spring-framework-...).
>
> This documentation could be driven by the community and the developer
> (sources hosted on github or elsewhere).
> All the details ofhttp://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html
Reply all
Reply to author
Forward
0 new messages