Skip to content

Phase 7: Testing & Validation #62

@lsetiawan

Description

@lsetiawan

Parent Issue: #54

Goal

Comprehensive testing of the new structure.

Tasks

Integration Tests

  • Write integration tests in root tests/ directory
    • test_api_pipeline.py: Test API can query data loaded by pipeline
    • test_end_to_end.py: Full stack integration tests
  • Create comprehensive test fixtures in root tests/conftest.py
    • Database session fixtures
    • Sample data fixtures
    • API client fixtures
    • Fixtures shared across all packages

Package-Specific Tests

  • Ensure each package has its own unit tests
    • Datamodels: src/ca_biositing/datamodels/tests/
    • Webservice: src/ca_biositing/webservice/tests/
    • Pipeline: src/ca_biositing/pipeline/tests/

Test Execution

  • Run full test suite
    • All unit tests: pixi run test
    • Datamodels tests: pytest src/ca_biositing/datamodels/tests/
    • Webservice tests: pytest src/ca_biositing/webservice/tests/
    • Pipeline tests: pytest src/ca_biositing/pipeline/tests/
    • Integration tests: pytest tests/

Docker Testing

  • Test Docker Compose full stack
    • All services start successfully
    • Services can communicate
    • Data flows correctly through pipeline
    • API serves data correctly

Performance Testing

  • Performance testing (basic)
    • API response times
    • Pipeline execution times
    • Database query performance

CI/CD Updates

  • Update CI/CD workflows (.github/workflows/)
    • Run tests on PR (all package tests + integration)
    • Run linting and pre-commit checks
    • Test Docker builds
    • Check documentation builds

Success Criteria

  • All tests pass (unit, integration, end-to-end)
  • Each namespace package can be tested independently
  • Integration tests verify full stack functionality
  • CI/CD pipeline successfully builds and tests all components
  • Test coverage >80% for all packages
  • Performance metrics meet or exceed baseline

Dependencies

Labels

Sub-task, phase-7, testing, quality-assurance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions