Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbt/sbt-jacoco
an sbt plugin for JaCoCo Code Coverage
https://github.com/sbt/sbt-jacoco
coverage jacoco sbt sbt-plugin scala
Last synced: 5 days ago
JSON representation
an sbt plugin for JaCoCo Code Coverage
- Host: GitHub
- URL: https://github.com/sbt/sbt-jacoco
- Owner: sbt
- License: epl-1.0
- Created: 2013-10-19T15:32:38.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2024-12-02T03:00:08.000Z (21 days ago)
- Last Synced: 2024-12-13T14:02:07.482Z (10 days ago)
- Topics: coverage, jacoco, sbt, sbt-plugin, scala
- Language: Scala
- Homepage: https://scala-sbt.org/sbt-jacoco/
- Size: 1.77 MB
- Stars: 123
- Watchers: 15
- Forks: 67
- Open Issues: 45
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-sbt-plugins - jacoco4sbt - JaCoCo Code Coverage plug-in for sbt. (TEST & QA)
README
# sbt-jacoco - Code Coverage via JaCoCo in sbt
[![Build Status](https://github.com/sbt/sbt-jacoco/workflows/CI/badge.svg)](https://github.com/sbt/sbt-jacoco/actions?workflow=CI)
[![Release Status](https://github.com/sbt/sbt-jacoco/workflows/Release/badge.svg)](https://github.com/sbt/sbt-jacoco/actions?workflow=Release)
[![SBT 1.0 version](https://maven-badges.herokuapp.com/maven-central/com.github.sbt/sbt-jacoco/badge.svg)](https://repo1.maven.org/maven2/com/github/sbt/sbt-jacoco_2.12_1.0/)This is an [sbt](http://scala-sbt.org/) plugin for code coverage analysis via [JaCoCo](http://www.eclemma.org/jacoco/).
Supports uploading results to [Coveralls](https://coveralls.io), [Codecov](https://codecov.io) and [Codacy](https://www.codacy.com/).Install the plugin by adding the following to `project/plugins.sbt`:
```scala
addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "")
```And then execute the plugin with `sbt jacoco`. This will instrument and run the unit tests and output the coverage
metrics:```
[info] ------- Jacoco Coverage Report --------
[info]
[info] Lines: 66.67% (>= required 0.0%) covered, 2 of 6 missed, OK
[info] Instructions: 83.54% (>= required 0.0%) covered, 13 of 79 missed, OK
[info] Branches: 0% (>= required 0.0%) covered, 0 of 0 missed, OK
[info] Methods: 57.14% (>= required 0.0%) covered, 3 of 7 missed, OK
[info] Complexity: 57.14% (>= required 0.0%) covered, 3 of 7 missed, OK
[info] Class: 50% (>= required 0.0%) covered, 2 of 4 missed, OK
[info]
[info] Check /home/example/jacoco-test/target/scala-2.11/jacoco/report for detailed report
```A detailed HTML report will also be generated in the directory shown that includes line level details of coverage.
See the [docs](http://scala-sbt.org/sbt-jacoco) for details on configuration options.