Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run UI Testing on older project

I'm trying to add and run UI Automation tests with Xcode 7 on an older project. Here's what I did:

  1. Added a new UI Testing target
  2. Changed the compiler version of that target to Default compiler (Apple LLVM 7.0)
  3. Recorded a test using the iPhone 6 Plus iOS9 simulator (worked like a charm)

Now, when I try to run the recorded test I get the following error:

failed: caught "NSInternalInconsistencyException", "No target application path specified via test configuration: 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)

like image 471
YogevSitton Avatar asked Sep 20 '15 09:09

YogevSitton


2 Answers

This error seems to be complaining about "Target to be tested" field selected while adding UI Test Target.Does your "Target Application" property under UI Test Target -> General tab correctly shows your main app selected? A happy config 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
like image 99
Sushant Avatar answered Oct 20 '22 02:10

Sushant


Its might be due to some issue with your Target settings.

Try the following.

  1. Delete the existing target .
  2. Create a new Target by selecting "iOS UI Testing bundle" again.
  3. Then link your test files one by one.

It works.

like image 32
arango_86 Avatar answered Oct 20 '22 03:10

arango_86