Go JCov

JCov: https://wiki.openjdk.java.net/display/CodeTools/jcov

Available: https://adopt-openjdk.ci.cloudbees.com/job/jcov/

Instr a .jar: java -jar jcov.jar Instr app.jar

Start a grabber: java -Xmx1024m -jar jcov.jar grabber -t template.xml -o result.xml -verbosemore

Execute the automation/manual tests or whatever any operation against the app.jar

Stop the grabber: java -jar jcov.jar grabberManager -stop

Generate the report: java -jar jcov.jar repgen -i com.oracle.xxxx.xx.* -e com.oracle.xx.xxx.platform.LinuxPlatform -e com.oracle.xxx.xxx.platform.MacPlatform -src C:\SQE\xxx\src result.xml

Note, the instr will corrupt your .jar file if your .jar file is signed. You have to do the instr before signature.

Well, sometimes the jcov’s grabber can not exit its hook elegantly and awfully you can not get the report (Imagine you spend a day in it and nothing output?), ok you gotta remember to use the grabber from jcov_network_saver.jar: just simply drag the classes files rom jcov_network_saver.jar into your to be tested .jar and save it. Oh, again, do NOT do this after the signature.