This document provides an introduction to testing infrastructure automation code with Chef. It discusses:
- Adding tests to the apache cookbook from the Chef Fundamentals course using Test Kitchen, ChefSpec, Foodcritic and RuboCop.
- Using Test Kitchen to run cookbooks in a sandbox environment mirroring production.
- Using Foodcritic and RuboCop to detect suspicious code.
- Using ChefSpec to produce runnable documentation.
- The benefits of testing infrastructure code with Chef including making things more testable, repeatable and finding bugs earlier in the development process.