Practical Unit Testing with TestNG and Mockito has 36 ratings and 5 reviews. Adrienbe said: Without a doubt a great book for beginners in 27 Mar Short information about my book: “Practical Unit Testing with TestNG and Mockito “. Write great unit tests using the most popular technologies of the Java world! Learn how to use JUnit, TestNG, Mockito and many other tools to unit test your code.
|Published (Last):||19 August 2018|
|PDF File Size:||9.70 Mb|
|ePub File Size:||1.58 Mb|
|Price:||Free* [*Free Regsitration Required]|
Book review: Practical Unit Testing with TestNG and Mockito
Close About me Contacts Become an author. Dariusz Nowak rated it really liked it Dec 30, Despite the book is about Java and Java related libraries, it also covers common concepts, so it can be helpful for practucal who use some other programming language.
Also I want to say big thanks to Tomek for a humor on practical unit testing with testng and mockito book pages, it makes the reading not boring. Jul festing, Tomasz rated it really liked it Recommends it for: Below, you will find the most prominent bugs.
This mokcito will help. But if you prefer JUnit over TestNG or PowerMock over Mockito, it is still a valid and a very practical unit testing with testng and mockito source of information about proper and painless testing. Bartek Piech rated it liked it Nov 23, Already have one of “Practical Practicsl Testing” e-books and now you want to buy the other one?
Each section has its own exercises. This book explains in detail how to implement unit tests using two very popular open source Java technologies: Grasp the role and purpose of unit tests Write high-quality, readable and maintainable unit tests Learn how to use TestNG and Mockito but also other useful tools Avoid common pitfalls when writing unit tests Recognize bad unit tests, and fix them in no time Develop code following the Test Driven Development TDD approach Use mocks, stubs and test-spies intelligently Measure the quality of your tests using code practical unit testing with testng and mockito and mutation testing Learn how to improve your tests’ code so it is an asset and not a burden Test collections, expected exceptions, time-dependent methods and much more Customize test reports so that they show you what you really need to know Master tools and techniques your team members have never even heard of priceless!
For example, in JUnit there is nothing about test-dependent methods. Bob Kozik rated it really liked it May 19, If there is a method we want to test but at the same time there is another method in tested object that want to mock, it is possible to do that by usinf Mockito spy:. About white box testing in java. Dave Kindig rated it liked it Apr 08, If practical unit testing with testng and mockito place yourself in the middle, Practical Unit Testing with TestNG and Mockito is still a very good choice as it will help you to systematize all the stuff you already know and meanwhile you will surely learn something new about tools and, worth to note, about general efficient and painless approach to testing your code.
Hesting after running such tests in html report we will see something like presenten on the screenshot below:. Mockito gives us another very useful feature, ability to check what arguments were passed to methods using ArgumentCaptor:.
Practkcal, if any of the mentioned reasons works for you order this book and enjoy.
The chapter explains how to make unit tests practical unit testing with testng and mockito, so they do not become a burden as the project develops and changes are introduced. It presents a range of techniques necessary to praactical high quality unit tests – e. Then we could learn about customizing TestNG using listeners and reporters, organizing test classes into packages and modules, organizing code in test methods famous BDD given-when-then trio.
Practical unit testing with testng and mockito for people who are testing and using TestNG and Mockito for over a eight or more years: Reporter that allows developer to add testhg information to html reports. Krzysiek rated it liked it Apr 11, If you ever read this Thomasz: Opinions expressed by DZone contributors are their own.
We start with simple class without any dependencies, easy to understand and easy to test. Below you can read some of my thoughts after reading this book. Has good examples and explanation. I am far from saying that for more experienced developers this book is not a good way to spend their practical unit testing with testng and mockito. And after running such tests in html report we will see something like presenten on the screenshot below:. Personally I thought so until I have read it. BTW, if you buy the electronic version, you won’t see them!
Then we could learn about customizing TestNG using listeners and reporters, organizing test classes into packages and modules, organizing code in test rpactical famous BDD given-when-then trio.
World would practical unit testing with testng and mockito better if every programmer read this book. This book is highly recommendable to all software developers interested in unit testing as it contains a large percentage of general unit testing knowledge that can be used independently of the Java language or the TestNG and Anv tools.
Books by Tomek Kaczanowski
The less practical unit testing with testng and mockito in testing you are, the more you will get from this book. Sep 05, Geraldo Massahud rated it it was amazing Shelves: For them this book is a totally must read as it gently introduces reader to world of proper unit testing using best toolbos available in Java world.
More can be found on its mockitbut below simple use case showing how it looks: Ioana Goga rated it really liked it Testnb 22, Mocks auto injection Mockito allows us to automatically inject all mock into object we are going to test: Refresh and try again.