2017-04-21 2 views
0

FBSnapshotTestCase image not found while running Xcode test 보고서가없는 이유를 알 수 없습니다.Xcode 테스트를 실행하는 동안 FBSnapshotTestCase 이미지를 찾을 수 없습니다.

FBSnapshotTestCase을 연결했지만 여전히 동일한 오류가 표시되었습니다.

저는이 사실에 익숙하지 않습니다. 아무도 도와 줄 수 있습니까? 미리 감사드립니다.

  1. (옵션),

    은 프로젝트 루트로 이동 https://github.com/danielgindi/Charts

    에서 프로젝트를 다운로드 의존성을 설치 carthage bootstrap을 실행

    재현합니다. 프로젝트는 의존성 체크를 가지고 있기 때문에 이것을 실행하지 않으면 테스트를 시작할 때 의존성 체크가 실행됩니다.

  2. xcodebuild의 -project 'Charts.xcodeproj'-scheme 'ChartsTests'- 배열 '디버그'-sdk iphonesimulator의 -destination 아이디 = 'E40B5365-EF82-430D-A767-2A37995CCEE1'정리 빌드를 입력 테스트

대상 ID는 시스템에서 시뮬레이터의 UUID 수 있습니다.

는 그 다음 보고서 :

2017-04-20 13:47:57.611 xctest[90924:13099756] The bundle “ChartsTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. 
2017-04-20 13:47:57.611 xctest[90924:13099756] (dlopen_preflight(/Users/user/Library/Developer/Xcode/DerivedData/Charts-ambsdrskvocwekcmoobyhanaiixm/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/ChartsTests.xctest/ChartsTests): Library not loaded: @rpath/FBSnapshotTestCase.framework/FBSnapshotTestCase 
    Referenced from: /Users/user/Library/Developer/Xcode/DerivedData/Charts-ambsdrskvocwekcmoobyhanaiixm/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/ChartsTests.xctest/ChartsTests 
    Reason: image not found) 
2017-04-20 13:47:57.625 xcodebuild[90311:13086990] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted} 

Testing failed: 
    Test target ChartsTests encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted) 
** TEST FAILED ** 

답변

0

그것은 내가 빌드 단계에서 실행 스크립트를 추가하고, 카르타고는 프레임 워크 복사 할 필요가 밝혀졌다 : 응용 프로그램에

:

사본 https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos에서을 타겟 "빌드 단계"설정 탭에서 "+"아이콘을 클릭하고 "새 실행 스크립트 단계"를 선택하십시오. (:/빈/SH 예), 쉘 아래의 스크립트 영역에 다음과 같은 내용을 추가 : 당신이 당신의 쉘을 지정하는 실행 스크립트 작성

/usr/local/bin/carthage copy-frameworks 

을하고 아래에 사용할 프레임 워크에 경로를 추가 "입력 파일", 예 :

$(SRCROOT)/Carthage/Build/iOS/FBSnapshotTestCase.framework 
관련 문제