I am happy to announce the release of cucumber-puppet 0.0.3. cucumber-puppet is the glue between cucumber and Puppet, allowing you to write behavioural tests, or features as cucumber calls it, for your Puppet manifest. You can find introductiary material to cucumber here.
cucumber-puppet is currently in alpha-testing.
Installation
cucumber-puppet comes packaged as a gem
1
| |
or can be cloned from github
1
| |
Usage
Initial setup
Before writing your first feature, you have to setup the infrastructure in your Puppet directory.
1 2 | |
This installs some example step definitions for cucumber to ./features/steps/ and ensures the cucumber-puppet glue code is available. You can adapt cucumber-puppet to your needs in ./features/support/hooks.rb.
Writing features
cucumber-puppet assumes you have your Puppet manifest organized in modules and does the same with your feature files.
1
| |
generates ./features/modules/foo/bar.feature from the standard template. Use this file to write your feature and add missing step definitions to files in ./features/steps/.
A feature might look like this:
1 2 3 4 5 6 7 8 9 | |
Running features
To run above feature, execute
1
| |
and see it complain about missing step definitions. Add these to .rb files in ./features/steps/.
If you have any questions or feedback, feel free to leave a comment or email me at cucumber-puppet at erisiandiscord.de.