Integration testing 

Integration testing is basically when tests cover more than one unit. Our Lambda function must be integrated with third-party code dependencies, which have to be tested thoroughly. That's where integration testing comes into play. Integration testing plays a very important role in the serverless world, but it is also expensive if you are always doing it over the cloud. But we can reduce the cost by mocking, as we talked about when looking at the LocalStack framework. Using this method, we can put it to use mocking a large number of AWS resources. 

Similarly, we can invoke the Lambda function locally using the serverless invoke local, and if our functions need to read/ write from DynamoDB, then this can also be mocked ...

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.