Skip to main content

QA Strategy & Test Infrastructure

Version: 3.0.0 Date: 2026-05-07

Goal: Establish a comprehensive, automated testing pipeline for Tower — backend unit tests, integration tests with real services, front-end unit tests, and Playwright e2e tests.

Solution: Multi-layer test strategy with Docker-based integration environment, CI pipeline rework, and full front-end test harness.

Features:

  • Backend unit tests audited and fixed (guards, services, storage, source providers)
  • Integration tests with real MinIO, Azurite, Gitea, WireMock, FTP via docker-compose.test.yml
  • Seed scripts for test data (MinIO, Azurite, Gitea)
  • Mock bcyip-toolkit binary for offline protect workflow testing
  • TestHelper class with S3/Azure/FTP helpers and webhook trigger utilities
  • Front-end unit tests (Dashboard, login, activate, RenderWhen, format, tasks)
  • Playwright e2e tests (auth, dashboard, storage flow, workflow creation)
  • Jest coverage threshold + JUnit/Cobertura reporting
  • CI deduplication via workflow:rules (one pipeline per push)
  • 4 CI test stages: unit back, integration back, unit front, e2e front

Implementation Details:

  • --experimental-vm-modules required for AWS SDK v3 Jest VM compatibility
  • jest.setSystemTime() requires epoch ms (not Date) after @sinonjs/fake-timers upgrade
  • Integration and e2e auto on MR→master; manual otherwise

Files Modified:

  • .gitlab-ci.yml - Full CI rework, workflow rules, split test stages, artifacts
  • docker-compose.test.yml - Test service definitions
  • test/helpers/test-helper.ts - TestHelper class
  • test/helpers/webhook-fixtures.ts - Webhook trigger factories
  • test/integration/*.spec.ts - Golden-path and storage integration tests
  • test/setup/seed-*.sh - Container seed scripts
  • test/mocks/bcyip-toolkit - Mock binary
  • test/wiremock/mappings/*.json - WireMock stubs
  • test/run-integration.sh - Local integration runner
  • src/**/*.spec.ts - Backend unit test audit and fixes
  • ui/e2e/*.spec.ts - Playwright e2e tests
  • ui/src/**/*.test.tsx - Vitest unit tests
  • ui/playwright.config.ts - Playwright configuration
  • ui/src/test/render.tsx - Test render helper with providers
  • package.json - @nestjs/{core,common,platform-express} → 11.1.18, npm overrides for transitive vulns
  • src/core/data/data.service.spec.ts - Fixed setSystemTime epoch format