Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Code coverage tool for Bash

License

NotificationsYou must be signed in to change notification settings

infertux/bashcov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FundingGem VersionBuild StatusMaintainabilityInline docs

Bashcov is acode 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 theSimpleCov 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 thegem command is unavailable, you need toinstall Ruby first.

For more information, including other installation methods, seeINSTALL.md.

Usage

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

bashcov ./script.shbashcov --skip-uncovered ./script.shbashcov -- ./script.sh --some --flagsbashcov --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 librarySimpleCovby adding a.simplecov file in your project's root, likethis.Seeadvanced usage for more information.

Contributing

Bug reports and patches are most welcome.See thecontribution guidelines.

For development tips, seethe hacking guide.

Sponsorship

Bashcov wascreated 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 considerer supporting it onLiberapay through your employer or directly. Thank you for supportingFree and Open-Source Software.

License

MIT


[8]ページ先頭

©2009-2025 Movatter.jp