Systers Community

Write test for an activity using Mockito-Junit integration

Prerequisite:

  • Setup Powerup Android using the instructions given here.

Steps:

  • Add dependencies for Junit and Mockito
  • Use Mockito to mock the dummy implementation of anyone activity mentioned here and use annotations to showcase their compatibility with both JUnit and Mockito.
  • Add the test file at location PowerUp/app/src/test/java/powerup/systers/com/powerup/test/.
  • If necessary, use Powermock to mock the bundle class using base mockito.

Resources

Work Submission:

  • Submit screenshots highliting the output of the test along with test file.

Task tags

  • mockito
  • testing
  • junit

Students who completed this task

Fidella, Valentun, Sameer

Task type

  • done_all Quality Assurance
close

2017