Right now, unit tests are taking up most of the testing of the business logic of the app. There is some integration tests running, but it uses mocks and is only testing the repository objects. We need tests that test use cases, without mocks to test full workflows.
I believe we should move over to using mockwebserver to have the full implementation tested. Also the use of Robolectric perhaps? I have not used Robo in years, but it may be worth looking into. Once android integration tests are compiled and installed, they run fast but getting to that point can take a while!
Breakdown of testing setup now:
Unit tests, good. Use mocking to test small pieces. Only piece we would need to change is to move to @Mock initializing of mock objects instead of using Dagger and @Inject because this issue is outlining using little to no mocks in the integration testing.
Integration testing - could be much better. That is what this issue is covering.
UI testing - Good. Try to put more into the ViewModel object so testing the UI is easier by simply mocking a ViewModel and being able to show all states.
Right now, unit tests are taking up most of the testing of the business logic of the app. There is some integration tests running, but it uses mocks and is only testing the repository objects. We need tests that test use cases, without mocks to test full workflows.
I believe we should move over to using mockwebserver to have the full implementation tested. Also the use of Robolectric perhaps? I have not used Robo in years, but it may be worth looking into. Once android integration tests are compiled and installed, they run fast but getting to that point can take a while!
Breakdown of testing setup now:
@Mock
initializing of mock objects instead of using Dagger and@Inject
because this issue is outlining using little to no mocks in the integration testing.