Xcode 7 - How to initiate interface recording for UI Testing?

蹲街弑〆低调 提交于 2019-12-10 19:59:32

问题


I'm looking at the WWDC 2015 session 104 "What's new in Xcode" and see that in Xcode 7 I can record interface unit tests to automate clicking on buttons, enter text, etc.

I have a new project created with UITests included, but how do I actually start recording interface interactions for UITests?

Here's the snippet included in the test:

- (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:


The record button is the red button in the bottom left corner of your main text editor. The button will be greyed out when you are not in a method that you can record into.



来源:https://stackoverflow.com/questions/32232780/xcode-7-how-to-initiate-interface-recording-for-ui-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!