Ruby-based Test Kitchen runs your infrastructure code on isolated platforms, converges instances, and supports Chef-related provisioners.
Overview
Test Kitchen is an integration tool for developing and testing infrastructure code and application configuration on isolated target platforms. Teams define suites and platforms in a kitchen configuration file; each combination forms an instance that can be created, converged, verified, and destroyed from the command line.
Installing the Test Kitchen gem and running kitchen init creates a default kitchen.yml in the project root. The default setup uses a Vagrant-backed platform with the shell provisioner. Chef, Cinc, and other configuration management tools can be supplied from the Ruby environment running Kitchen, including Chef Workstation or Cinc Workstation.
Workflow commands list instances, converge a named instance such as default-ubuntu-2004, and destroy environments when finished. Help and verbose logging are available through kitchen subcommands and log-level settings on both Kitchen and the chosen provisioner.
An ecosystem of plugins extends drivers and provisioners beyond the defaults. Documentation is published on the Test Kitchen website, and the project follows semantic versioning.
Key features
- Suite and platform instances
- kitchen init configuration scaffolding
- Converge and destroy workflows
- Vagrant driver by default
- Shell and Chef-family provisioners
- Plugin ecosystem for drivers
- Command-line kitchen subcommands
- Adjustable logging verbosity
Use cases
- Testing Chef cookbooks locally
- Validating infrastructure recipes
- Multi-platform convergence checks
- Isolated VM test instances
- Serial runs across instance matrix