feat: reorganize tests by capability with separate test targets
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Separate capability-specific tests from core system tests to establish clear test organization and separation of concerns. ## Test Reorganization: - **markitect-content tests**: Moved 6 tests to capabilities/markitect-content/tests/ - **markitect-finance tests**: Moved 7 tests to markitect/finance/tests/ - **markitect-query tests**: Moved 1 test to markitect/query_paradigms/tests/ - **markitect-graphql tests**: Moved 2 tests to markitect/graphql/tests/ - **markitect-plugins tests**: Moved 2 tests to markitect/plugins/tests/ ## Makefile Updates: - **make test**: Excludes capability tests, runs only core system tests - **make test-capabilities**: Runs all capability tests - **make test-capability-***: Individual capability test targets - Updated all test targets (test-red, test-green, test-ultra-fast, test-perf) - Added capability test targets to help documentation ## Benefits: - Clear separation between core system tests and capability-specific tests - Faster core test execution (capability tests not run by default) - Individual capability testing for focused development - Supports future capability extraction workflow - Maintains capability test independence Test verification: - Core tests: 1291 tests (capability tests excluded) - Finance capability: 143 tests working independently - Content capability: 79 tests working independently 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
82
Makefile
82
Makefile
@@ -25,7 +25,9 @@ help:
|
||||
@echo " venv-status - Check if venv is active"
|
||||
@echo ""
|
||||
@echo "Development:"
|
||||
@echo " test - Run all tests"
|
||||
@echo " test - Run core tests (excluding capability-specific tests)"
|
||||
@echo " test-capabilities - Run all capability-specific tests"
|
||||
@echo " test-capability-* - Run specific capability tests (content, utils, finance, etc.)"
|
||||
@echo " test-status - Show test status summary without re-running"
|
||||
@echo " test-new - Create new test file template"
|
||||
@echo " test-coverage - Analyze test coverage"
|
||||
@@ -320,25 +322,77 @@ setup-dev: install-dev
|
||||
|
||||
# Run tests
|
||||
test: $(VENV)/bin/activate
|
||||
@echo "🧪 Running tests..."
|
||||
@echo "🧪 Running core tests (excluding capability-specific tests)..."
|
||||
@if [ -f $(VENV)/bin/pytest ]; then \
|
||||
PYTHONPATH=. $(VENV)/bin/pytest tests/ -v; \
|
||||
PYTHONPATH=. $(VENV)/bin/pytest tests/ -v \
|
||||
--ignore=capabilities/markitect-content/tests/ \
|
||||
--ignore=capabilities/markitect-utils/tests/ \
|
||||
--ignore=markitect/finance/tests/ \
|
||||
--ignore=markitect/query_paradigms/tests/ \
|
||||
--ignore=markitect/graphql/tests/ \
|
||||
--ignore=markitect/plugins/tests/; \
|
||||
else \
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -v 2>/dev/null || \
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -v \
|
||||
--ignore=capabilities/markitect-content/tests/ \
|
||||
--ignore=capabilities/markitect-utils/tests/ \
|
||||
--ignore=markitect/finance/tests/ \
|
||||
--ignore=markitect/query_paradigms/tests/ \
|
||||
--ignore=markitect/graphql/tests/ \
|
||||
--ignore=markitect/plugins/tests/ 2>/dev/null || \
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m unittest discover tests/ -v; \
|
||||
fi
|
||||
|
||||
# Capability-Specific Test Targets
|
||||
test-capabilities: test-capability-content test-capability-utils test-capability-finance test-capability-query test-capability-graphql test-capability-plugins
|
||||
@echo "✅ All capability tests completed"
|
||||
|
||||
test-capability-content: $(VENV)/bin/activate
|
||||
@echo "🧪 Running markitect-content capability tests..."
|
||||
@cd capabilities/markitect-content && python -m pytest tests/ -v
|
||||
|
||||
test-capability-utils: $(VENV)/bin/activate
|
||||
@echo "🧪 Running markitect-utils capability tests..."
|
||||
@cd capabilities/markitect-utils && python -m pytest tests/ -v
|
||||
|
||||
test-capability-finance: $(VENV)/bin/activate
|
||||
@echo "🧪 Running finance capability tests..."
|
||||
@PYTHONPATH=. $(VENV_PYTHON) -m pytest markitect/finance/tests/ -v
|
||||
|
||||
test-capability-query: $(VENV)/bin/activate
|
||||
@echo "🧪 Running query paradigms capability tests..."
|
||||
@PYTHONPATH=. $(VENV_PYTHON) -m pytest markitect/query_paradigms/tests/ -v
|
||||
|
||||
test-capability-graphql: $(VENV)/bin/activate
|
||||
@echo "🧪 Running GraphQL capability tests..."
|
||||
@PYTHONPATH=. $(VENV_PYTHON) -m pytest markitect/graphql/tests/ -v
|
||||
|
||||
test-capability-plugins: $(VENV)/bin/activate
|
||||
@echo "🧪 Running plugins capability tests..."
|
||||
@PYTHONPATH=. $(VENV_PYTHON) -m pytest markitect/plugins/tests/ -v
|
||||
|
||||
# TDD8 Workflow Optimized Test Targets (Issue #57)
|
||||
|
||||
# Fast test execution for TDD red phase
|
||||
test-red: $(VENV)/bin/activate
|
||||
@echo "🔴 TDD Red Phase - Fast test execution..."
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -x --maxfail=1 --tb=short -q
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -x --maxfail=1 --tb=short -q \
|
||||
--ignore=capabilities/markitect-content/tests/ \
|
||||
--ignore=capabilities/markitect-utils/tests/ \
|
||||
--ignore=markitect/finance/tests/ \
|
||||
--ignore=markitect/query_paradigms/tests/ \
|
||||
--ignore=markitect/graphql/tests/ \
|
||||
--ignore=markitect/plugins/tests/
|
||||
|
||||
# Comprehensive test execution for TDD green phase
|
||||
test-green: $(VENV)/bin/activate
|
||||
@echo "🟢 TDD Green Phase - Comprehensive validation..."
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ --tb=short
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ --tb=short \
|
||||
--ignore=capabilities/markitect-content/tests/ \
|
||||
--ignore=capabilities/markitect-utils/tests/ \
|
||||
--ignore=markitect/finance/tests/ \
|
||||
--ignore=markitect/query_paradigms/tests/ \
|
||||
--ignore=markitect/graphql/tests/ \
|
||||
--ignore=markitect/plugins/tests/
|
||||
|
||||
# Smart test selection - changed files only
|
||||
test-smart: $(VENV)/bin/activate
|
||||
@@ -354,12 +408,24 @@ test-smart: $(VENV)/bin/activate
|
||||
# Ultra-fast test execution
|
||||
test-ultra-fast: $(VENV)/bin/activate
|
||||
@echo "⚡ Ultra-fast test execution..."
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -m "not slow" --maxfail=1 -x -q
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -m "not slow" --maxfail=1 -x -q \
|
||||
--ignore=capabilities/markitect-content/tests/ \
|
||||
--ignore=capabilities/markitect-utils/tests/ \
|
||||
--ignore=markitect/finance/tests/ \
|
||||
--ignore=markitect/query_paradigms/tests/ \
|
||||
--ignore=markitect/graphql/tests/ \
|
||||
--ignore=markitect/plugins/tests/
|
||||
|
||||
# Test with performance monitoring
|
||||
test-perf: $(VENV)/bin/activate
|
||||
@echo "📊 Test execution with performance monitoring..."
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ --durations=10 --tb=short
|
||||
PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ --durations=10 --tb=short \
|
||||
--ignore=capabilities/markitect-content/tests/ \
|
||||
--ignore=capabilities/markitect-utils/tests/ \
|
||||
--ignore=markitect/finance/tests/ \
|
||||
--ignore=markitect/query_paradigms/tests/ \
|
||||
--ignore=markitect/graphql/tests/ \
|
||||
--ignore=markitect/plugins/tests/
|
||||
|
||||
# Test health check
|
||||
test-health: $(VENV)/bin/activate
|
||||
|
||||
0
markitect/finance/tests/__init__.py
Normal file
0
markitect/finance/tests/__init__.py
Normal file
0
markitect/graphql/tests/__init__.py
Normal file
0
markitect/graphql/tests/__init__.py
Normal file
0
markitect/plugins/tests/__init__.py
Normal file
0
markitect/plugins/tests/__init__.py
Normal file
0
markitect/query_paradigms/tests/__init__.py
Normal file
0
markitect/query_paradigms/tests/__init__.py
Normal file
Reference in New Issue
Block a user