Chapters

Chapter 1 Effective and systematic software testing

What does it mean to write tests in a systematic and effective way?

Chapter 2 Specification-based testing

The first step is to engineer tests based on what the program should do

Chapter 3 Structural testing and code coverage

We then augment our test suite by looking at coverage reports and look for new tests

Chapter 4 Designing contracts

Having clear pre- and post-conditions help us "testing the system from the inside"

Chapter 5 Property-based testing

Instead of writing tests that exercise a single example, can we test higher-level properties?

Chapter 6 Test doubles and mocks

Classes depend on each other. How to test classes that depend on other classes?

Chapter 7 Designing for testability

Some systems are easy to be tested, others are not. Let's talk about design principles that make software systems testable.

Chapter 8 Test-driven development

What if we actually write the test before the production code?

Chapter 9 Larger tests

Unit tests are not enough, but integration tests are no piece of cake. Let's talk about them.

Chapter 10 Test code quality

Test is code, and code needs to be maintained. Learn how to write clear and concise test code.

Subscribe to our mailing list

Receive free articles about software testing in your e-mail!

Articles

About the author

Maurício Aniche

Dr. Maurício Aniche leads the Tech Academy of Adyen, and is also an Assistant Professor in Software Engineering at Delft University of Technology in the Netherlands. His teaching efforts in software testing have awarded him the Teacher of Year 2021 award and the TU Delft Education Fellowship. Maurício holds MSc and PhD degrees in Computer Science from the University of São Paulo, Brazil. He also co-founded Alura, one of the most popular e-learning platforms for software engineers in Brazil.

  • PhD in software engineering
  • TU Delft education fellow and Teacher of the Year
  • Years of experience in software testing

Reach me on Twitter or Linkedin

Frequently Asked Questions

The examples in this book are written in Java. I also make use of Java frameworks, such as JUnit and Mockito. However, I used "basic Java". If you come from a similar language, you should be able to understand this book completely. If you are from a language a bit far away from Java, you can still learn the techniques. Writing the test code itself, in any language, is the "easy part", if you ask me!
This book is more meant for developers. I mean, for the person that also wrote the production code. That being said, testers can also benefit from this book, as many of the techniques I discuss here are also useful for them.
Definitely! See the special page for teachers with tips on how to adopt the book!
I had a novice developer in mind when I wrote this book. This means I do not assume a large previous knowledge on testing from the reader, and I explain every single code snippet. Experts will also benefit from this book as every chapter also ends up with pragmatic discussions of how I have been applying these techniques in the real world.
You can buy this book by clicking in the "buy" buttons you see in this page. This button will redirect you to the Manning page (the publisher of my book), but using a special link that makes me get a little bit more from the sell. Thanks for supporting me!