Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MVP design Pattern

  1. Model (includes InteracatorsInteractors) Use JUnit and Mockito

  2. Presenter

    1. If the presenter have any android dependencies then use Robolectric +Mockito

    2. If the presenter does not have any android dependencies use JUnit and Mockito

  3. Views Use Robolectric +Mockito

  4. Utils and Helpers (JUnit +Mockito)

Best practices

Unit tests should:

  1. Be Simple and contain as little logic as possible

  2. Clearly explain what behaviour they’re testing e.g with pattern [Method Under Test]_ [Scenario/Condition]_ [Expected Result]

  3. Make sure that frequently changing code is covered

  4. Focus on public functions , no private functions

  5. Cover all uses cases and edge cases of each function

  6. 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

...