0

I am looking for any automated tool which can give me a summary of which Presenter classes in my MVP doesn't have a Test classes along with it.

Like I wrote some business logic in my Presenter class but I forgot to write test cases for this class, any automated tool to point this out?

Hisham Muneer
  • 8,558
  • 10
  • 54
  • 79
  • 1
    If you're looking for the _type_ of test or tool, I'm not sure MVP or Presenter code is different than other Java code, so you can look for "code coverage" tools such as [JaCoCo](https://www.jacoco.org/jacoco/trunk/index.html). If you're looking for a specific library or tool, [that may not be on-topic on StackOverflow](https://stackoverflow.com/help/on-topic): "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic [...] as they tend to attract opinionated answers and spam". – Jeff Bowman Oct 28 '18 at 21:55

1 Answers1

1

JaCoCo is a great tool to generate tests coverage reports. Anyway, Android plugin only generates the coverage report from instrumented tests. If you want to include the unit testing, it is necessary to create the task manually.

In the task, it is possible to exclude view classes from the report, for example:

def fileFilter = [
    'com/sample/**/view/**.*',
    '**/R.class', 
    ...]

Usually, I exclude Android classes (BuildConfig, R, etc) and any other XML file that is out of my test strategy.

You can find more information here: https://docs.gradle.org/current/userguide/jacoco_plugin.html

Hope to be helpful, good luck.

Max Cruz
  • 1,215
  • 13
  • 17