我正在查看 WWDC 2015 session 104 “What's new in Xcode”,并看到在 Xcode 7 中我可以记录界面单元测试以自动单击按钮、输入文本等。
我创建了一个包含 UITests 的新项目,但我如何真正开始记录 UITests 的界面交互?
这是测试中包含的代码段:
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
self.continueAfterFailure = NO;
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
[[[XCUIApplication alloc] init] launch];
}