3 ms·
GCP has https://cloud.google.com/functions/docs/functions-framework https://cloud.google.com/functions/docs/functions-framework but I will not use it. I have fo
by hermanradtke 6y ago
GCP has https://cloud.google.com/functions/docs/functions-framework https://cloud.google.com/functions/docs/functions-framework but I will not use it. I have found the best solution is to abstract away the serverless interface and create a test harness that can test the business logic. This adds some extra complexity in the code, but iterations are fast and do not rely on the overly complex and bug prone "platforms" like SAM and Functions Framework.
- uglygoblin 6y agoThis is precisely what I do when I write code destined to be an AWS Lambda Function. It really feels like the only sane way to do it. It also makes it easy to mock the incoming request/event for integration tests.
- jdsalaro 6y agoCan you elaborate on your approach to "abstract away the serverless interface and create a test harness that can test the business logic"?