I want to use the jacoco CLI introduced in 0.8 version..
Step 1. I created the instrumented classes by executing
java -jar jacococli.jar instrument <dir where all my application are> --dest C:\jacoco\target
here, C:\jacoco\target is the directory where the instrumented classes will placed.
Step2: I ran my junit test class as standalone application::
java -cp ${CLASSPATH} org.junit.runner.JUnitCore com.samples.customerinfo.CustomerOrderInfoTest
Junit sucessfull done!!
Step3:: Missing link.. How my executed junit will create the jacoco.exec files, i want to use the CLI options of jacoco library..
do i need to pass the jacocoagent.jar in the JVM , i am using powershell only.
Pl. suggest..
Hi All,
I found the reply..
Step 2 needs to be changed and javaagent options needs to added and pointing to jacocoagent.jar
java -javaagent:jacocoagent.jar=destfile=jacoco.exec -cp ${CLASSPATH} org.junit.runner.JUnitCore com.samples.customerinfo.CustomerOrderInfoTest
ok.. so is there any other way to create the jacoco.exec file if i am not using jacocagent while executing the junit from command line..