Switch branches/tags
upstream/0.25.5 upstream/0.25.4 upstream/0.25.0 upstream/0.24.8 tags/2.6.0rc3 tags/2.6.0rc2 tags/2.6.0rc1 release-0.9.2 puppet-0.24.5-rc3 geordi-published-pe debian/2.6.2-4 debian/2.6.2-3 debian/2.6.2-2 debian/2.6.0-4 debian/2.6.0-3 debian/2.6.0-2 debian/2.6.0-1 debian/0.25.5-1 debian/0.25.4-6 debian/0.25.4-4 debian/0.25.4-2 debian/0.25.3-1 debian/0.25.1 Iteration-2011-04-27-master Iteration-2011-04-27-2.7.x Iteration-2011-04-27-2.6.x Iteration-2011-04-21-master Iteration-2011-04-21-2.7.x Iteration-2011-04-21-2.6.x Iteration-2011-04-13-master Iteration-2011-04-06-master Iteration-2011-04-06-2.6.x Iteration-2011-03-30-master Iteration-2011-03-30-2.6.x Iteration-2011-03-23-master Iteration-2011-03-23-2.6.x Iteration-2011-03-16-master Iteration-2011-03-16-2.6.x Iteration-2011-02-02-master Iteration-2011-02-02-2.6.x Iteration-2011-01-19-master Iteration-2011-01-19-2.6.x Iteration-2011-01-05-master Iteration-2011-01-05-2.6.x Iteration-2010-12-15-master Iteration-2010-12-15-2.6.x Iteration-2010-11-24 Iteration-2010-11-17 Iteration-2010-11-10 Iteration-2010-11-03 BetaOne Beta1 3.0.1 3.0.1-rc1 3.0.0 3.0.0rc3 3.0.0rc2 3.0.0rc1 3.0.0-rc8 3.0.0-rc7 3.0.0-rc6 3.0.0-rc5 3.0.0-rc4 2.7.19 2.7.19rc3 2.7.19rc2 2.7.19rc1 2.7.18 2.7.17 2.7.16 2.7.16rc1 2.7.15rc4 2.7.15rc3 2.7.15rc2 2.7.15rc1 2.7.14 2.7.14rc3 2.7.14rc2 2.7.14rc1 2.7.13 2.7.12 2.7.12rc2 2.7.12rc1 2.7.11-1 2.7.10 2.7.10rc1 2.7.9 2.7.8 2.7.8rc2 2.7.8rc1 2.7.7 2.7.7rc1 2.7.6 2.7.6rc3 2.7.6rc2 2.7.6rc1 2.7.5 2.7.4 2.7.4rc3 2.7.4rc2
Nothing to show
Find file History
Pull request Compare This branch is 17605 commits behind puppetlabs:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Continuous Testing

This directory contains configurations for continuous testing, using either autotest (part of the ZenTest gem) or watchr (in the watchr gem). The purpose of these tools is to automatically run the appropriate test when a file is changed or, if appropriate, all tests. In general, they do a straightforward mapping from a given code file to its unit and/or integration test.

It is highly recommended that you have one of these running at all times during development, as they provide immediate and continuous feedback as to your development process. There are some general usability downsides as you have to track the running process, but those downsides are easily worth it.

How to use

To use autotest, install ZenTest and run it with no arguments from the root of the puppet repository:

$ autotest

It is currently only configured to run specs.

To use watchr, run it with the watchr file specified as its argument:

$ watchr autotest/watcher.rb

Both will use growl if installed on a Mac, but watchr assumes the presence of growl and will likely fail without it. Autotest is a bit more mature and should be resilient to either.

The primary reason to use to use watchr over autotest is that it uses filesystem events to detect changes (theoretically portably although only tested on OS X), thus eliminating the need for polling for changes across all files being monitored.


Autotest will start out by running all tests; if you don't want that, stick a syntax error in one of the tests to force a failure, then fix it and go on your merry way.

Watchr, on the other hand, will default to only running the files you change.