【问题标题】:Xcode 7 - How to initiate interface recording for UI Testing?Xcode 7 - 如何为 UI 测试启动界面录制?
【发布时间】:2015-11-20 20:33:06
【问题描述】:

我正在查看 WWDC 2015 session 104 “What's new in Xcode”,发现在 Xcode 7 中我可以记录界面单元测试以自动单击按钮、输入文本等。

我创建了一个包含 UITests 的新项目,但我如何真正开始记录 UITests 的界面交互?

这是测试中包含的 sn-p:

- (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];
}

【问题讨论】:

    标签: xctest ios9 xcode7 xcode-ui-testing


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2015-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-10
      • 1970-01-01
      • 2016-01-03
      相关资源
      最近更新 更多