Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
Testing Guide
Initializing search
    bf-dev
    • Home
    • Operations
    bf-dev
    • Home
      • Operations
      • Onboarding Runbook
      • Daily Operations Runbook
      • Troubleshooting
      • Testing Guide
        • Test Scope in bf-dev
        • Running Harness Tests
        • Service-level Tests
          • Manage Web worker count
        • Validation Layers
        • Practical Checks
        • Operations Tooling
        • CloudWatch Logs Insights
        • Code Indexing
        • Customer CMS user export
    • Test Scope in bf-dev
    • Running Harness Tests
    • Service-level Tests
      • Manage Web worker count
    • Validation Layers
    • Practical Checks
    1. Home
    2. Operations
    Depot & Integration Operations Operations & Dispatch general

    Testing Guide¶

    Test Scope in bf-dev¶

    The harness itself includes smoke-level tests in tests/ focused on scripts and orchestration behavior.

    Running Harness Tests¶

    Run focused harness tests directly from tests/ when changing BFDev scripts. For example:

    tests/service_quality_test.sh
    mise exec -- uv run --dev pytest tests/code_index_test.py
    

    Service-level Tests¶

    Use the root Mise quality tasks for checked-out service repos:

    mise run test core
    mise run test web
    mise run test manage
    mise run test
    

    The same selector model is available for linting and type checks:

    mise run lint web
    mise run type-check web
    

    Selectors match repositories under bf/. Exact aliases such as core and web resolve to their matching service repos, broad selectors such as manage resolve to all checked-out matching repos, and no selector runs every detected service command.

    When a service has its own mise.toml, the root task delegates to the service-local task through Mise monorepo task discovery. For example:

    mise run //bf/manage-core:test
    mise run //bf/manage-web:lint
    

    Services without local Mise tasks can still be handled by fallback detection for common npm, uv, pipenv, and make test/lint commands. Container-only checks should still be run inside the relevant downstream service container.

    Manage Web worker count¶

    Manage Web limits Vitest to two workers by default to avoid exhausting memory on developer machines. A capable workstation can increase the limit for one run:

    VITEST_MAX_WORKERS=4 mise run test web
    

    For a persistent machine-specific override, create bf/manage-web/mise.local.toml with:

    [env]
    VITEST_MAX_WORKERS = "4"
    

    This local file is ignored by Git. The Manage Web CI test jobs set VITEST_MAX_WORKERS=8 for their xlarge runners.

    Validation Layers¶

    flowchart TD Harness[bf-dev script tests] --> Confidence[orchestration confidence] ServiceTests[service repo tests] --> Behavior[domain behavior confidence] ComposeRun[compose startup checks] --> Runtime[runtime integration confidence]

    Practical Checks¶

    • Start target mode and ensure healthchecks pass.
    • Validate critical UI/API paths for the active domain.
    • Re-run after ./pull when dependencies move.
    Made with Material for MkDocs
    BFDev Docs Assistant
    New conversation?
    Ask one focused question at a time, this helps the assistant provide accurate answers about what's been implemented in BetterFleet.