4 ms·
> "Run most services in a mostly-isolated development environment, calling out to a few hard-to-run external services" doesn't count. That's pretty harsh, as i
by jusssi 6y ago
> "Run most services in a mostly-isolated development environment, calling out to a few hard-to-run external services" doesn't count.
That's pretty harsh, as it seems to rule out any system that integrates 3rd party features, such as payments.
- tlb 6y agoPayment processors all (?) have a test API you can run against. Stripe, for instance, gives you a separate account with an API key that behaves the same but no money moves. You can test your whole process including exceptions, reconcilation, and chargebacks. Running a service that handles payment without testing the entire flow is insanity.
- sitkack 6y agoI don't think GP was saying they didn't test, they are calling out to the test apis, still 3rd party. One should go a step further and stub out or have a local payment processor so that everything runs locally and with no delay.
- machello13 6y agoThat breaks the "no mocks" rule.
- jstrong 6y agoexternal services don't always have a test API, and it's not always as cut and dry as processing user payments. sometimes it's less important than that, and testing it would require replicating an external server to be able to test it. in those cases the tradeoff of time spent vs. value isn't as clear.
- sitkack 6y agoStubbing out payments is really nice, you can have end to end integration test flows that execute in milliseconds. Use the affordances that the concept of interfaces provide.
- happimess 6y ago"Mostly-isolated development environment" is more important here than "external services", IMO. I've been at organizations where local development required connecting to a MSSQL instance in a server closet at HQ; This is unacceptable, and devs will constantly be at war with each other. Mocking your analytics provider (or whatever) seems much less problematic to me.
- lmm 6y agoYeah. I think the rule should be that you need to be able to run your system; at the point where you're interacting with an external system (one that you don't fix the bugs in yourself), running your system "locally" should treat it as an external system too.