I use make to build and Robolectric as the basis for running tests on Android. I would like to calculate the coverage of my application. For control tests, I used emmalib . What is the best way to adjust coverage calculation in this case? I can not switch to gradle or maven.
make
Robolectric
emmalib
Are you associated with Emma? How about using RoboElectric + Cobertura ? (I think you could use the CLI for the above combination)
So, the parameters
1.) RoboElectric + Cobertura - only CLI, probably for someone not on ANT
2.) JaCoCo may have some useful options.
3.) Pure Android + Emma / EclEmma testing
Useful Tracking Links
Android code coverage generation with changes to build.xml and ant.properties
Android Gradle Code Coverage
https://intellectualcramps.wordpress.com/2013/08/18/code-coverage-of-robolectric-tests-using-jacoco/
https://bitbucket.org/ravidsrk/androidstarter
EDIT:
In most of the manuals I came across, using ANT is unfortunately, and I donβt think it would be a bad idea to move to the recommended build system, for example Gradle, so that it opens up many options, But for JaCoCo you can see here: https: //intellectualcramps.wordpress.com/2013/08/18/code-coverage-of-robolectric-tests-using-jacoco/
UPDATE:
This has been moved from the comments to the response section for information to everyone who wants to see it, and because it is a question of generosity
One solution would be to use Cobertura to create code coverage that can be integrated into eclipse, and also run using the ant build script.
A draft template for such integration can be found here: https://github.com/adgllorente/android-cobertura-boilerplate
Note that all the magic happens in the build.xml of the test project. These tasks should probably be generalized to the custom_rules.xml file, so you can use android to update your projects.
custom_rules.xml
android
Finally, for Gradle, you have many different options:
Please note that you can always use Gradle as an additional build system to generate coverage reports. (but the second build system will introduce a lot of overhead)
jacoco sometimes does not work with Robelectric and powermock runner, you can use clover for atlassian tools, now it is an open source tool.
Source: https://habr.com/ru/post/981086/More articles:Missing Bootstrap 3 boot module - htmlThe heap failure ends. Profile demonstration of heap objects? - javacreating a panoramic spherical view in the android framework - androidOpen Photoshpere from an SD card in android to view it in Google Cardboard - androidNew-WebServiceProxy cannot authenticate with NTLM - powershellGenerating Android code coverage though changes to build.xml and ant.properties - androidA good example of an operation using the AngularJS $ resource is angularjsAngularJS PUT when applying for a REST Service - javascriptAngularJS: Understanding this PUT example - angularjsThe operator increment atomicity - cAll Articles