- 모든 서비스 메서드 시그니처를 실제 구현에 맞게 수정 - TestDataGenerator 제거하고 직접 객체 생성으로 변경 - 모델 필드명 및 타입 불일치 수정 - 불필요한 Either 패턴 사용 제거 - null safety 관련 이슈 해결 수정된 파일: - test/integration/screens/company_integration_test.dart - test/integration/screens/equipment_integration_test.dart - test/integration/screens/user_integration_test.dart - test/integration/screens/login_integration_test.dart
108 lines
4.2 KiB
Bash
Executable File
108 lines
4.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# 색상 정의
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
echo -e "${BLUE} 🚀 SUPERPORT 자동화 테스트 전체 실행 스크립트 🚀${NC}"
|
|
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
echo ""
|
|
|
|
# 시작 시간 기록
|
|
START_TIME=$(date +%s)
|
|
|
|
# 테스트 결과 저장 변수
|
|
TOTAL_TESTS=0
|
|
PASSED_TESTS=0
|
|
FAILED_TESTS=0
|
|
|
|
# 테스트 실행 함수
|
|
run_test() {
|
|
local test_name=$1
|
|
local test_file=$2
|
|
|
|
echo -e "${YELLOW}▶️ $test_name 시작...${NC}"
|
|
|
|
if flutter test "$test_file" --no-pub; then
|
|
echo -e "${GREEN}✅ $test_name 성공!${NC}"
|
|
((PASSED_TESTS++))
|
|
else
|
|
echo -e "${RED}❌ $test_name 실패!${NC}"
|
|
((FAILED_TESTS++))
|
|
fi
|
|
|
|
((TOTAL_TESTS++))
|
|
echo ""
|
|
}
|
|
|
|
# 환경 확인
|
|
echo -e "${BLUE}📋 환경 확인 중...${NC}"
|
|
flutter --version
|
|
echo ""
|
|
|
|
# 개별 테스트 실행 (순차적)
|
|
echo -e "${BLUE}📊 개별 화면 테스트 실행${NC}"
|
|
echo -e "${BLUE}───────────────────────────────────────────────────────────────${NC}"
|
|
|
|
# Equipment In 테스트
|
|
if [ -f "test/integration/automated/run_equipment_in_test.dart" ]; then
|
|
run_test "장비 입고 테스트" "test/integration/automated/run_equipment_in_test.dart"
|
|
fi
|
|
|
|
# Company 테스트
|
|
run_test "회사 관리 테스트" "test/integration/automated/run_company_test.dart"
|
|
|
|
# User 테스트
|
|
run_test "사용자 관리 테스트" "test/integration/automated/run_user_test.dart"
|
|
|
|
# Warehouse 테스트
|
|
run_test "창고 관리 테스트" "test/integration/automated/run_warehouse_test.dart"
|
|
|
|
# License 테스트
|
|
if [ -f "test/integration/automated/screens/license/license_screen_test_runner.dart" ]; then
|
|
run_test "라이선스 관리 테스트" "test/integration/automated/screens/license/license_screen_test_runner.dart"
|
|
fi
|
|
|
|
# Master Test Suite 실행 (병렬)
|
|
echo -e "${BLUE}📊 통합 테스트 스위트 실행 (병렬)${NC}"
|
|
echo -e "${BLUE}───────────────────────────────────────────────────────────────${NC}"
|
|
run_test "마스터 테스트 스위트" "test/integration/automated/master_test_suite.dart"
|
|
|
|
# 종료 시간 및 소요 시간 계산
|
|
END_TIME=$(date +%s)
|
|
DURATION=$((END_TIME - START_TIME))
|
|
MINUTES=$((DURATION / 60))
|
|
SECONDS=$((DURATION % 60))
|
|
|
|
# 최종 결과 출력
|
|
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
echo -e "${BLUE} 📊 최종 테스트 결과 📊${NC}"
|
|
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
echo ""
|
|
echo -e " 전체 테스트: ${TOTAL_TESTS}개"
|
|
echo -e " ${GREEN}✅ 성공: ${PASSED_TESTS}개${NC}"
|
|
echo -e " ${RED}❌ 실패: ${FAILED_TESTS}개${NC}"
|
|
echo -e " ⏱️ 소요 시간: ${MINUTES}분 ${SECONDS}초"
|
|
echo ""
|
|
|
|
# 성공률 계산
|
|
if [ $TOTAL_TESTS -gt 0 ]; then
|
|
SUCCESS_RATE=$(echo "scale=1; $PASSED_TESTS * 100 / $TOTAL_TESTS" | bc)
|
|
echo -e " 📊 성공률: ${SUCCESS_RATE}%"
|
|
fi
|
|
|
|
echo ""
|
|
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
|
|
# Exit code 설정
|
|
if [ $FAILED_TESTS -eq 0 ]; then
|
|
echo -e "${GREEN}🎉 모든 테스트가 성공했습니다!${NC}"
|
|
exit 0
|
|
else
|
|
echo -e "${RED}⚠️ 일부 테스트가 실패했습니다. 로그를 확인하세요.${NC}"
|
|
exit 1
|
|
fi |