O'Reilly logo

DevOps for Serverless Applications by Shashikant Bangera

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required