I have been trying to generate android code coverage for my android test project which tests a android project which includes a external jar. When I run command
ant emma install debug test
it shows coverage of only the android project but does not include the package and functions of the external jar included.
As per my researches I have found that some changes should be done in ant.properties
file and emma report tag
in build.xml
.
Any suggestions are most welcome.
[Edit]
On furthur study, I went through a blog which says enter the variable
tested.android.library.source.dir="path to external jars" in ant.properties
and same variable should be added in report sourcepath as
<emma>
<report sourcepath="${tested.project.source.absolute.dir}:${tested.project.lib.source.path.value}:${tested.android.library.source.dir}" verbosity="${verbosity}">
<!-- TODO: report.dir or something like should be introduced if necessary -->
<infileset file="${out.absolute.dir}/coverage.ec" />
<infileset file="${tested.project.out.absolute.dir}/coverage.em" />
<!-- TODO: reports in other, indicated by user formats -->
<html outfile="${out.absolute.dir}/coverage.html" />
</report>
</emma>
But still the coverage is not showing functions and package of External jar.
I wanted to know that my jars are not in the android test project but in the android project which is tested. So how to give path to those external jars in ant.properties
of the test project.