Test Requirements

This document specifies the testing required for GCP Ingestion components.

Exceptions

Code that does not comply with this standard before it is deployed to production must include a document explaining why that decision was made.

Test Phases

  1. Continuous Integration
  2. Must run Unit Tests and Integration Tests
  3. Must run against every merge to master and every pull request
  4. Must block merging to master
  5. Pre-Production
  6. Must run Unit Tests and Load Tests
  7. Must run against every version deployed to production
  8. Must mimic production configuration as closely as possible
  9. Should block deployment to production
  10. Async
  11. Must run Slow Load Tests
  12. Must run against every version deployed to production
  13. Must mimic production configuration as closely as possible
  14. Should not block deployment to production
  15. Must notify someone to investigate failures

Test Categories

Tests must be both thorough and fast enough to not block development. They are split into categories with increasing run time and decreasing coverage.

  1. Unit Tests
  2. Must cover 100% of code behavior
  3. Should run as fast as possible
  4. Integration Tests
  5. Must cover all expected production behavior
  6. Must run fast enough to allow frequent merging to master
  7. Load Tests
  8. Must cover performance at scale with and without external services down
  9. Must run fast enough to allow multiple production deployments per day
  10. Slow Load Tests
  11. Must cover performance at scale with extended downtime
  12. May take a very long time

Unit Tests

Integration Tests

Load Tests

Slow Load Tests