#!/bin/bash # Comprehensive Test Runner for DBIS Core Lite # Runs all test suites with reporting set -e echo "๐Ÿงช DBIS Core Lite - Comprehensive Test Suite" echo "==============================================" echo "" # Colors for output GREEN='\033[0;32m' RED='\033[0;31m' YELLOW='\033[1;33m' NC='\033[0m' # No Color # Check if test database exists if [ -z "$TEST_DATABASE_URL" ]; then export TEST_DATABASE_URL="postgresql://postgres:postgres@localhost:5432/dbis_core_test" echo -e "${YELLOW}โš ๏ธ TEST_DATABASE_URL not set, using default: $TEST_DATABASE_URL${NC}" fi echo "๐Ÿ“‹ Test Configuration:" echo " NODE_ENV: ${NODE_ENV:-test}" echo " TEST_DATABASE_URL: $TEST_DATABASE_URL" echo "" # Run test suites echo "๐Ÿ” Running Unit Tests..." npm test -- tests/unit --passWithNoTests echo "" echo "๐Ÿ”’ Running Security Tests..." npm test -- tests/security --passWithNoTests echo "" echo "โœ… Running Compliance Tests..." npm test -- tests/compliance --passWithNoTests echo "" echo "โœ”๏ธ Running Validation Tests..." npm test -- tests/validation --passWithNoTests echo "" echo "๐Ÿ”— Running Integration Tests..." npm test -- tests/integration --passWithNoTests echo "" echo "๐Ÿ”„ Running E2E Tests..." npm test -- tests/e2e --passWithNoTests echo "" echo "๐Ÿ“Š Generating Coverage Report..." npm run test:coverage echo "" echo -e "${GREEN}โœ… All test suites completed!${NC}" echo ""