Working and Testing - One2Remember/UrbanFlix GitHub Wiki
Testing
Unit Testing
Because our application is fundamentally a content stream, virtually all testing was done via the emulator and on an Android phone. However, some of the business logic was consolidated into the MovieReview Class, the User Class, the PreferencesHelper Class, and the FirestoreHelper Class. Of these four, the first three were readily testable, though PreferencesHelper was a bit of a challenge, requiring including a few more external dependencies for tools designed to test Shared Preferences helper class. Unfortunately, testing FirestoreHelper was beyond the scope of this project, as it would've required emulating the application with a dummy connection to Google's Firestore using their own testing framework. While technically possible, we feel this was beyond the scope of this project.
PreferencesHelper Test Suite
MovieReview Test Suite
User Test Suite
Integration Testing
For Integration Testing, we took a top-down approach. The first thing we implemented in the project were basic navigation features with each Activity acting as a module stub. As we fleshed out those modules, each was integrated into the larger skeleton and tested rigorously before being fully committed. By constantly rerunning emulations via AndroidStudio on different phones, we were able to ensure each module worked properly before it was fully integrated. By the time all modules had been basically functional, no additional integration testing was required. As we tweaked the individual modules, we reran the emulator, and in no cases did we ever break our original core design, showing the fundamental structure of the application interface was sound from the initial top-down design.