integration between different parts and units of the app • Usually done against mock data • UI Test: Mainly refers to as functional testing, aims to test product integration with other services • Usually done against production code
setups • Customize data store and services • More details: https://marcosantadev.com/fake- appdelegate-unit-testing-swift/ let isRunningTests = NSClassFromString("XCTestCase") != nil let appDelegateClass = isRunningTests ? NSStringFromClass(TestAppDelegate.self) : NSStringFromClass(AppDelegate.self) UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, nil, appDelegateClass)
“Reset Warning” on simulator and “Reset Settings” on device • Run before each UITest test case • resetAuthorizationStatus added in Xcode 11.4 • Access Settings app let settings = XCUIApplication(bundleIdentifier: "com.apple.Preferences")
What's New in Testing (WWDC 2018) • Testing in Xcode • John Sundell • Getting started with Xcode UI testing in Swift • Reduce Flakiness in Swift test • UIKonf 2018 - The Magic of UI Testing • Earlgrey