想不通为什么报告FBSnapshotTestCase image not found while running Xcode test
。运行Xcode测试时找不到FBSnapshotTestCase图片
我试图链接目标ChartTests
中的FBSnapshotTestCase
,但仍然看到相同的错误。
我不熟悉这个,任何人都可以帮忙吗?预先感谢。
重现:
从https://github.com/danielgindi/Charts
下载项目导航到项目的根,
(可选)运行
carthage bootstrap
安装依赖。该项目有一个依赖项检查,所以如果你不运行它,它会在启动测试时运行它。进入
xcodebuild联编 - 项目 'Charts.xcodeproj' -scheme 'ChartsTests' 构型的 '调试' -sdk iphonesimulator -destination ID = '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 **