Scala: Code coverage for projects with tests in separate modules
-
21-12-2019 - |
Question
For a variety of admin reasons, our projects have the following structure:
someproject-core
someproject-api
someproject-test
The idea is all the tests are in a separate module.
Question: What plugin can I use to get accurate test coverage?
Solution
Use Scoverage: https://github.com/scoverage/sbt-scoverage It supports multi-module SBT projects and measures statement coverage instead of line or branch coverages.
BTW there is a nice plugin for Sonar to browse coverage reports: https://github.com/RadoBuransky/sonar-scoverage-plugin
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow