After looking at how to test a single piece of functionality, you may ask, what about the whole web application? As mentioned earlier, there are the following levels of testing:
It is important to consider this when you start writing tests. There may be other types of testing, but let's focus on these three for now. When talking about web applications, you will need all of them but different ones in different scenarios.
As you probably know, the design pattern of MVC is used by many web applications and frameworks.
The model is the part where all the business (main) logic is stored. You should definitely have covered with unit tests the main business logic, ...