3 ms·
I'd like to follow this advice, but it falls apart when you have a service that interacts with or worse relies on state in external services. Best case, you can
by von_lohengramm 5y ago
I'd like to follow this advice, but it falls apart when you have a service that interacts with or worse relies on state in external services. Best case, you can create new test data on each run in those services as part of your tests if they expose an API. However, far more often you need to prearrange test data in those external services to cover the various possible states.
- paulryanrogers 5y agoWhy not stub or double the external service? For truly end to end that may be too fake but could help with less rigorous integration tests. Or could be an option for frequent ongoing testing, then be turned off to use real 3P services for final pre-deployment tests.
- petepete 5y agoI wouldn't want my main test suite to be dependent on anything external. Ensuring a third party API is still doing what you think it's doing is a legitimate concern, but that test should be standalone and scheduled.