我试图在旧项目上使用Xcode 7添加和运行UI自动化测试。我所做的是:
现在,当我尝试运行记录测试时,我得到以下错误:
失败:抓到"NSInternalInconsistencyException",“没有通过测试配置指定的目标应用程序路径: testBundleURL:file:///xxxxxxxxxxx/PlugIns/PageonceUITests.xctest/ productModuleName:(null) testsToSkip:(null) testsToRun:(null) reportResultsToIDE:no sessionIdentifier:<__NSConcreteUUID 0x7fc818d181a0> 7045B650-CDAF-4EC9-9738-83F78E1514D8 pathToXcodeReportingSocket:(null) disablePerformanceMetrics:no treatMissingBaselinesAsFailures:no baselineFileURL:(null) targetApplicationPath:(null) targetApplicationBundleID:(null)
发布于 2015-10-04 14:34:38
此错误似乎是在抱怨“要测试的目标”字段的选择,同时添加UI测试Target.Does您的“目标应用程序”属性在UI测试目标->常规选项卡下正确显示您选择的主应用程序?一个快乐的配置应该是这样的,
2015-10-04 17:30:50.960 XCTRunner[22941:4703128] Found configuration <XCTestConfiguration: 0x7fbf3050c8b0>
testBundleURL:file:///Users/username/Library/Developer/Xcode/DerivedData/App-fxeyzrynjcscxzaxjvmnormcjhbr/Build/Products/Debug-iphonesimulator/APPUITests-Runner.app/PlugIns/APPUITests.xctest/
productModuleName:APPUITests
testsToSkip:(null)
testsToRun:(null)
reportResultsToIDE:YES
sessionIdentifier:<__NSConcreteUUID 0x7fbf30503430> B324DF9D-769F-4217-901F-24482A719005
pathToXcodeReportingSocket:(null)
disablePerformanceMetrics:no
treatMissingBaselinesAsFailures:no
baselineFileURL:(null)
targetApplicationPath:/Users/username/Library/Developer/Xcode/DerivedData/APP-fxeyzrynjcscxzaxjvmnormcjhbr/Build/Products/Debug-iphonesimulator/AppName.app
targetApplicationBundleID:com.bundle.appBundle.app.dev
reportActivities:no发布于 2017-05-09 08:38:46
这可能是由于目标设置的某些问题造成的。
试试看以下几点。
它起作用了。
发布于 2016-02-04 09:32:24
我有同样的问题,并通过不使用Legacy构建位置来解决它,如这个答案所描述的:https://stackoverflow.com/a/32658990/901334
如果我使用"Legacy",UI测试可以被记录下来,但是当我尝试运行它们时失败。使用“独特”作为设置,它们运行良好。(这可以通过一个新的项目复制)
Xcode→首选项→Locations→衍生数据→高级.→x唯一
https://stackoverflow.com/questions/32678065
复制相似问题