Xcode 7 - 如何启动UI测试的界面录制?

3
我正在查看WWDC 2015第104节“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];
}
1个回答

11

记录按钮位于主文本编辑器的左下角,为红色按钮。 当您不在可以录制的方法中时,该按钮将变灰。

Xcode UI test record button


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接