test: 통합 테스트 오류 및 경고 수정
- 모든 서비스 메서드 시그니처를 실제 구현에 맞게 수정 - 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
This commit is contained in:
60
test/integration/automated/run_tests.sh
Executable file
60
test/integration/automated/run_tests.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "=== 자동화 테스트 실행 스크립트 ==="
|
||||
echo ""
|
||||
|
||||
# 색상 정의
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# 테스트 결과 저장 디렉토리 생성
|
||||
mkdir -p test_results
|
||||
|
||||
# 현재 시간
|
||||
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
|
||||
|
||||
echo "1. 프로젝트 의존성 확인..."
|
||||
flutter pub get
|
||||
|
||||
echo ""
|
||||
echo "2. 코드 생성 (Freezed, JsonSerializable)..."
|
||||
flutter pub run build_runner build --delete-conflicting-outputs
|
||||
|
||||
echo ""
|
||||
echo "3. 단위 테스트 실행..."
|
||||
flutter test test/unit --reporter json > test_results/unit_test_$TIMESTAMP.json || {
|
||||
echo -e "${RED}단위 테스트 실패${NC}"
|
||||
}
|
||||
|
||||
echo ""
|
||||
echo "4. 위젯 테스트 실행..."
|
||||
flutter test test/widget --reporter json > test_results/widget_test_$TIMESTAMP.json || {
|
||||
echo -e "${RED}위젯 테스트 실패${NC}"
|
||||
}
|
||||
|
||||
echo ""
|
||||
echo "5. 통합 테스트 실행..."
|
||||
echo " - Mock API 테스트..."
|
||||
flutter test test/integration/mock --reporter json > test_results/mock_test_$TIMESTAMP.json || {
|
||||
echo -e "${RED}Mock API 테스트 실패${NC}"
|
||||
}
|
||||
|
||||
echo ""
|
||||
echo "6. 자동화 테스트 실행..."
|
||||
echo " - 장비 입고 자동화 테스트..."
|
||||
flutter test test/integration/automated/run_equipment_in_test.dart --reporter expanded || {
|
||||
echo -e "${RED}장비 입고 자동화 테스트 실패${NC}"
|
||||
echo -e "${YELLOW}에러 로그를 확인하세요.${NC}"
|
||||
}
|
||||
|
||||
echo ""
|
||||
echo "=== 테스트 완료 ==="
|
||||
echo "결과 파일들은 test_results/ 디렉토리에 저장되었습니다."
|
||||
echo ""
|
||||
|
||||
# 간단한 요약 표시
|
||||
echo "테스트 요약:"
|
||||
echo "------------"
|
||||
find test_results -name "*_test_$TIMESTAMP.json" -exec echo "- {}" \;
|
||||
Reference in New Issue
Block a user