문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top