Unit testing

Unit testing is the foundation level of testing when testing software. It basically means testing the units of your code to check the correctness of its functioning. During unit testing, the code is tested in a test environment using simulated input. The output of the execution is then compared with the expected output, and if the output matches the expected output, then the test passes. 

With respect to the serverless concept, we do not have to worry about Lambda functions or handlers or events; we just need to organize our code base for easy integration of unit testing. If you look at the following code, you can see that we are separating our core logic into separate modules instead of within the handler so that they can be ...

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.