I generally use a tool like Testcafe (I used to use Selenium) to test end-to-end service-to-service communication. But only for the happy path. For error scenarios - i.e. - a dependent service returns a 500, I stub those using Sinon within the individual service.
If the services can communicate with one another in a happy path scenario, and I have tests that prove they can handle each other's failures, that's all that matters IMO.
That's a very thoughtful analysis!
I generally use a tool like Testcafe (I used to use Selenium) to test end-to-end service-to-service communication. But only for the happy path. For error scenarios - i.e. - a dependent service returns a
500
, I stub those using Sinon within the individual service.If the services can communicate with one another in a happy path scenario, and I have tests that prove they can handle each other's failures, that's all that matters IMO.
Yes, writing happy path tests makes a lot of sense to me! I am currently also only testing those!