Is there a way to reset the app between tests in Swift XCTest UI?

You can add a “Run Script” phase to build phases in your test target to uninstall the app before running unit tests against it, unfortunately this is not between test cases, though. /usr/bin/xcrun simctl uninstall booted com.mycompany.bundleId Update Between tests, you can delete the app via the Springboard in the tearDown phase. Although, this does … Read more

XCTest/XCTest.h not found on old projects built in Xcode 6

Note: This may not be needed for any projects created in Xcode 7. CocoaPods had a fix for this here and here In order to fix this for any CocoaPod dependencies you need to add the following to FRAMEWORK_SEARCH_PATHS in any Pod target that requires XCTest (e.g. Kiwi, Specta, FBSnapshotTestCase, etc). $(PLATFORM_DIR)/Developer/Library/Frameworks This will allow … Read more

xcrun: error: unable to find utility “xctest”, not a developer tool or in PATH

Assuming you already have Xcode installed: Start Xcode, select “Preferences -> Locations”. Chances are that your Command Line Tools are not set. Select the suggested Xcode-tools location and you are done. Additional: You could check with: xcode-select -p which tools are set, mine showed: /Library/Developer/CommandLineTools After the location in the preferences was set, it showed: … Read more

Xcode Unit Testing with Cocoapods

I had the same issue. I solved it by moving pod ‘Firebase’ to my test target. Change your Podfile to this: platform :ios, ‘9.0’ use_frameworks! inhibit_all_warnings! target ‘MyApp’ do pod ‘Firebase/Auth’ pod ‘Firebase/Database’ pod ‘Firebase/Storage’ target ‘MyAppTests’ do inherit! :search_paths pod ‘Firebase’ end end

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)