test: 통합 테스트 오류 및 경고 수정
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled

- 모든 서비스 메서드 시그니처를 실제 구현에 맞게 수정
- 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:
JiWoong Sul
2025-08-05 20:24:05 +09:00
parent d6f34c0a52
commit 198aac6525
145 changed files with 41527 additions and 5220 deletions

View File

@@ -0,0 +1,75 @@
import 'dart:io';
import 'package:test/test.dart';
import 'screens/equipment/equipment_in_full_test.dart';
/// 장비 테스트 실행기
void main() {
group('장비 화면 자동 테스트', () {
setUpAll(() async {
// 테스트 시작
});
tearDownAll(() async {
// 테스트 종료
});
test('장비 화면 전체 기능 테스트', () async {
final equipmentTest = EquipmentInFullTest();
final results = await equipmentTest.runAllTests();
// 테스트 결과 요약
// 전체 테스트: ${results['totalTests']}개
// 성공: ${results['passedTests']}개
// 실패: ${results['failedTests']}개
// 상세 결과 출력
final tests = results['tests'] as List;
for (final testResult in tests) {
// Process test results
if (!testResult['passed'] && testResult['error'] != null) {
// 에러: ${testResult['error']}
}
}
// 리포트 생성
final autoTestSystem = equipmentTest.autoTestSystem;
final reportCollector = autoTestSystem.reportCollector;
// HTML 리포트 생성
try {
final htmlReport = await reportCollector.generateHtmlReport();
final htmlFile = File('test_reports/equipment_test_report.html');
await htmlFile.parent.create(recursive: true);
await htmlFile.writeAsString(htmlReport);
// HTML 리포트 생성: ${htmlFile.path}
} catch (e) {
// HTML 리포트 생성 실패: $e
}
// Markdown 리포트 생성
try {
final mdReport = await reportCollector.generateMarkdownReport();
final mdFile = File('test_reports/equipment_test_report.md');
await mdFile.writeAsString(mdReport);
// Markdown 리포트 생성: ${mdFile.path}
} catch (e) {
// Markdown 리포트 생성 실패: $e
}
// JSON 리포트 생성
try {
final jsonReport = await reportCollector.generateJsonReport();
final jsonFile = File('test_reports/equipment_test_report.json');
await jsonFile.writeAsString(jsonReport);
// JSON 리포트 생성: ${jsonFile.path}
} catch (e) {
// JSON 리포트 생성 실패: $e
}
// 실패한 테스트가 있으면 테스트 실패
expect(results['failedTests'], equals(0),
reason: '${results['failedTests']}개의 테스트가 실패했습니다.');
}, timeout: Timeout(Duration(minutes: 10)));
});
}