sinkcup / coverage-badge

create badge from test coverage reports
https://www.npmjs.com/package/test-coverage-badge
MIT License
0 stars 0 forks source link
badge cli coverage test

test coverage badge

CI codecov

create coverage badge by parsing test coverage reports.

Usage

help

npx test-coverage-badge --help

image

format

npx test-coverage-badge --format clover \
  ./coverage/clover.xml
npx test-coverage-badge --format jacoco-xml \
  ./build/reports/jacoco/test/jacocoTestReport.xml

output format

png(default): image

svg:

npx test-coverage-badge --format clover \
  --output-format svg \
  ./coverage/clover.xml

text:

npx test-coverage-badge --format jacoco-xml \
  --output-format text \
  ./build/reports/jacoco/test/jacocoTestReport.xml
80%

output file

default: ./coverage.png or ./coverage.svg

custom:

npx test-coverage-badge --format clover \
  --output ./coverage/coverage.png \
  ./coverage/clover.xml