vagrant-rspec-ci
vagrant-rspec-ci is a Vagrant plugin for running integration tests against your VMs, and produces jUnit formatted reports for consumption by your CI server (travis and Jenkins and both can consume this).
It is based on a fork of Michael Paul Thomas Conigliaro's vagrant-test plugin, with some (very) breaking changes to make it rpsec-specific and integrate better with ci_reporter (the jUnit report formatter). I also removed the internal side of testing, as we didn't want to alter the test subject (by installing rspec internally in the VM, for example)
Installation (Vagrant v1.1+)
vagrant plugin install vagrant-rspec-ci
Installation (Vagrant v1.0.x)
vagrant gem install vagrant-rspec-ci -v 0.0.3
Configuration
The following options can be used within the Vagrant::Config.run
block of
your Vagrantfile:
Option | Description | Default value |
---|---|---|
config.rspec.enable_ci_reporter | Boolean - whether to use ci_reporter to format rspec results as jUnit reports. | true |
config.rspec.suppress_ci_stdout | ci_reporter improperly registers as a formatter, writes to files, but leaves the doc formatter in place. This makes for very noisy output. Set to true (default) to send all STDOUT formatter output from rspec to /dev/null ; set to false when diagnosing a problem, or if you like noise. | true |
config.rspec.dirs | Array of directories (relative to vagrant project root) to be used as a search path for external tests. | ['combined/spec_ext", "spec"] |
config.rspec.tests | List of tests (filenames or globs, expanded in the dirs paths) to be run outside the VM | [ '*ext_spec.rb' ] |
config.rspec.rspec_bin_path | Path to rspec command, on VM host | "rspec" |
config.rspec.reports_dir | If ci_reporter is enabled, path to write the jUnit XML reports. Relative to vagrant project dir. | "rspec_reports" |