feat(phase-0): initialize project foundation, packaging, logging, configs, and tests

This commit is contained in:
Warehouse Twin Dev
2026-10-19 14:55:54 +05:30
commit 7ef65ce65d
42 changed files with 2607 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
# 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
```