# Testing Strategy and Test Suites ## 1. Testing Philosophy The test suite validates correctness, repeatability, schema integrity, and boundary conditions at each phase. Core principles: - **Zero Isaac Sim / Omniverse dependency**: Unit and simulation tests run cleanly in headless environments without graphical displays or NVIDIA Kit runtime. - **Fast execution**: Unit tests execute in under 1 second to encourage continuous verification during development. - **Deterministic fixtures**: Temporary fixtures isolate filesystem effects and ensure tests do not pollute real logs or results. --- ## 2. Test Structure ``` tests/ ├── __init__.py ├── conftest.py # Shared fixtures (temp config, mock objects) ├── unit/ │ ├── __init__.py │ ├── test_environment.py # System dependencies, Python version, disk checks │ ├── test_logging.py # Log file creation, severity routing, log rotation │ └── test_config_loader.py # JSON schema checks, missing keys, validations ├── integration/ # Multi-component integration tests (Phase 3+) ├── scenarios/ # Scenario workloads: normal, peak, line outages (Phase 6+) └── fixtures/ # Static deterministic datasets ``` --- ## 3. Running Tests ### 3.1 All Tests ```bash ./scripts/run_tests.sh ``` ### 3.2 Specific Test File ```bash .venv/bin/pytest tests/unit/test_config_loader.py -v ``` ### 3.3 With Coverage (when pytest-cov is installed) ```bash .venv/bin/pytest tests/ --cov=warehouse_twin ```