不知道为什么要举报FBSnapshotTestCase image not found while running Xcode test
。
我尝试FBSnapshotTestCase
在 Target中链接ChartTests
,但仍然看到相同的错误。
我不熟悉这个,有人可以帮忙吗?预先感谢。
重现:
从https://github.com/danielgindi/Charts下载项目
导航到项目根目录,
(可选)运行
carthage bootstrap
以安装依赖项。该项目有一个依赖检查,所以如果你不运行它,它会在启动测试时运行它。进入
xcodebuild -project 'Charts.xcodeproj' -scheme 'ChartsTests' -configuration 'Debug' -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 **