Setup CruiseControl to run web acceptance tests
Assumption:
- CruiseControl installed and configured properly.
- This tutorial uses iTest2 (an extension for Watir) for web acceptance tests
1. Install PRoR (which contains all the libraries you need to run tests, and it is free)
2. Create a Rakefile in your acceptance test folder (in our example, test/acceptance)
require 'rubygems'
gem 'ci_reporter'
gem 'rspec'
require "rexml/document"
require "spec/rake/spectask"
require 'ci/reporter/rake/rspec' # use this if you're using RSpec
task :default => ["test:acceptance"]
Spec::Rake::SpecTask.new("quick") do |t|
t.spec_files = FileList[
"login_spec.rb",
"payment_spec.rb",
]
t.warning = false
end
task "test:acceptance" => "ci:setup:rspec" do
Rake::Task["quick"].invoke
end
4. Test it out by running tests from command line
C:\wenji>rake test:acceptance (in C:/wenji) rm -rf spec/reports . . . Finished in 98.547 seconds5. Add the acceptance test target in your Ant build.xml
Test it out
ant -f build.xml test.acceptance
6. Add this new acceptance target to main build target triggered by CC
7. You will see acceptance tests running for next CruiseControl build, to view acceptance test report (called Artifact in CC), edit CC project file under publishers

