Our tests are sporadic, poorly laid out, and incomplete. We need to rethink and restructure them - this work needs to start with a review of the current situation and the best path forward for improving it.
We're already aware of the following issues, as a starting point:
- Emails have poor test coverage (previously tracked at T196620)
- Our test arrangement may not be ideal - each app has a single tests.py file that is often many thousands of lines long.
- We could be using request-mocking, using something like VCR, to improve our test coverage of external dependencies.
- Fixtures might substantially simplify our test design
- Use coveralls to evaluate the test coverage for this app
- Consider the suitability of using fixtures in these tests to improve efficiency and reduce code
- Evaluate whether splitting the test file into multiple would make sense, and if so how that split should happen
- For each test, is there accurate and up to date documentation? If not, add it in.