13. func testShouldDisplayAlertWithText(){
// run 10 times and measure performance during it.
// Fail if the performance decrease from baseline.
measureMetrics([XCTPerformanceMetric_WallClockTime],
automaticallyStartMeasuring: true, forBlock: {
self.app.buttons["show alert"].tap()
self.app.alerts["Cool title"].collectionViews.buttons["OK"].tap()
XCTAssertFalse(self.app.alerts["Cool title"].exists)
})
}
https://github.com/KazuCocoa/XCUITestExample/commit/797c8b4b6cb1c91c81fd3a96eb669d834d4b49e1