3
This directory contains configurations for continuous testing, using
4
either autotest (part of the ZenTest gem) or watchr (in the watchr
5
gem). The purpose of these tools is to automatically run the
6
appropriate test when a file is changed or, if appropriate, all
7
tests. In general, they do a straightforward mapping from a given
8
code file to its unit and/or integration test.
10
It is highly recommended that you have one of these running at all
11
times during development, as they provide immediate and continuous
12
feedback as to your development process. There are some general
13
usability downsides as you have to track the running process, but
14
those downsides are easily worth it.
18
To use autotest, install ZenTest and run it with no arguments
19
from the root of the puppet repository:
23
It is currently only configured to run specs.
25
To use watchr, run it with the watchr file specified as its argument:
27
$ watchr autotest/watcher.rb
29
Both will use growl if installed on a Mac, but watchr assumes the
30
presence of growl and will likely fail without it. Autotest is a bit
31
more mature and should be resilient to either.
33
The primary reason to use to use watchr over autotest is that it uses
34
filesystem events to detect changes (theoretically portably although
35
only tested on OS X), thus eliminating the need for polling for
36
changes across all files being monitored.
40
Autotest will start out by running all tests; if you don't want that,
41
stick a syntax error in one of the tests to force a failure, then fix
42
it and go on your merry way.
44
Watchr, on the other hand, will default to only running the files you