I am looking at writing test cases (something I haven't done/been taught before). I am creating a web app which has a Java based REST Api backend which uses Spring Boot.
Regarding various types of tests(unit tests, integration tests etc), I am confused about what to apply where.
The code of my application is divided into 3 types of classes following the MVC patters. 1. Model 2. Repositories 3. Controllers
From what I have read so far, this is what I feel.
Model classes and Repositories don't need tests, as they don't have any business code. All they do is help spring to convert data from one format to other and to persist the data.
In controllers, I should write unit tests and integration tests for methods that do non trivial task. Methods that do not have any conditional statements/loops should be skipped.
Integration tests for all(non trivial?) REST endpoints?
Once the web frontend is under progress, I should write end to end tests to verify the UI/UX is working as expected.
Am I on the right path?