Giter Club home page Giter Club logo

ruby-test-reporter's Introduction

codeclimate-test-reporter

Code Climate

Collects test coverage data from your Ruby test suite and sends it to Code Climate's hosted, automated code review service. Based on SimpleCov.

Code Climate - https://codeclimate.com

Installation

This gem only works with Code Climate accounts, so if you don't have one the first step is to create an account at: https://codeclimate.com. Then:

  1. Add this to your Gemfile:

     gem install "codeclimate-test-reporter", group: :test
    
  2. Start the test reporter at the very beginning of your test_helper.rb or spec_helper.rb file:

     require "codeclimate-test-reporter"
     CodeClimate::TestReporter.start
    

Then set the CODECLIMATE_REPO_TOKEN environment variable when you run your build on your CI server, and the results will show up in your Code Climate account.

The CODECLIMATE_REPO_TOKEN value is provided after you add your repo to your Code Climate account if you are in the test coverage private beta.

Please contact [email protected] if you need any assistance setting this up.

Configuration

Certain behaviors of the test reporter can be configured. See the Configuration class for more details. For example, you can change the logging level to not print info messages:

Note that the configuration block must come before TestReporter.start.

CodeClimate::TestReporter.configure do |config|
  config.logger.level = Logger::WARN
end

CodeClimate::TestReporter.start

Help! Your gem is raising a ...

VCR::Errors::UnhandledHTTPRequestError

Add the following to your spec or test helper:

    VCR.configure do |config|
      # your existing configuration
      config.ignore_hosts 'codeclimate.com'
    end

WebMock::NetConnectNotAllowedError

Add the following to your spec or test helper:

    WebMock.disable_net_connect!(:allow => "codeclimate.com")

Other communication failures

If you are using a web stubbing library similar to VCR or WebMock which prevent external requests during test runs, you will need configure these libraries to allow Code Climate to make external requests.

Contributions

Patches, bug fixes, feature requests, and pull requests are welcome on the GitHub page for this project: https://github.com/codeclimate/ruby-test-reporter

This gem is maintained by Bryan Helmkamp ([email protected]).

Copyright

See LICENSE.txt

Portions of the implementation were inspired by the coveralls-ruby gem.

ruby-test-reporter's People

Contributors

bf4 avatar brynary avatar cball avatar chrismdp avatar gabetax avatar geoffharcourt avatar mrb avatar noahd1 avatar pombredanne avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.