bashcov

Code coverage tool for Bash
授权协议 MIT License
开发语言 SHELL
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 袁青青
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Bashcov

Bashcov is a code coverage analysis tool for Bash.

In most cases, you'll want overall coverage results for your project fromshUnit2,Bats,bash_unit,assert.sh,bashaspec,etc.Bashcov automatically takes care of this by caching and merging results when generating reports,so your report includes coverage across your test suites and thereby gives you a better picture of blank spots.

It uses the SimpleCov coverage library to generate HTML reports.SimpleCov gets installed automatically when you install Bashcov.

Here are example coverages generated by Bashcov:test app demo &RVM demo.

Installation

gem install bashcov

If the gem command is unavailable, you need to install Ruby first.

Usage

bashcov --help prints all available options. Here are some examples:

bashcov ./script.sh
bashcov --skip-uncovered ./script.sh
bashcov -- ./script.sh --some --flags
bashcov --skip-uncovered -- ./script.sh --some --flags

./script.sh can be a mere Bash script or typically your CI script. Bashcov will keep track of all executed scripts.

It will create a directory named ./coverage/, you may open ./coverage/index.html to browse the coverage report.

SimpleCov integration

You can leverage the underlying library SimpleCovby adding a .simplecov file in your project's root, like this.See advanced usage for more information.

Contributing

Bug reports and patches are most welcome.See the contribution guidelines.

License

MIT

相关阅读

相关文章

相关问答

相关文档