defects4j
defects4j copied to clipboard
How to use a different coverage tool
Hello Just,
We already discussed before and I would extend defects4j in order to use a new coverage tool. We want to use ba-dua instead of cobertura. Could you please give an overview on how it could be made? For ba-dua we have this process:
- test execution, 2) coverage report
I don`t need to instrument the classes, so the process seems to be more easier that using Cobertura. Below you have an snipped of the script I use to execute ba-dua
1. Test exectuion
classpath="$(defects4j export -p cp.test -w $project_path)" classes_dir="$project_path/$(defects4j export -p dir.bin.classes -w $project_path)" tests=$(defects4j export -p tests.all -w $project_path | tr "\n" " " | awk '{$1=$1};1') junit_class="org.junit.runner.JUnitCore" java -javaagent:lib/ba-dua-agent-rt-0.4.1-SNAPSHOT-all.jar -cp $classpath $junit_class $tests > badua.out
#2. Coverage report java -jar lib/ba-dua-cli-0.4.1-SNAPSHOT-all.jar report -show-classes -input coverage.ser -classes $classes_dir -xml report.xml