Pragmatic Unit Testing

Download Pragmatic Unit Testing PDF/ePub or read online books in Mobi eBooks. Click Download or Read Online button to get Pragmatic Unit Testing book now. This website allows unlimited access to, at the time of writing, more than 1.5 million titles, including hundreds of thousands of titles in various foreign languages.
Pragmatic Unit Testing in Java with JUnit

Author: Jeff Langr
language: en
Publisher: The Pragmatic Programmers LLC
Release Date: 2024-11-08
The classic Pragmatic Unit Testing with Java in JUnit returns for a third edition, streamlined and rewritten with updated and more accessible code examples. In this edition, you'll learn how to create concise, maintainable unit tests with confidence. New chapters provide a foundation of examples for testing common concepts, and guidance on incorporating modern AI tools into your development and testing. Updated topics include improving test quality via development mnemonics, increasing ROI through test and production code refactoring, and using tests to drive development. Pragmatic Unit Testing in Java with JUnit steps you through all the important unit testing topics. If you've never written a unit test, you'll be hand-held through the hard part - getting set up and started. Once past the basics, you'll see numerous examples in order to start understanding what tests for common code concepts look like. You'll then learn how to effectively use the essential features of JUnit, the predominant tool for writing and executing unit tests in Java. You'll gain the combined wisdom of Jeff Langr and original authors Andy Hunt and Dave Thomas, providing decades of unit testing experience on real production systems. You'll learn how to: Craft your code to make unit testing easier in the first place Craft your unit tests to minimize your maintenance effort Use unit tests to support keeping your system clean through refactoring Refactor toward a design that will create the highest possible ROI Test the tough stuff, including code that must be mocked Remember what's important when writing unit tests Help your team reap and sustain the benefits of unit testing Use AI tooling as part of a development process that incorporates unit testing You won't just learn about unit testing in theory - you'll learn about "real" unit testing the Pragmatic way, by working through numerous code examples. What You Need: You'll need the Java SDK (Software Development Kit) version 21 or higher to work through the examples in the book. You'll also want an IDE (Integrated Development Environment) in which to build code. While most of the book doesn't assume use of any specific IDE, you'll find a number of "getting started" screen shots to help you if you're using IntelliJ IDEA.
Pragmatic Unit Testing in C# with NUnit

Learn how to improve your C# coding skills using unit testing. Despite it's name, unit testing is really a coding technique, not a testing technique. Unit testing is done by programmers, for programmers. It's primarily for our benefit: we get improved confidence in our code, better ability to make deadlines, less time spent in the debugger, and less time beating on the code to make it work correctly.This book shows how to write tests, but more importantly, it goes where other books fear to tread and gives you concrete advice and examples of what to test--the common things that go wrong in all of our programs. Discover the tricky hiding places where bugs breed, and how to catch them using the freely available NUnit framework. It's easy to learn how to think of all the things in your code that are likely to break. We'll show you how with helpful mnemonics, summarized in a handy tip sheet (also available from our www.pragmaticprogrammer.com website).With this book you will: Write better code, and take less time to write it Discover the tricky places where bugs breed Learn how to think of all the things that could go wrong Test individual pieces of code without having to include the whole project Test effectively with the whole team We'll also cover how to use Mock Objects for testing, how to write high quality test code, and how to use unit testing to improve your design skills. We'll show you frequent "gotchas"--along with the fixes--to save you time when problems come up.But the best part is that you don't need a sweeping mandate to change your whole team or your whole company. You don't need to adopt Extreme Programming, or Test-Driven Development, or change your development process in order to reap the proven benefits of unit testing. You can start unit testing, the pragmatic way, right away.