Run 'app' with Code Coverage in Android Studio

AVEbrahimi picture AVEbrahimi · Mar 29, 2015 · Viewed 9.7k times · Source

There is a Run with Coverage button in Android Studio (Check attached image) , but it's always disabled, how can I enabled it?

enter image description here

Answer

ffgiraldez picture ffgiraldez · Apr 20, 2015

You need to run a "junit" run configuration, like this one

AS junit run configuration

Only apply when you pass your unit tests