I have an Android library project and an Android Test project. There is a dependency on Android and junit in the test project.
Modules:
- Myproject
- MYSAMPLE
- Myprojecttest
MySample uses MyProject as a library and gives apk as output. MyProjectTest has MySample as a dependency, and it has test cases. unit test cannot work on jvm. This is why the MySample project, which generates apk, is used, and unit tests can run on the emulator. They run as instrumental tests since they need an emulator to run.
There is a lot of documentation for building ant, but very little for the maven android project. I configured emma to cover the code, but coverage files are not generated.
My letters follow this link. https://code.google.com/p/maven-android-plugin/wiki/EmmaMaven with the following modification.
- Test.project.dir is set to MySample
- / data / data / (MySample package) /files/coverage.ec in the pullSource property
I get the error message: "Cannot pull cover.ec from the device because it does not exist."
Please, help. Any pointer to the same is much appreciated. I am also open to any coating tools. The only limitation is that I need to test the Maven Android Library Project. I also tried with cobertura, but still could not generate coverage reports.
aasha source share