Our team uses the traditional method of building new test cases based on the feature requirements and testing them (manually or through automation) and getting them reviewed by the dev and product team.

We need to be able to report on the code coverage of our tests. The requirement is that we report at the level of lines of code covered.

Is there any tool used on Android, where I can run the automated and manual tests on a build by flashing a device and then generate a report which gives the line coverage report?

Code base : In Java (Android).

Currently we get an apk that we load on the device and then run manual and automated tests on the device.

I am looking for a way where I can load the same apk on the device and run automated and manual tests and generate a report which will tell me how much of the actual Java code lines the automated and manual test cases covered, so the tool would need to run in the background for the testing session.

  • I don't think this question can be answered without more information. You did not include any details about what technology you use. I can only generally say that there are tools to measure line coverage, e.g. in C# docs.microsoft.com/en-us/dotnet/core/testing/… I'm also unsure if you mean line coverage as in how many lines of app code have been executed, or if you perhaps want to measure how many lines of a test script have been executed. I'd also argue about the utility of this effort.
    – pavelsaman
    Mar 22, 2022 at 22:07
  • Also, what do you mean by "functional test cases"? Most test cases are functional in nature: unit tests, integration tests, UI tests all work to verify functional at different levels. Tools generally do a good job at test coverage on unit tests, but it gets a lot harder with integration and UI tests. What level of tests are you wanting code coverage for?
    – Lee Jensen
    Mar 23, 2022 at 20:33


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.