Types of Testing
Go through the various testing techniques used in the software industry.
Overview
This chapter covers a range of testing techniques beyond the standard unit and integration tests.
Testing Processes
Let's discuss some important testing processes.
Outside-in testing
Let's start with a set of failing acceptance tests. These are used to drive the design from the outside. Smaller pieces are built, tested, and integrated. The idea is that the acceptance test indicates from the start when the solution will be finished. This is known as outside-in testing.
Visual regression tests
It's difficult for a unit test to check what a page actually looks like. We can check that all the elements are present, but not the look of the page.
This is where visual regression tests like BackstopJS come in. These tests take screenshots of the user interface at various breakpoints. They can be filtered to a subset of the whole page or used to hide dynamic areas.
This is the result of running the backstop test against react-starter-kit
:
Here is an example of a failed test report:
The slider can be dragged across the image comparisons, and the purple items are the differences. Here, the rotation was slightly different between the reference ...