SOFTWARE TESTING
Unit Tests, UI Tests, Integration Tests & End-To-End Tests
A QUICK OVERVIEW ON THE DIFFERENCES
As we write more sophisticated software, we want to be confident that our application continues to work as we add new features and/or refactor our codebase.
In this Testing Pyramid, which was introduced by Mike Cohn, re-designed by Marin Fowler and re-engineered by me, summarises the essential types of tests a software should have. Let me put them into two main categories:
1. Programmatic
Programmatic Tests help us to ensure our business logic works.
i.e. validations, calculations, sorting order, etc.
Unit Tests
Unit Tests sits at the base of the Testing Pyramid. This means they take lesser time to code and classes that you are testing should be more isolated. For example, a Login Feature normally has Validation and Authentication
logic. They should be written in two separate classes like LoginValidator
and LoginAuthenticator
. Based on these two classes, you write test scripts.