Practical Unit Testing with TestNG and Mockito
PDF A4 + ePub + Kindle Buy PDF A4 + ePub + Kindle $25
PDF USLetter + ePub + Kindle Buy PDF USLetter + ePub + Kindle $25
Printed US   UK   DE
ES   IT   FR  
 
 
Practical Unit Testing with JUnit and Mockito
PDF A4 + ePub + Kindle Buy PDF A4 + ePub + Kindle $25
PDF USLetter + ePub + Kindle Buy PDF USLetter + ePub + Kindle $25
Printed US   UK   DE
ES   IT   FR  
 

Personal Discounts

  • If you buy the printed version of any "Practical Unit Testing" book, you can buy ePub + mobi + PDF for 10$! Just send me a picture of the book on your desk.
  • Already have one of "Practical Unit Testing" e-books and now you want to buy the other one? It will cost you $5 only. Please contact me.

Volume Discounts

If you want to buy electronic versions of the Practical Unit Testing for your team or company, then please contact me regarding the final price.
In case of paper books the discounts are as follows:
nb of readers discount per book
2-5 10%
6-10 20%
11-20 30%
20+ contact me, please
Hi there!
My name is Tomek Kaczanowski, and I’m happy to present to you the results of my hard work. My books have been written on the basis of my experience as a senior Java developer, trainer, mentor, technical team leader and merciless code reviewer. :)
The books have been proofread by several TDD, TestNG and Mockito experts, and corrected by a native speaker, so I feel pretty confident about recommending them. Okay then, let’s forget about modesty: I reckon these really are the best books dealing with unit tests on the market! I hope you’ll share my opinion - when you’ve read them! :)
Personally, I would have been really happy to have had the chance to read books like these some time ago: it would have spared me several grey hairs, for sure! :) I would also be happy if my colleagues were to read them and follow the advice they would find there... :)
You can learn more about me by reading my blog.
Practical Unit Testing with TestNG and Mockito
All source code for exercises is now available online. Some examples are also available.
Practical Unit Testing with JUnit and Mockito
Source code for exercises is available online.
I have already bought TestNG book, should I also buy JUnit version?
Both books are very similar so I do not think that you need both. The difference is, that each of them uses different testing framework for all code examples. Also, because of some differences between JUnit and TestNG, some sections were changed. For example, in JUnit there is nothing about test-dependent methods.
What about source code for JUnit book?
I'm working on it. Should be available in the first half of May.
I'm not Kent Beck, so I expect you to be a little hesitant about acquiring my books. Good! You should never believe what the marketing says! :) Anyway, I’m giving you the chance here to learn from other readers whether the books are worth your money and your time.
Sample Chapter
Reviews are cool, but why not decide on your own? Here you will find one of the last chapters from the "Practical Unit Testing with TestNG and Mockito" book. The chapter explains how to make unit tests manageable, so they do not become a burden as the project develops and changes are introduced. To a large extent this chapter is independent from the underlying testing framework (JUnit or TestNG), so its content in the "Practical Unit Testing with JUnit and Mockito" book is very similar.
P.S. Hint: use "fullscreen" option. :)
Practical Unit Testing with TestNG and Mockito
In two hours of reading, I knew more of the usage of TestNG and Mockito than after several days of Web crawling. Review by Francis Galiegue, from mailing list
Tomek does also a good job of not just pushing his own preferences in Java unit testing, but presenting the available choices either for test strategies or for unit testing tools.
I would recommend this book to every developer concerned by code quality, especially if you are working in a Java context. Franco Martinig, on Software Development Books site
Despite the Java/TestNG/Mockito orientation that the title might suggest, the book contains a high percentage of general unit testing knowledge that can be applied (mostly) independently of the language and tools that you are using.
This book is highly recommendable to all software developers interested in unit testing, particularly if you are working in a Java context. From Franco Martinig's blog
This book gives a lot of good, general advice on unit testing in general (and not relevant only to Java), but it also brings one very quickly in working order with its two proponent tools. In two hours of reading, I knew more of the usage of TestNG and Mockito than after several days of Web crawling. And I have learned how to do TDD (test driven development) correctly.
I liked the approach of the author to have an open view on unit testing and presenting all the available choices for testing strategies or tools selection instead of just pushing his own opinion. From review on Amazon.com site
[...] for those less familiar with testing and using TestNG and Mockito [...] this book is a totally must read as it gently introduces reader to world of proper unit testing using best tools available in Java world. Review by Tomasz Dziurko.
Bought only a few months after its publication (2012) I was delighted to find some very up-to-date content.
World would be better if every programmer read this book. The book focuses not only on the toolset which perhaps will be outdated very quickly but also/mainly on the OO design and testing principles. Review from Goodreads site
Practical Unit Testing with JUnit and Mockito
No reviews yet, but since the book is very similiar to the previous one, you could read what is written above.
Uh-oh, bugs happen, both in code and in books. Below, you will find the most prominent bugs.
BTW, if you buy the electronic version, you won't see them! :) Unfortunately, I cannot update the printed version so easily. :(
Practical Unit Testing with TestNG and Mockito
page is should be
section 3.8.2, page 48 Let us go back to the example of the Client and Address that were introduced in Section 3.9. Let us introduce now two simple Client and Address classes.
Practical Unit Testing with JUnit and Mockito
page is should be
section 6.15.2, page 181 Listing 6.51. updateUser() method Listing 6.51. assignPass() method
section 6.15.5, page 183 Listing 6.37 listing in the Section 6.11 section Listing 6.37 in the Section 6.11
section 8.9.2, page 243 8.9.2. Enhance the Custom Rule uh-oh, this exercise does not belong here! It was already included in 6.15.8!
section 9.8.2, page 273 private String state; private State state;
Questions?
E-mail me at
kaczanowski.tomek@gmail.com
Jeżeli wolisz możesz zapłacić w złotówkach zarówno za elektroniczne jak i papierowe wersje książek z serii Practical Unit Testing. Wpłat dokonuj proszę na konto:

10 1950 0001 2006 0269 3956 0002
Tomasz Kaczanowski kaczanowscy.pl
ul. Rydla 45a/39
30-087 Kraków
Faktury wystawiam. Podaj proszę niezbędne dane.

Wersje papierowe

Mam u siebie kilka egzemplarzy papierowych wersji książek z serii Practical Unit Testing. Zapłacisz za nie nieco taniej niż na Amazonie, i prawdopodobnie dużo krócej poczekasz na przesyłkę. Jeżeli jesteś zainteresowany, proszę o kontakt. Koniecznie zaznacz o jaką książkę chodzi - w wersji dla JUnit czy TestNG.

Wersje elektroniczne (do użytku prywatnego)

Cena książek z serii Practical Unit Testing w wersji elektronicznej wynosi 80 PLN. Dokonaj przelewu na podane powyżej konto, oraz napisz proszę maila z informacją że dokonałeś wpłaty. Zaznacz proszę czy chodzi o wersję dla TestNG czy dla JUnit.

Zniżki przy zakupie większej ilości egzemplarzy

Jeżeli planujesz kupić kilka papierowych książek dla swojego zespołu lub firmy, wówczas obowiązują następujące zniżki:
liczba zakupionych książek procent zniżki
2-5 10%
6-10 20%
11-20 30%
20+ proszę o email
Jeżeli chciałbyś kupić elektroniczną wersję książek na potrzeby pracowników w firmie, proszę skontaktuj się ze mną podając w mailu liczbę osób jaka będzie korzystać z książki, oraz wersje (JUnit lub TestNG).