LoginSignup
0
1

More than 5 years have passed since last update.

cucumberのカバレッジをjenkinsで確認する

Posted at

前提

Jenkinsが動く事、rubyでcucumberが使える事

simplecovとsimplecov-rcovをgemにインストールします。

gem install simplecov simplecov-rcov

cucumberのenvに設定を追加

features/support/env.rb

require 'simplecov'
require 'simplecov-rcov'

SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.start

Jenkins側の設定

  • Jenkins->Jenkinsの管理-プラグインの管理->利用可能->Rubymetrics plugin for jenkins をインストール

  • プロジェクト->設定->ビルド後の処理に出力したrcovのpathを記述
    (例) Rcov report directory /var/lib/jenkins/work/script/test/coverage/rcov

  • cucumberを実行するとcoverage reportが出力されている

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1