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)
vagrant plugin install vagrant-rspec-ci
vagrant gem install vagrant-rspec-ci -v 0.0.3
The following options can be used within the Vagrant::Config.run
block of
your Vagrantfile:
vagrant rspec [vm-name]
Copyright (C) 2013 Clinton Wolfe
Copyright (C) 2012 Michael Paul Thomas Conigliaro
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Clinton Wolfe: Derivative author of vagrant-rspec-ci
-
Michael Paul Thomas Conigliaro: Original author of vagrant-test
-
See CHANGES file for contributors via pull requests
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" |