Skip to content

probedock/probedock-rspec

Repository files navigation

RSpec Probe for Probe Dock

RSpec formatter to publish test results to Probe Dock.

Gem Version Dependency Status Build Status Coverage Status License

Requirements

  • Ruby 2+
  • RSpec 3+

Installation

Add it to your Gemfile:

gem 'probedock-rspec', '~> 0.7.1'

Then run bundle install.

If you haven't done so already, set up your Probe Dock configuration file(s). This procedure is described here:

You must then enable the client in your spec helper file (e.g. spec/spec_helper.rb).

require 'probedock-rspec'

ProbeDockRSpec.configure do |config|

  # Optional category to add to all the tests sent with this client.
  config.project.category = 'RSpec'
end

The next time you run your test suite, the RSpec probe will send the results to your Probe Dock server.

Usage

To track a test with a Probe Dock test key, use RSpec metadata:

it "should work", probedock: { key: 'abcd' } do
  expect(true).to be(true)
end

it(nil, probedock: { key: 'bcde' }){ should validate_presence_of(:name) }

You may also define a category, tags and tickets for a test like this:

it "should work", probedock: { key: 'cdef', category: 'Integration', tags: %w(user-registration validation), tickets: %w(JIRA-1000 JIRA-1012) } do
  expect(2).to be < 3
end

Contributing

  • Fork
  • Create a topic branch - git checkout -b my_feature
  • Push to your branch - git push origin my_feature
  • Create a pull request from your branch

Please add a changelog entry with your name for new features and bug fixes.

License

probedock-rspec is licensed under the MIT License.