2014 • In my free time I • " enjoy bouldering • # host a pub quiz • $ travel a lot • % Programming languages & developer tools • ❤ Swift is my favorite • ✅ Loooove green checkmarks in tests • ( Twitter: @xavierLowmiller 3
years old • Not created with testing in mind • Xcode has really nice support for tests and reports • Testing in the Simulator has a ton of overhead • If you can get away with it, run your tests without a host app 6
= viewController window.makeKeyAndVisible() // When viewController.cancelButtonTapped() // Then let presented = viewController.presentedViewController as UINavigationController? XCTAssertNotNil(presented) let infoVC = presented ?.topViewController XCTAssert(infoVC is InfoAlertViewController) } 11
let date = Date() return date.formatted() // ... } func testShowTodaysDate() { XCAssertEqual(today, "April 11th, 2019") // This test will fail tomorrow ... } 20