All test passed, but coverage does not include any source codes - hyelie/MDEditor GitHub Wiki

Problem

All tests run with ./gradlew test passes.

image

However, any coverage in the test coverage run with ./gradlew jacocoTestReport is displayed as 0%.

image

I'm not sure exactly why this problem occurs. Despite including all source code in build.gradle.kts, test coverage is always displayed as 0%.

Solution

This method uses the test coverage report supported within IntelliJ, and is not a perfect solution but a substitute.

How to use it is as follows.

  1. Right-click the test package and run the test with the Run with Coverage command.
  2. Afterwards, click Generate Coverage Report that appears on the right side of IntelliJ to download the test report.

image

image

The resulting test coverage report is as follows.

image

image

⚠️ **GitHub.com Fallback** ⚠️