• Complain

Kaczanowski T. - Practical Unit Testing with JUnit and Mockito

Here you can read online Kaczanowski T. - Practical Unit Testing with JUnit and Mockito full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Kaczanowski T. Practical Unit Testing with JUnit and Mockito
  • Book:
    Practical Unit Testing with JUnit and Mockito
  • Author:
  • Genre:
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Practical Unit Testing with JUnit and Mockito: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Practical Unit Testing with JUnit and Mockito" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Published by kaczanowscy.pl Tomasz Kaczanowski - 2013, 310 pp.This book explains in detail how to implement unit tests using two very popular open source Java technologies: TestNG and Mockito. It presents a range of techniques necessary to write high quality unit tests - e.g. mocks, parametrized tests and matchers. It also discusses trade-offs related to the choices we have to make when dealing with some real-life code issues.The book stresses the importance of writing readable and maintainable unit tests, and puts a lot of stress on code quality. It shows how to achieve testable code and to eliminate common mistakes by following the Test Driven Development approach. Every topic discussed in the book is illustrated with code examples, and each chapter is accompanied by some exercises.By reading this book you will: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 coverage 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!) :)Nowadays every developer is expected to write unit tests. While simple in theory, in practice writing high-quality unit tests can turn out to be a real challenge.

Kaczanowski T.: author's other books


Who wrote Practical Unit Testing with JUnit and Mockito? Find out the surname, the name of the author of the book and a list of all author's works by series.

Practical Unit Testing with JUnit and Mockito — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Practical Unit Testing with JUnit and Mockito" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Practical Unit Testing with JUnit and Mockito
Tomek Kaczanowski

Copyright @ 2013 kaczanowscy.pl Tomasz Kaczanowski

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor the publisher, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

The author has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, the author cannot guarantee the accuracy of this information.

Visit us on the web: http://practicalunittesting.com

Published by kaczanowscy.pl Tomasz Kaczanowski

Cover design by Agata Wajer-Gadecka, http://poleznaku.pl

ISBN: 978-83-934893-8-1

First printing, April 2013

Version epub_20130510_2210


Dedication

To my wife, Agnieszka, for all her support, and for having faith that I would eventually finish the book.

About the Author

Tomek Kaczanowski is a technical team leader from Krakow, Poland. He has a strong interest in code quality, testing and automation - preferably all three together. Combining technical with soft skills, he also ventures into the realms of mentoring, teaching, lecturing and article writing, not to mention preaching sermons to the unconverted in the hope of redeeming them (or at least their code)! He hates doing things manually, and is allergic to empty src/test/java directories.

Tomek believes that by working with legacy code, and improving it, he can make the world a better place. To his disappointment, the world does not seem to care all that much about his efforts.

Apart from all this weirdness, he is a pretty normal person a husband, father of two, and cat owner.

Acknowledgments

In various different ways a number of people have helped me with writing this book some by giving feedback, others by comforting me in times of doubt.

Marcin Stachniuk was the first person to offer to review the book in the early stages of its being written, and at the same time the most persistent of my reviewers. He read every part of the book and gallantly overcame the obstacles I frequently put in his way: frequent releases, constant juggling of the contents, minor piecemeal adjustments, etc.Piotr Przybylak helped a lot by introducing me to the concept of "personas".Michal Margiel read the whole book and sent me a long list of defects he had identified. Some of his remarks regarding code style were very pertinent, and after I had introduced them the book seemed far better than before!Pawel Lipinski, Marcin Zajaczkowski, Pawel Wesolowski, Rafal Janik, Daniel Longosz and Krzysztof Jelski also contributed by verifying several sections of the book.Szczepan Faber, Mockitos author, has given me a good bashing, unearthing several weaknesses in the book as it went along, but at the same time has appreciated my work and encouraged me to go on with it.Jakub Naruszewicz and Shamil Daghestani helped preparing Kindle version of the book.I have also received a great deal of encouragement from Java community members on social networks. Thanks to all of you!

This book would never have happened if it had not been for the (unwitting) help of thousands of bloggers and mailing group debaters. I have learned a lot from, and have been inspired by, numerous Java, PHP, Ruby and .Net articles, blog posts and discussions. It is amazing to find out that despite the differences in tools and approaches, so many of us share the same ideals of clean, perfect code, and that we also rack our brains about similar issues.

I have also learned a considerable amount from the participants in training sessions that I myself have conducted. By sharing their doubts and comments with me, they have helped me to rethink my stances and look for even better solutions, approaches or tools.My colleagues at work have given me much food for thought, just by doing things differently from how I would, while insisting that their way is better! :) This has also helped me go forwards, even if Ive sometimes had to take a few steps backwards first!

Carl Humphries has done a splendid job by translating this book from my version of English into a standard one. You would not enjoy reading this book at all, were it not for his hard work!

My gratitude also goes out to the authors, contributors and community members of all of the numerous fantastic free tools, libraries and applications I have made use of while writing it. My deepest respect goes to everyone who contributed even a single line of code to the following projects: AsciiDoc, Docbook, vim, Apache FOP, xlstproc, Subversion, IntelliJ IDEA, FoxitReader, Calibre, EPUB Reader, Inkscape, Gimp, ImageMagick, LibreOffice, PCLinux OS, various bash tools (grep, diff, tree, etc.), xmind.net, toodledo.com, clker.com, wikipedia.org, stackoverflow.com, xp-dev.com and github.com. I would also like to thank all the people on the AsciiDoc and Docbook mailing lists for bearing with me, even when my questions seemed foolish.

Practical Unit Testing with JUnit and Mockito - image 1

Even though many people have contributed to this book and have carried out reviews, all bugs still belong to me!

My family has also made an immense contribution. Agnieszka, my wife, has supported my work from the very beginning, repeatedly reminding me about the need to focus on getting things finished, and giving up some of her so-called "free-time" so that I could have more time to spend on it. Without her help, I would simply have never finished the book!My daughters - Zosia and Helenka - gave me reasons to smile every day; something I needed very much, being tired and depressed with the amount of work still lying before me.Our cat - Boni - has played a double game. Some evenings she helped me to calm down by sitting on my lap, purring softly, while sometimes she deprived me of sleep by making an awful racket at night! :)

Preface

Times are bad. Children no longer obey their parents, and everyone is writing a book.

-- Cicero
Why Another Testing Book?

There are already a few really good books devoted to developers tests in bookstores, so why write another one? Here are several reasons for doing so:

The world keeps on moving forward. Progress never stops. There are still ideas emerging in the testing area. New frameworks. New approaches. New tools. Old techniques are being forgotten, rediscovered and mixed with newly invented ones. New concepts force us to rethink existing paradigms and come up with solutions that are better suited to the constantly changing IT environment.

Lack of knowledge. In spite of all the books, seminars, JUG meetings, conferences, podcasts, articles, blog entries and forum discussions I deal with, I still meet many developers who have only a very vague idea of what developers testing is and how to do it. There is definitely still room for improvement in this area.

People are different.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Practical Unit Testing with JUnit and Mockito»

Look at similar books to Practical Unit Testing with JUnit and Mockito. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Practical Unit Testing with JUnit and Mockito»

Discussion, reviews of the book Practical Unit Testing with JUnit and Mockito and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.