Skip to content

About this guide

This guide is a work in progress

This guide is a work in progress. Not all content is complete, and some sections may be missing.

For who is it?

This guide is intended for software engineers of all experience levels. Beginners will find it helpful for learning best practices and becoming familiar with many types of tests. More experienced developers can use it to refresh and organize their knowledge.

The example code is written in JVM languages such as Java, with tests using JUnit or Spock, but most of the concepts are universal and can be applied to any programming language or testing framework. Additionally, the code examples are mostly written in a hexagonal architecture style (see "example" module on GitHub).

Goals

This guide has a few goals:

  • To unify the terminology and understanding of different test types. In the software industry, test names are often used inconsistently — for example, what exactly is a unit test? What distinguishes a unit test from an integration, module, or component test?
  • To demonstrate how to cover more scenarios with fewer tests, making them easier to maintain and understand.
  • To introduce lesser-known but valuable types of tests, such as mutation tests or architectural tests.
  • To show why commonly accepted practices, like writing a unit test for every class, may not always be the best approach for your project.
  • To explain the importance of a healthy test pyramid and provide guidance on how to achieve it.

Feedback and Contribution

Your feedback is invaluable for improving this guide. If you notice any mistakes, unclear explanations, or areas that could be expanded, please create an issue in the GitHub repository for this guide. Contributions of all kinds—such as corrections, suggestions, or additional examples—are warmly welcomed.