Files
CurrenciCombo/scripts/verify-all.sh
defiQUG b118b2be9c
Some checks failed
Security Scan / Dependency Vulnerability Scan (push) Has been cancelled
Security Scan / OWASP ZAP Scan (push) Has been cancelled
docs: Update README and FINAL_STATUS for quick start setup and project readiness
- Added quick start instructions in README.md for first-time setup, including commands for complete setup, verification, and service start.
- Revised FINAL_STATUS.md to reflect the project's infrastructure completion and readiness for execution, detailing scripts created and documentation status.
2025-11-06 21:31:55 -08:00

113 lines
4.5 KiB
Bash

#!/bin/bash
# Master Verification Script
# Runs all verification and testing scripts in sequence
echo -e "\n========================================"
echo -e " COMPREHENSIVE SYSTEM VERIFICATION"
echo -e "========================================\n"
# Colors
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
NC='\033[0m'
TOTAL_TESTS=0
PASSED_TESTS=0
FAILED_TESTS=0
# Function to run a test script
run_test() {
local script_name=$1
local description=$2
echo -e "\n${CYAN}Running: $description${NC}"
echo -e "${CYAN}Script: $script_name${NC}"
echo -e "----------------------------------------"
if [ -f "scripts/$script_name" ] && [ -x "scripts/$script_name" ]; then
((TOTAL_TESTS++))
if ./scripts/$script_name; then
echo -e "${GREEN}$description: PASSED${NC}"
((PASSED_TESTS++))
return 0
else
echo -e "${RED}$description: FAILED${NC}"
((FAILED_TESTS++))
return 1
fi
else
echo -e "${YELLOW}⚠️ Script not found or not executable: $script_name${NC}"
return 2
fi
}
# Phase 1: Setup Validation
echo -e "\n${CYAN}════════════════════════════════════${NC}"
echo -e "${CYAN} PHASE 1: SETUP VALIDATION${NC}"
echo -e "${CYAN}════════════════════════════════════${NC}"
run_test "validate-setup.sh" "Complete Setup Validation"
# Phase 2: Database Verification
echo -e "\n${CYAN}════════════════════════════════════${NC}"
echo -e "${CYAN} PHASE 2: DATABASE VERIFICATION${NC}"
echo -e "${CYAN}════════════════════════════════════${NC}"
run_test "test-database.sh" "Database Connection Test"
# Phase 3: Service Verification
echo -e "\n${CYAN}════════════════════════════════════${NC}"
echo -e "${CYAN} PHASE 3: SERVICE VERIFICATION${NC}"
echo -e "${CYAN}════════════════════════════════════${NC}"
# Check if services are running first
if nc -z localhost 8080 2>/dev/null && nc -z localhost 3000 2>/dev/null; then
run_test "check-status.sh" "Service Status Check"
run_test "verify-services.sh" "Service Verification"
run_test "test-curl.sh" "API Endpoint Testing"
else
echo -e "${YELLOW}⚠️ Services not running. Start services first:${NC}"
echo -e " ${CYAN}./scripts/start-all.sh${NC}"
echo -e "${YELLOW} Skipping service tests...${NC}"
fi
# Phase 4: Frontend Verification
echo -e "\n${CYAN}════════════════════════════════════${NC}"
echo -e "${CYAN} PHASE 4: FRONTEND VERIFICATION${NC}"
echo -e "${CYAN}════════════════════════════════════${NC}"
run_test "verify-frontend.sh" "Frontend Verification"
# Phase 5: Integration Testing
echo -e "\n${CYAN}════════════════════════════════════${NC}"
echo -e "${CYAN} PHASE 5: INTEGRATION TESTING${NC}"
echo -e "${CYAN}════════════════════════════════════${NC}"
if nc -z localhost 8080 2>/dev/null && nc -z localhost 3000 2>/dev/null; then
run_test "test-webapp-orchestrator.sh" "Webapp-Orchestrator Communication"
run_test "test-e2e-flow.sh" "End-to-End Flow Test"
else
echo -e "${YELLOW}⚠️ Services not running. Skipping integration tests...${NC}"
fi
# Final Summary
echo -e "\n${CYAN}════════════════════════════════════${NC}"
echo -e "${CYAN} VERIFICATION SUMMARY${NC}"
echo -e "${CYAN}════════════════════════════════════${NC}\n"
echo -e "Total Tests Run: $TOTAL_TESTS"
echo -e "${GREEN}✅ Passed: $PASSED_TESTS${NC}"
echo -e "${RED}❌ Failed: $FAILED_TESTS${NC}"
if [ $FAILED_TESTS -eq 0 ]; then
echo -e "\n${GREEN}✅ All verification tests passed!${NC}\n"
exit 0
else
echo -e "\n${RED}❌ Some verification tests failed.${NC}"
echo -e "${YELLOW} Review the output above for details.${NC}\n"
exit 1
fi