jeudi 28 septembre 2017

Testing rationale between API and Service layer

I've been dwelling on my testing approach for API development and was hoping to get some clarity concerning what to test and what not to test within an API > Service layer relationship.

The service layer specs cover general functionality, asserting that if you x it will do y

The ambiguity for me lies in what to test for at the API level. If I'm abdicating responsibility for the functionality to the service layer, do I need to assert that functionality again in the API specs?

I can't decide if it is redundant or not.

Can you feel confident as long as the service layer specs pass that the API is functioning correctly or should I assert the functionality again in the API specs?

Should I assert that the API is calling the service correctly to compensate?

I appreciate this is a bit vague but was hoping to get some idea of how others approach this situation.

Aucun commentaire:

Enregistrer un commentaire