Spaces:
Sleeping
Sleeping
| # Testing Strategy | |
| ## Unit Tests | |
| - Located in `tests/` directory. | |
| - Use **FastAPI TestClient** (built on `requests`) and **pytest**. | |
| - Coverage includes: | |
| - System stats (`/api/system`). | |
| - Engine flag persistence (`/api/engine/control`). | |
| - TTS preview with and without narration. | |
| - Story launch flow. | |
| ## Running Tests | |
| ```bash | |
| pip install -r requirements.txt # includes pytest | |
| pytest -v | |
| ``` | |
| ## CI Integration | |
| - GitHub Actions workflow (`.github/workflows/ci.yml`) runs `pytest --cov=.` on every PR. | |
| - Fails the build if coverage drops below 80 %. |