Last Updated: 2026-06-11
Status: ✅ Production Ready
Test Infrastructure Version: 2.0.1
The GNN Processing Pipeline test suite provides comprehensive coverage across all 25 pipeline steps and the maintained source modules under src/. Tests prioritize real code paths, representative data, and explicit skip behavior for unavailable optional services.
- Total Test Files: 184
test_*.pyfiles - Directory Layout: 34 maintained first-level directories under
src/tests/; 32 contain direct test files - Root-Level Tests: 29
test_*.pyfiles atsrc/tests/ - Subdirectory Tests: 155
test_*.pyfiles under module/helper directories - Collected Tests: 2,411 with
uv run --extra dev python -m pytest --collect-only src/tests/ -q --tb=no --ignore=src/tests/llm/test_llm_ollama.py --ignore=src/tests/llm/test_llm_ollama_integration.py(2026-06-12) - Latest Full Run Evidence:
uv run --extra dev python -m pytest src/tests/ -q --tb=no --ignore=src/tests/llm/test_llm_ollama.py --ignore=src/tests/llm/test_llm_ollama_integration.py: 2,393 passed, 17 skipped, 1 xfailed.
src/tests/
├── ../2_tests.py # Thin orchestrator (CLI entry point)
├── runner.py # Core test execution logic
├── conftest.py # Pytest fixtures and configuration
├── __init__.py # Module exports and utilities
├── README.md # Comprehensive documentation
├── AGENTS.md # Technical API documentation
├── <module>/test_*.py # 155 module/helper test files
└── test_*.py # 29 cross-cutting root test files
-
Fast Tests (
--fast-only): Default for pipeline- Duration: 1-3 minutes
- Coverage: Essential functionality
- Use case: Quick validation during development
-
Comprehensive Tests (
--comprehensive): Full suite- Duration: 5-15 minutes
- Coverage: All tests including slow/performance
- Use case: Pre-release validation, CI/CD
-
Reliable Tests (recovery): Essential only
- Duration: ~90 seconds
- Coverage: Critical path validation
- Use case: Emergency validation
All tests follow strict real-implementation policy:
- No replacement of production behavior for core paths
- Real code paths executed in module and integration tests
- Real data or representative fixtures used throughout
- Real dependencies are used when available; optional integrations skip cleanly when unavailable
- File-based assertions on real artifacts
- Real Methods: All tests execute actual module functions
- Real Data: Tests use representative GNN files and data structures
- Real Dependencies: Tests validate actual API responses and service interactions
- Real File I/O: Tests assert on real file outputs in
output/directories - Real Subprocesses: Pipeline tests run actual numbered scripts via subprocess
- Error Scenarios: Tests cover all error conditions with real failure modes
- Graceful Degradation: Tests validate recovery behavior when dependencies unavailable
- Recovery Testing: Tests verify error recovery mechanisms
- Timeout Handling: Tests include timeout scenarios and resource limits
The suite mirrors the source tree: module-focused tests live in src/tests/<module>/, while root-level src/tests/test_*.py files cover cross-cutting environment, coverage, and runner behavior. Mechanical AGENTS/README coverage for maintained test subdirectories is enforced by doc/development/docs_audit.py --strict.
Organized by module and functionality:
gnn- GNN processing and validationrender- Code generation for simulation frameworksmcp- Model Context Protocol integrationaudio- Audio generation and sonificationvisualization- Graph and matrix visualizationpipeline- Pipeline orchestration and infrastructureexport- Multi-format exportexecute- Simulation executionllm- LLM-enhanced analysisontology- Active Inference ontology processing- And 10+ more categories...
For selective execution:
@pytest.mark.fast- Fast tests (< 1 second)@pytest.mark.slow- Slow tests (minutes)@pytest.mark.unit- Unit tests@pytest.mark.integration- Integration tests@pytest.mark.e2e- End-to-end tests@pytest.mark.performance- Performance tests@pytest.mark.safe_to_fail- Safe-to-fail tests (336 functions)@pytest.mark.requires_gpu- GPU-required tests@pytest.mark.requires_network- Network-required tests- And 15+ more markers...
python src/2_tests.py --fast-only --verbosepython src/2_tests.py --comprehensive --verboseuv run --extra dev python -m pytest src/tests/gnn/test_gnn_overall.py -v
uv run --extra dev python -m pytest src/tests/render/test_render_overall.py -vpytest -m fast # Run only fast tests
pytest -m integration # Run only integration tests
pytest -m "not slow" # Exclude slow testspytest --cov=src --cov-report=htmloutput/2_tests_output/
├── test_execution_report.json # Structured test results
├── pytest_comprehensive_output.txt # Full pytest output
├── test_summary.md # Human-readable summary
├── coverage.xml # Coverage data (if enabled)
└── test_details/ # Detailed per-category results
├── gnn_tests.json
├── render_tests.json
└── ...
- JSON: Machine-readable structured data
- Markdown: Human-readable summaries
- HTML: Coverage reports (if enabled)
- Text: Full pytest output for debugging
- Fast Tests: 1-3 minutes (default)
- Comprehensive Tests: 5-15 minutes
- Reliable Tests: ~90 seconds (recovery)
- Individual Test: < 1 second average
- Memory: ~100-300MB during execution
- CPU: Parallel execution supported
- Disk: Temporary test artifacts cleaned up automatically
- Test Discovery: Handles 54 files efficiently
- Parallel Execution: Category-based parallelization
- Timeout Handling: Per-category timeouts prevent hangs
- Resource Monitoring: Built-in memory and CPU tracking
- Real Implementations: Always use real code paths
- Real Data: Use representative test data
- Comprehensive Assertions: Test both success and failure cases
- Error Handling: Wrap optional dependencies in try/except
- Documentation: Include clear docstrings explaining test purpose
- Module-Based: One test file per module (
test_MODULE_overall.py) - Specialized: Additional files for specific areas
- Integration: Separate files for cross-module testing
- Naming: Follow
test_*.pyconvention
- Fast First: Run fast tests during development
- Comprehensive Before Release: Run full suite before releases
- Selective Execution: Use markers to run specific test subsets
- Parallel Execution: Use parallel execution for faster results
- Collection Errors: Check for missing dependencies or syntax errors
- Import Errors: Verify
src/is in Python path - Timeout Errors: Increase timeout or run fast tests only
- Memory Errors: Run tests sequentially or reduce test scope
- Test Failures: Review
pytest_comprehensive_output.txtfor details
- Check test output files in
output/2_tests_output/ - Review
test_execution_report.jsonfor execution summary - Check
pytest_comprehensive_output.txtfor detailed error messages - Verify environment variables are set correctly
- Ensure all dependencies are installed
- Coverage Analysis: Enhanced code coverage tracking and reporting
- Performance Benchmarking: Automated performance regression detection
- CI/CD Integration: Automated test execution in CI/CD pipelines
- Test Data Management: Centralized test data fixtures
- Visual Test Reports: Enhanced HTML reporting with visualizations
- Additional tests for new modules as they're added
- Enhanced integration tests for cross-module workflows
- Expanded performance tests for scalability validation
- Additional error recovery scenarios
- Test Documentation:
src/tests/README.md - API Documentation:
src/tests/AGENTS.md - Pipeline Documentation:
README.md - Architecture Guide:
ARCHITECTURE.md - Project Overview:
DOCS.md
The GNN Processing Pipeline test suite provides comprehensive, production-ready testing infrastructure with:
- 184 test files across root and module-specific directories
- 2,411 collected tests in the current command-of-record collect pass with Ollama integration tests ignored
- Latest recorded full command-of-record evidence: 2,393 passed, 17 skipped, 1 xfailed
- Real data and real implementations throughout core paths
- Comprehensive error handling and recovery testing
- Module coverage for all 25 pipeline steps
- AGENTS/README documentation coverage for maintained test subdirectories
The test infrastructure is mature, comprehensive, and ready for production use.