Testing Pyramid
The testing pyramid essentially describes the ideal ratio of types of automated tests. As the following diagram shows, we want more of the lower level fast running tests, and less of the slower running UI tests.

Rationale
Many project suffer from long running builds because their pyramid has been inverted. These builds with large numbers of UI tests and fewer Unit tests can lead teams into bad behaviours. e.g…
- Not running tests before checking in “because they take to long”
- Not writing tests “because it just makes thing worse”
- Building complex distributed testing clusters to run tests quicker
Instead keeping to the testing pyramid ratio’s will ensure builds run in a sensible time, allowing all tests to be run before checking in, encouraging more tests to be added, keeping build pipelines simple and easy to maintain.