Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanrajpac committed May 31, 2024
1 parent d28618f commit b83e075
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ CoverageBadge is a library for creating an SVG coverage badge from a Clover XML

## Installation

Composer

`composer require codebtech/coveragebadge --dev`

## Features
- Generate coverage badge from PHPUnit Clover XML file
- Generate coverage badge based on multiple Clover XML files, and it merges the coverage percentage automatically
- Can accept coverage name and the badge will be generated with the coverage name

- Produces a code coverage badge utilizing a Clover coverage XML file
- Creates a code coverage badge from several Clover XML files, automatically incorporating the coverage percentages
- Accepts a coverage name as an input to include in the generated badge

## Usage

1. Generate [XML Code Coverage](https://docs.phpunit.de/en/11.1/code-coverage.html) and generate [Clover](https://docs.phpunit.de/en/11.1/configuration.html#the-report-element) XML files.
2. Run `vendor/bin/coverage-badge /path/to/clover.xml /path/to/badge/destination.svg test-name`
3. To merge multiple clover files provide the input XML files `comma` separated run `vendor/bin/coverage-badge /path/to/clover.xml,/path/to/clover2.xml /path/to/badge/destination.svg test-name`
- Execute the command to generate badge for single Clover XML input
```
vendor/bin/coverage-badge /path/to/clover.xml /path/to/badge/destination.svg test-name
```
- To blend multiple Clover files, enumerate the XML inputs separated by commas and use the command
```
vendor/bin/coverage-badge /path/to/clover.xml,/path/to/clover2.xml /path/to/badge/destination.svg test-name
```

0 comments on commit b83e075

Please sign in to comment.