百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

bashcov

> 测试质量
开源

用于 Bash 的代码覆盖率工具

172 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

用于 Bash 的代码覆盖率工具

Bashcov

Bashcov is a code coverage analysis tool for Bash.

In most cases, you'll want overall coverage results for your project from shUnit2, 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.

Installation

gem install bashcov

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

For more information, including other installation methods, see INSTALL.md.

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 SimpleCov by 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.

For development tips, see the hacking guide.

Sponsorship

Bashcov was created in 2012 and it needs your help. I have been maintaining the project for over a decade and keeping it working with new releases of Bash and Ruby takes time. If you use Bashcov professionally, please consider supporting it on Buy Me a Coffee or Liberapay through your employer or directly. Thank you for supporting Free and Open-Source Software.

License

MIT

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubybashcode-coveragecoveragecoverage-report

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类测试质量
定价开源

> 相关工具

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.