I am trying to add and run user interface automation tests with Xcode 7 in an older project. Here is what I did:
Now, when I try to run the recorded test, I get the following error:
failed: caught "NSInternalInconsistencyException", "No target application path specified in test configuration: testBundleURL: file ///xxxxxxxxxxx/PlugIns/PageonceUITests.xctest/ productModuleName: (zero) testsToSkip: (zero) testsToRun: null (testToRunes: null) no sessionIdentifier: <__NSConcreteUUID 0x7fc818d181a0> 7045B650-CDAF-4EC9-9738-83F78E1514D8 pathToXcodeReportingSocket: (null) disablePerformanceMetrics: no treatMissingBaselinesAsFailures: noApplePrice (target) null targetPileFileFileNullPathFile
This error seems to be complaining about the "Target Testing" field selected when adding the target user interface test. Does the "Target Application" property in the "Target Target Target" → "General" section correctly show your main application? A happy configuration would look like this:
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
Perhaps this is due to some problems with the settings of Target .
Try the following.
He works.
I had the same problem and solved it without using the Legacy build location as described in this answer: fooobar.com/questions/188980 / ...
If I use "Legacy", UI tests may be recorded, but it fails when trying to run them. Using "Unique" as a setting, and they work fine. (this can be reproduced using a new project)
Xcode → Preferences → Location → Derived Data → More ... → [x] Unique
I had the same problem on a physical iPad. When I finally deleted the application and all its data, and then turned off and restarted the device, the problem was resolved.
You should add to your goal UITest , in the relative section " Build Settings ", your own custom settings property:
with keys:
TEST_TARGET_NAME : YourTargetNameUSES_XCTRUNNER : YES (optional)
TEST_TARGET_NAME
YourTargetName
USES_XCTRUNNER
YES
Now you can run your user interface tests.