No commit activity in last 3 years
No release in over 3 years
Uploads test coverage data to Bitbucket Server via Code Coverage plugin
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.0
~> 0.0
~> 3.0
~> 0.0
~> 3.0
 Project Readme

SimpleCov to Bitbucket Server

Gem Version Travis CI Coveralls

A SimpleCov formatter that uploads coverage data to a Bitbucket Server instance via Code Coverage plugin.

Installation

# Gemfile

group :test do
  gem 'simplecov-bitbucket-server', '~> 1.0'
end


# spec/spec_helper.rb

require 'simplecov/formatter/bitbucket_server'

SimpleCov.formatter = SimpleCov::Formatter::BitbucketServer.new('https://your.bitbucket.host')

Usage

Run your test suite as usual. At the end SimpleCov will run the formatter. The formatter will post data to the server.

Commit SHA

Coverage data is uploaded for a certain commit. This commit is the tip of the branch from which the pull request is created. The formatter takes the commit SHA from an environment variable called GIT_COMMIT (set by Jenkins).

If you need to pass the commit SHA from some other source, pass it as the second argument to the formatter's constructor. For example:

commit = ENV['TRAVIS_COMMIT']

SimpleCov.formatter = SimpleCov::Formatter::BitbucketServer.new('https://your.bitbucket.host', commit)

Sponsored by FunBox