Domanda

I have been searching internet for hours now and have not got any working solutions yet.

The question is simple: how to get test code coverage in Android maven project using Robolectric as testing library?

I have tried JaCoCo and Cobertura but no success. There is always some kind of error. I think my problem is that I just can't install right code coverage plugin for Maven correctly. I know there is plenty of example POM files and code snippets, but I have not got any luck there.

Robolectric is btw working correclty.

My project dir looks like this:

  | parent project
  |-- app project
  |-- test project

Thanks for helping me out!

È stato utile?

Soluzione

SonarQube does exactly what you're looking for.

EDIT:

These docs will help if you haven't found them already.

The Android plugin will also be very useful to you.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top