No commit activity in last 3 years
No release in over 3 years
Post screenshot to Idobata
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
< 3.0, >= 1.3.0
>= 0
~> 3.0

Runtime

 Project Readme

Capybara Screenshot Idobata

Build Status

Save screenshot using Capybara and post to Idobata.

For all users who met the failing tests only CI.

Usage

You can use save_screenshot_and_post_to_idobata in your feature spec:

save_screenshot_and_post_to_idobata

Installation

Add this line to your application's Gemfile:

gem 'capybara_screenshot_idobata', group: :test

And then execute:

$ bundle

Or install it yourself as:

$ gem install capybara_screenshot_idobata

Using with Cucumber

First, you need to setup Capybara: https://github.com/jnicklas/capybara#using-capybara-with-cucumber

Load the capybara_screenshot_idobata/cucumber module in your features/support/env.rb and configure your hook_url:

require 'capybara_screenshot_idobata/cucumber'

CapybaraScreenshotIdobata.configure do |config|
  config.hook_url = '<PUT YOUR GENERIC HOOK URL HERE>'
end

Using with RSpec

First, you need to setup Capybara: https://github.com/jnicklas/capybara#using-capybara-with-rspec

Load the capybara_screenshot_idobata/rspec module in your spec/spec_helper.rb and configure your hook_url:

require 'capybara_screenshot_idobata/rspec'

CapybaraScreenshotIdobata.configure do |config|
  config.hook_url = '<PUT YOUR GENERIC HOOK URL HERE>'
end

Configuration

You can configure the following options:

  • hook_url (required)
  • message_format (optional) - default: :html
    • :html or :text
  • message_formatter (optional)
    • You can customize message format.

Example:

CapybaraScreenshotIdobata.configure do |config|
  config.hook_url          = '<PUT YOUR GENERIC HOOK URL HERE>'
  config.message_format    = :text
  config.message_formatter = proc {|filepath, line, context|
    "hi: #{filepath}"
  }
end

Test

$ bundle exec rake

Contributing

  1. Fork it ( https://github.com/idobata/capybara_screenshot_idobata/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request