I am trying to get full coverage on a very simple junit test using Mockito and am striking out. My disclaimer is that I am new to Mockito though what I am trying to do would seem pretty straightforward. Note that my junit test passes, it is just that the coverage is not complete. When the test is run, the
Tag: code-coverage
Setting up properly SonarQube for Code Coverage
I’m using JUnit5 on a SpringBoot backend application server using Maven. Here is the sonar-project.properties file that is at the root of the project: I use the sonar-scanner command line to run update the project after a build/test. The Overview board on sonar-cloud looks like this: I at least got the unit tests to be recognized, but somehow I’m still
Gradle jacoco coverage report with more than one submodule(s)?
Does anybody know how to configure a gradle file for java jacoco report that contain codecoverage of more than one gradle submodule? my current approach only shows codecoverage of the current submodule but not codecoverage of a sibling-submodul. I have this project structure when i execute gradlew :extlib:check :extlib:jacocoTestReport the junit-test “Integrationtest.java” is executed and a codecoverage report is generated
Test Coverage: How to cover assertions?
EDIT: So It looks like JeffStorey link to the bug is correct. With assertions enabled the compiler will generate extra code. There ends up being 1 extra unreachable branch created. One of my methods constructor has these asserts I’m trying to cover it by doing this And again with values Board (-4 , 2) and Board (2, 2) So I’ve