Prev | Current Page 478 | Next

Brad Ediger

"Advanced Rails"

If tests fail, an email
is typically sent to the entire team, shaming the offending developer and providing an
incentive to fix the code.
322 | Chapter 10: Large Projects
The most popular continuous integration framework is CruiseControl, which started
as a Java project. It has since been ported to .NET and Ruby. ThoughtWorks maintains
the Ruby port, CruiseControl.rb (http://cruisecontrolrb.thoughtworks.com/). It
runs in the background and monitors the repository every 30 seconds for commits
(the interval is configurable). When a new version is detected, it checks it out into a
working directory and runs the tests with Rake. If there are failures or errors, a failure
email is sent out. (Likewise, if the build was broken but is now fixed, a ???fixed???
email is sent.) CruiseControl.rb also provides a neat web interface to view test
progress and results for the latest and previous builds.
Closely related is the ZenTest suite of tools by Ryan Davis.* ZenTest consists of five
tools that help with test coverage, especially under Rails applications. The documentation
tells the full story, but the most compelling part of this suite is autotest. This
allows an even shorter cycle time than continuous integration tools. Although the
method is similar to continuous integration, the AutoTest tools are used more for
development (to shorten the cycles between writing code and testing it) than for continuous
integration (which is more of a safety net to prevent obviously bad code from
being deployed).


Pages:
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489