Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use a different coverage tool #417

Open
dennislopes opened this issue Jul 13, 2021 · 0 comments
Open

How to use a different coverage tool #417

dennislopes opened this issue Jul 13, 2021 · 0 comments

Comments

@dennislopes
Copy link

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:

  1. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant