News for hackers. Stuff that matters.
Re:Serverless: slower and more expensive by crtlaltdel on Monday September 23, 2019 @09:18AM (#21048621)
seriously, its a function. if you remove the aws/lambda specifics you _should_ have something testable that you then call from your lambda handler.
Re:Serverless: slower and more expensive by LargeWu on Monday September 23, 2019 @09:45AM (#21048860)
That works for unit testing a specific component, but not so well for testing your system end-to-end.
Re:Serverless: slower and more expensive by mypalmike on Monday September 23, 2019 @11:21AM (#21049719)
The need for a staging instance for integration testing doesn't disappear when you run your API in lambda.
Re:Serverless: slower and more expensive by 0x445442 on Monday September 23, 2019 @09:46AM (#21048875)
This! To me the only upside to the whole architecture (from a devs perspective) is that you can deploy these things to production independently of other parts of the system. If you can't do that with confidence because you're attempting to test it's functionality in some larger deployed context you've turned your monolith into a distributed monolith and now you have the worst of both worlds.

The good news; you should be able to accomplish most testing locally, in memory. The bad news; your test code is probably going to be much larger and your going to have to be very aware of the data model representing the interface to the lambda and you're going to have to test the different possible states of that data.