I am an absolute beginner in unit testing and am very curious of how should one unit test an API. This is mainly pointed towards ASP.NET WEB API but I'm very curious about node & express as well.
Should I test the controllers via http? Actually make the GET/POST/PUT... requests and check if the http status codes and responses match a schema?
Or should I call the actions from the controllers directly and just check the response, like a regular method?
Aucun commentaire:
Enregistrer un commentaire