I am using VSC for my Java project with maven help.
I would like to use a Code Coverage tool but I lost the directions in the many possibilities you have.
My goals are:
Which Code Code coverage tool to use?
Can someone show me the right Maven plugin and the way to configure VSC?
Thanks,
S.
On the Test menu, select Analyze Code Coverage for All Tests. You can also run code coverage from the Test Explorer tool window. Show Code Coverage Coloring in the Code Coverage Results window. By default, code that is covered by tests is highlighted in light blue.
You can use VS Code to read, write, run, and debug Java source file(s) without creating a project. VS Code for Java supports two modes, lightweight and standard.
For now, I don't think there is a way to show coverage inline for java code. This is not really an answer to your question but it may help. You can run tests (maybe create a task in vscode) then watch code coverage report in the browser. For gradle it is:
./gradlew test jacocoTestReport
And then check the report at build/TestCoverageReport/test/html/index.html
You can do that also easily with maven.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With