@@ -19,7 +19,7 @@ export $(shell sed 's/=.*//' config.env | grep -v '^\s*$$' | grep -v '^\s*\#')
1919SCRIPTS_DIR := scripts
2020K8S_SCRIPTS_DIR := $(SCRIPTS_DIR ) /k8s
2121
22- .PHONY : help menu setup-k8s setup-infrastructure setup-rbac setup-storage-pvc config config-docker config-k8s config-all clean deploy deploy-docker deploy-k8s deploy-k8s-full deploy-infrastructure deploy-apps check-infrastructure check-apps build-backend up-backend down-backend k8s-status k8s-cleanup k8s-purge audio-manage
22+ .PHONY : help menu setup-k8s setup-infrastructure setup-rbac setup-storage-pvc config config-docker config-k8s config-all clean deploy deploy-docker deploy-k8s deploy-k8s-full deploy-infrastructure deploy-apps check-infrastructure check-apps build-backend up-backend down-backend k8s-status k8s-cleanup k8s-purge audio-manage test-robot test-robot-integration test-robot-unit test-robot-endpoints test-robot-specific test-robot-clean
2323
2424# Default target
2525.DEFAULT_GOAL := menu
@@ -36,6 +36,11 @@ menu: ## Show interactive menu (default)
3636 @echo " k8s-cleanup 🧹 Clean up Kubernetes resources"
3737 @echo " audio-manage 🎵 Manage audio files"
3838 @echo
39+ @echo " 🧪 Testing:"
40+ @echo " test-robot 🧪 Run all Robot Framework tests"
41+ @echo " test-robot-integration 🔬 Run integration tests only"
42+ @echo " test-robot-endpoints 🌐 Run endpoint tests only"
43+ @echo
3944 @echo " 📝 Configuration:"
4045 @echo " config-docker 🐳 Generate Docker Compose .env files"
4146 @echo " config-k8s ☸️ Generate Kubernetes files (Skaffold env + ConfigMap/Secret)"
@@ -95,6 +100,13 @@ help: ## Show detailed help for all targets
95100 @echo " 🎵 AUDIO MANAGEMENT:"
96101 @echo " audio-manage Interactive audio file management"
97102 @echo
103+ @echo " 🧪 ROBOT FRAMEWORK TESTING:"
104+ @echo " test-robot Run all Robot Framework tests"
105+ @echo " test-robot-integration Run integration tests only"
106+ @echo " test-robot-endpoints Run endpoint tests only"
107+ @echo " test-robot-specific FILE=path Run specific test file"
108+ @echo " test-robot-clean Clean up test results"
109+ @echo
98110 @echo " 🔍 MONITORING:"
99111 @echo " check-infrastructure Check if infrastructure services are running"
100112 @echo " check-apps Check if application services are running"
@@ -170,7 +182,7 @@ config: config-all ## Generate all configuration files
170182
171183config-docker : # # Generate Docker Compose configuration files
172184 @echo " 🐳 Generating Docker Compose configuration files..."
173- @python3 scripts/generate-docker-configs.py
185+ @CONFIG_FILE=config.env.dev python3 scripts/generate-docker-configs.py
174186 @echo " ✅ Docker Compose configuration files generated"
175187
176188config-k8s : # # Generate Kubernetes configuration files (Skaffold env + ConfigMap/Secret)
@@ -297,3 +309,49 @@ k8s-purge: ## Purge unused images (registry + container)
297309audio-manage : # # Interactive audio file management
298310 @echo " 🎵 Starting audio file management..."
299311 @$(SCRIPTS_DIR ) /manage-audio-files.sh
312+
313+ # ========================================
314+ # TESTING TARGETS
315+ # ========================================
316+
317+ # Define test environment variables
318+ TEST_ENV := BACKEND_URL=http://localhost:8001 ADMIN_EMAIL=test-admin@example.com ADMIN_PASSWORD=test-admin-password-123
319+
320+ test-robot : # # Run all Robot Framework tests
321+ @echo " 🧪 Running all Robot Framework tests..."
322+ @cd tests && $(TEST_ENV ) robot --outputdir ../results .
323+ @echo " ✅ All Robot Framework tests completed"
324+ @echo " 📊 Results available in: results/"
325+
326+ test-robot-integration : # # Run integration tests only
327+ @echo " 🧪 Running Robot Framework integration tests..."
328+ @cd tests && $(TEST_ENV ) robot --outputdir ../results integration/
329+ @echo " ✅ Robot Framework integration tests completed"
330+ @echo " 📊 Results available in: results/"
331+
332+ test-robot-unit : # # Run unit tests only
333+ @echo " 🧪 Running Robot Framework unit tests..."
334+ @cd tests && $(TEST_ENV ) robot --outputdir ../results unit/ || echo " ⚠️ No unit tests directory found"
335+ @echo " ✅ Robot Framework unit tests completed"
336+ @echo " 📊 Results available in: results/"
337+
338+ test-robot-endpoints : # # Run endpoint tests only
339+ @echo " 🧪 Running Robot Framework endpoint tests..."
340+ @cd tests && $(TEST_ENV ) robot --outputdir ../results endpoints/
341+ @echo " ✅ Robot Framework endpoint tests completed"
342+ @echo " 📊 Results available in: results/"
343+
344+ test-robot-specific : # # Run specific Robot Framework test file (usage: make test-robot-specific FILE=path/to/test.robot)
345+ @echo " 🧪 Running specific Robot Framework test: $( FILE) "
346+ @if [ -z " $( FILE) " ]; then \
347+ echo " ❌ FILE parameter is required. Usage: make test-robot-specific FILE=path/to/test.robot" ; \
348+ exit 1; \
349+ fi
350+ @cd tests && $(TEST_ENV ) robot --outputdir ../results $(FILE )
351+ @echo " ✅ Robot Framework test completed: $( FILE) "
352+ @echo " 📊 Results available in: results/"
353+
354+ test-robot-clean : # # Clean up Robot Framework test results
355+ @echo " 🧹 Cleaning up Robot Framework test results..."
356+ @rm -rf results/
357+ @echo " ✅ Test results cleaned"
0 commit comments