This is a hands-on tutorial that will cover the basics that everyone needs to know about how to test your automation code. We’ll start with a set of requirements and then use a test-driven development process to build out the necessary cookbooks. We’ll cover linting, unit testing, integration testing, and cross-platform testing.
Hands-on exercises throughout the tutorial will reinforce the material discussed. The agenda will cover:
Introduction to Test-driven Development (TDD)
Building a test environment with Test Kitchen
Turning your requirements into executable specifications
ChefSpec
Serverspec
Working through the ‘red-green-refactor’ cycle