Xcode 7 - UI测试如何启动接口录制?
Xcode 7 - How to initiate interface recording for UI Testing?
我正在看 WWDC 2015 session 104 "What's new in Xcode" 并在 Xcode 7 中看到我可以记录界面单元测试以自动点击按钮、输入文本等.
我创建了一个包含 UITest 的新项目,但是我如何真正开始记录 UITest 的界面交互?
这是测试中包含的片段:
- (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];
}
录制按钮是主文本编辑器左下角的红色按钮。
当您不在可以录制的方法中时,该按钮将变灰。
我正在看 WWDC 2015 session 104 "What's new in Xcode" 并在 Xcode 7 中看到我可以记录界面单元测试以自动点击按钮、输入文本等.
我创建了一个包含 UITest 的新项目,但是我如何真正开始记录 UITest 的界面交互?
这是测试中包含的片段:
- (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];
}
录制按钮是主文本编辑器左下角的红色按钮。 当您不在可以录制的方法中时,该按钮将变灰。