Introduction: FIRST Tests and the Test Pyramid

Get an introduction to what you’ll learn in this chapter.

We'll cover the following

So far in this course, we’ve seen the value of writing unit tests that run quickly and give repeatable results. FIRST tests provide rapid feedback on our design. They’re the gold standard of unit tests. We’ve also seen how hexagonal architecture helps us design our code in a way that gets the maximum amount covered by FIRST unit tests. But we’ve also limited ourselves to testing only our domain model—the core of our application logic. We simply have no tests covering how our domain model behaves once it connects to the outside world.

Test pyramid

In this chapter, we’ll cover all the other kinds of tests that we need. We’ll introduce the test pyramid, which is a way of thinking about the different kinds of tests needed, and how many of each we should have.

We’ll discuss what each kind of test covers and useful techniques and tools to help. We’ll also bring the whole system together by introducing CI/CD pipelines and test environments, outlining the critical role they play in combining code components to create a system for our end users.

Chapter goals

In this chapter, we’ll cover the test pyramid, a structured testing approach, and the importance of integration tests. We’ll also learn about end-to-end and user acceptance tests, their advantages, limitations, and tools. Lastly, we’ll discuss the CI/CD pipelines to optimize software development workflows and explore practical aspects of CI/CD pipelines and test environments for modern software development.

Get hands-on with 1200+ tech skills courses.