简体   繁体   中英

How do I find out the code coverage of the JDK caused by my tests?

I am currently using Emma as the code coverage tool for my project. I know how to get the code coverage analysis of running a sample Java test case. This will give me the code coverage details of the Java test case code, but, what I want to know is how much JDK code was covered in running the sample Java test case.

For example, if my test case is:

public class TestCase{
 public static void main(String[] args){
  System.out.println("Hello world!");
 }
}

I want to know how much JDK code was executed to execute the above test case.

Have you considere explicitely instrumenting the jars from the jdk and including com.sun; java. and javax packages?

尝试cobertura

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM