Goal
Testing should be faster to run and write and easier to understand and do in Launchpad, and the bugs team has to do its part.
Strategy
- No more doctests. Period.
- gmb is removing doctests
- Documentation is fine to add, and if it needs code, fine. But it's not a test, it's documentation!
- Unit test FTW!
- Model/object tests should live in lp.bugs.tests
- View tests live in lp.bugs.browser.tests
- Mail tests live in lp.bugs.mail.tests
- No more pagetests
- We will be removing these after doctests
- Decide if you're testing view functions or end-user experience
- User experience is tested in integration tests, i.e. Windmill
JavaScript is tested in lp.bugs.javascript.tests (JS unit tests are run automatically now)
- Re-factor tests in doc or stories now (rather than add to them)
- Do not user sample data ever
- Re-factor use of sample data where appropriate (even logins, see jml's mail about literals)