in my opinion, the strategy that will be used in the tests is a very personal decision of the team. Usually in my projects I use BDD (Behavior driven development) to provide API functionality.
For example (CRUD Features):
- I create new data using the service (banana.create)
- I list all the data (banana.list) and check if new data exists in
- I use a filter (banana.list? Id = xxx) and check if the response structure is normal
- I delete the line (banana.delete) and check it with the list service ...
And for the specific components of the model, I use TDD (Test driven development) using mock concepts ...
But the main thing is difficult in the design of the application ... not in tests: D
[] 's
source share