...
MVP design Pattern
Model (includes InteracatorsInteractors) Use JUnit and Mockito
Presenter
If the presenter have any android dependencies then use Robolectric +Mockito
If the presenter does not have any android dependencies use JUnit and Mockito
Views Use Robolectric +Mockito
Utils and Helpers (JUnit +Mockito)
Best practices
Unit tests should:
Be Simple and contain as little logic as possible
Clearly explain what behaviour they’re testing e.g with pattern
[Method Under Test]_ [Scenario/Condition]_ [Expected Result]
Make sure that frequently changing code is covered
Focus on
public
functions , noprivate
functionsCover all uses cases and edge cases of each function
Not test code outside the scope of that test
Interpreting the coveralls report
The below is a report for the coveralls that is on the PR after coveralls runs sucessfullysuccessfully. The report is usually edited after new commits
...