alibaba / alibaba/testable-mock

Gradle jacoco 覆盖率为0

Open
#245 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.8k
Forks
306
PR merge metrics
No merged PRs in 30d

Description

gradle 6.8.3, testable-mock 0.7.0
test case能跑成功,但在跑gradle jacoco plugin的jacocoTestReport task,有如下显示:
[ant:jacocoReport] Class in bundle '项目名' do not match with execution data. For report generation the same class files must be used as at runtime.
结果是coverage report里的覆盖率都为0
请问如何解决?是否有gradle+jacoco+testable-mock的例子可供参考?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the report with Gradle 6.8.3, testable-mock 0.7.0, and the jacocoTestReport task described in the issue. Inspect the generated execution data and report inputs around the class-mismatch warning; done means the warning is resolved and the coverage report reflects the successful tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.