4 ms·
I've found the best to test everything from the http handler to database in one test. Unless you want to write 5 different tests for each endpoint. In one proje
by kebsup 3y ago
I've found the best to test everything from the http handler to database in one test. Unless you want to write 5 different tests for each endpoint. In one project we've run the tests against in-memory db and production was postgres. Of course there was a bug caused by different SQL implementations. Other time, we've tested only the the service layer (the fiddling part worth testing), skipping the spring boot controller. Of course there was a bug caused by bad annotations at the controller layer.