~ubuntu-branches/ubuntu/trusty/puppet/trusty

« back to all changes in this revision

Viewing changes to autotest/README.markdown

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-22 14:08:22 UTC
  • mfrom: (1.1.25) (3.1.32 sid)
  • Revision ID: package-import@ubuntu.com-20111022140822-odxde5lohc45yhuz
Tags: 2.7.6-1
* New upstream release (CVE-2011-3872)
* Remove cherry-picked "groupadd_aix_warning" patch
* Install all new manpages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Continuous Testing
2
 
 
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.
9
 
 
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.
15
 
 
16
 
# How to use
17
 
 
18
 
To use autotest, install ZenTest and run it with no arguments
19
 
from the root of the puppet repository:
20
 
 
21
 
    $ autotest
22
 
 
23
 
It is currently only configured to run specs.
24
 
 
25
 
To use watchr, run it with the watchr file specified as its argument:
26
 
 
27
 
    $ watchr autotest/watcher.rb
28
 
 
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.
32
 
 
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.
37
 
 
38
 
# Gotchas
39
 
 
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.
43
 
 
44
 
Watchr, on the other hand, will default to only running the files you
45
 
change.