Hi, On Thursday, January 31, 2019 at 2:03:12 AM UTC+1, [email protected] wrote: > > Hello Jacococers, > > I'm trying to measure a code coverage on some project. It has its own > build infrastructure and doesn't use maven/ant. When I run unit tests I > pass all required arguments: > "-javaagent:~/jacoco/lib/jacocoagent.jar=destfile=/tmp/jacoco_test/coverage.exec". > > Everything looks fine and runs without any errors. But when I convert > coverage.exec to html report it shows 0% coverage. What's is the most > curious thing, when I run "java -jar > ~/tmp/java_coverage/jacoco/lib/jacococli.jar execinfo > /tmp/jacoco_test/coverage.exec", I see there only test-related classes, > while I expected to see test-covered (classes implementing business logic > itself or classes under tests) classes as well. I understand that my guess > might be wrong. So could you please clarify that I should see test-covered > classes in the execinfo output as well? >
Yes - to have non-zeros in report for classes, exec file should contain these classes. BTW you can see the same information about content of exec file in HTML report on Sessions page, link to which is in right upper corner: [image: 1.png] [image: 2.png] First to be sure let's clarify how your tests exercise classes under tests - are classes under tests in the same JVM as tests? if you put a breakpoint into class under test and execute test in debug, will the breakpoint be reached? Regards, Evgeny -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/8d973311-96d3-4b7f-9c50-55db89114880%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
