我尝试在带有Xcodebuild的iphonesimulator上运行我的测试,但我总是遇到同样的错误。
我的命令行:
xcodebuild clean test -workspace App.xcworkspace -scheme "UI Tests" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.2'
stacktrace:
xcodebuild[31826:741511] [MT] IDETestOperationsObserverDebug: (796137A0-CB6A-490D-BF89-767DF586BE26) Beginning test session 796137A0-CB6A-490D-BF89-767DF586BE26 with Xcode 7C68 on target <DVTiPhoneSimulator: 0x7fef34dce060> {
SimDevice: SimDevice : iPhone 6 (ED6BBC90-CCD7-4AFE-ABBD-AFAE28B7EEC7) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6 } runtime={ SimRuntime : 9.2 (13C75) - com.apple.CoreSimulator.SimRuntime.iOS-9-2 }
} (9.2 (13C75))
2016-02-22 13:07:10.489 XCTRunner[32908:746212] Running tests...
2016-02-22 13:07:10.490 XCTRunner[32908:746212] Looking for test bundles in /Users/me/Library/Developer/CoreSimulator/Devices/ED6BBC90-CCD7-4AFE-ABBD-AFAE28B7EEC7/data/Containers/Bundle/Application/2D77EC0A-85FA-4C8B-BC62-27334E6278C5/UITests-Runner.app/PlugIns
2016-02-22 13:07:10.491 XCTRunner[32908:746212] Found test bundle at /Users/me/Library/Developer/CoreSimulator/Devices/ED6BBC90-CCD7-4AFE-ABBD-AFAE28B7EEC7/data/Containers/Bundle/Application/2D77EC0A-85FA-4C8B-BC62-27334E6278C5/UITests-Runner.app/PlugIns/UITests.xctest
2016-02-22 13:07:10.492 XCTRunner[32908:746212] Looking for configurations in /Users/me/Library/Developer/CoreSimulator/Devices/ED6BBC90-CCD7-4AFE-ABBD-AFAE28B7EEC7/data/Containers/Bundle/Application/2D77EC0A-85FA-4C8B-BC62-27334E6278C5/UITests-Runner.app/PlugIns/UITests.xctest
2016-02-22 13:07:10.494 XCTRunner[32908:746212] Found configuration <XCTestConfiguration: 0x7fd750623340>
testBundleURL:file:///Users/me/Library/Developer/Xcode/DerivedData/App-axxxxxxxxxxx/Build/Products/Debug-iphonesimulator/UITests-Runner.app/PlugIns/UITests.xctest/
productModuleName:UITests
testsToSkip:UITests/test_App()
testsToRun:(null)
reportResultsToIDE:YES
sessionIdentifier:<__NSConcreteUUID 0x7fd750626d10> 796137A0-CB6A-490D-BF89-767DF586BE26
pathToXcodeReportingSocket:(null)
disablePerformanceMetrics:no
treatMissingBaselinesAsFailures:no
baselineFileURL:(null)
targetApplicationPath:/Users/me/Library/Developer/Xcode/DerivedData/App-axxxxxxxxxxxxxx/Build/Products/Debug-iphonesimulator/App.app
targetApplicationBundleID:de.xxxxx
reportActivities:YES
testsMustRunOnMainThread:YES
13:07:10.629 XCTRunner[32908:746223] _XCT_testBundleReadyWithProtocolVersion:minimumVersion: reply received
13:07:10.635 XCTRunner[32908:746221] _IDE_startExecutingTestPlanWithProtocolVersion:16
2016-02-22 13:07:10.992 XCTRunner[32908:746212] Continuing to run tests in the background with task ID 1
Test Suite 'Selected tests' started at 2016-02-22 13:07:11.557
Test Suite 'UITests.xctest' started at 2016-02-22 13:07:11.558
Test Suite 'UITests.xctest' passed at 2016-02-22 13:07:11.558.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
** TEST FAILED **
当我直接在Xcode上调用测试时,我有任何问题。
有什么想法吗? 感谢您的帮助。
干杯。