Below you will find pages that utilize the taxonomy term “Cdk”
Blogs
read more
With AWS CDK, you can practice infrastructure-as-code using your programming language of choice. Since this code is setting up cloud infrastructure, many classical unit testing approaches are not feasible. Adding Approval Testing to your project can increase confidence and safety.
Examples here will use Java, but the principles work in any language, and appropriate libraries are available.
Approval Testing
With Approval Tests, you take a snapshot of the output of your code, and verify that this output is consistent with earlier results. If the output has not changed, the test passes. The expected output is not expressed in source code but stored as data in a file. This is also shown in the example on Approvals: