Integration Tests - Interactive Visualization

This interactive visualization demonstrates how integration tests verify that services work together using real infrastructure components. Each service has a test suite that runs against real PostgreSQL, Redis, and Kafka instances provisioned via Testcontainers.

How It Works

The visualization shows integration testing in action:

  1. Test Suites: Each service has its own test suite with multiple integration tests
  2. Real Infrastructure: Tests run against real PostgreSQL, Redis, and Kafka instances via Testcontainers
  3. Service Interaction: Tests verify that services work together correctly, not just in isolation
  4. Visual Feedback: Watch tests execute and see connections to infrastructure components

Interactive Visualization

Click on test suites or use the control buttons to run integration tests and see how they interact with real infrastructure components.

If the visualization doesn't display properly, you can open it in a new tab.

Test Suites

Health Data Service Tests

Tests FHIR resource operations, dual-storage (DocumentDB + PostgreSQL), and search index synchronization:

  • Create FHIR Resource
  • Query FHIR Resources
  • DocumentDB ↔ PostgreSQL Sync
  • Search Index Update

Sync Service Tests

Tests queue processing, conflict resolution logic, and batch synchronization operations:

  • Queue Processing
  • Conflict Resolution
  • Batch Sync Operations

User Service Tests

Tests authentication flows, permission validation, and multi-tenant data isolation:

  • Authentication Flow
  • Permission Validation
  • Tenant Isolation

Integration Service Tests

Tests external system integrations:

  • DHIS2 Sync
  • EMR Data Import
  • GIS Boundary Import

Testing Tools

Supertest: HTTP assertion library for testing Node.js HTTP servers. Used to make requests to service APIs and verify responses.

Testcontainers: Provides lightweight, throwaway instances of common databases, message brokers, and other services. Each test suite runs against real PostgreSQL, Redis, and Kafka instances, ensuring tests accurately reflect production behavior.

Execution

Integration tests run on PR merges as part of the continuous integration process. They verify that services work together correctly, catching integration issues before code reaches production.

This visualization complements the Public Health Engagement & Data Portal - System Design document and the End-to-End Tests visualization.