XCUITest获取/跟踪使用Application完成的所有UI交互

时间:2018-03-07 15:24:11

标签: ios xcode

我使用Apple的XCTest框架编写了一些UI测试。

在运行测试时,会在控制台日志上打印某些交互,这些交互也会存储在派生数据中的TestSummaries.plist中。

有没有办法在XCTestObservations或其他地方的运行时间内访问所有互动?

我所说的摘要通常如下所示:

t =    13.42s             Snapshot accessibility hierarchy for an app with pid 11283
t =    13.44s             Find: Descendants matching type Alert
t =    13.44s             Find: Identity Binding
t =    13.44s             Find: Descendants matching type Button
t =    13.44s             Find: Elements matching predicate 'userTestingAttributes CONTAINS "cancel-button"'
t =    13.45s             Snapshot accessibility hierarchy for app with pid 11283
t =    13.47s             Find: Descendants matching type Alert
t =    13.47s             Find: Identity Binding
t =    13.47s             Find: Descendants matching type Button
t =    13.47s             Find: Elements matching predicate 'userTestingAttributes CONTAINS "cancel-button"'
t =    13.47s             Tap Button
t =    13.47s                 Wait for com.apple.springboard to idle
t =    13.52s                 Find the Button
t =    13.52s                     Snapshot accessibility hierarchy for app with pid 11283
t =    13.54s                     Find: Descendants matching type Alert
t =    13.54s                     Find: Identity Binding
t =    13.54s                     Find: Descendants matching type Button
t =    13.54s                     Find: Elements matching predicate 'userTestingAttributes CONTAINS "cancel-button"'
t =    13.65s                     Wait for com.apple.springboard to idle
t =    13.70s                 Synthesize event
t =    13.80s                 Wait for com.apple.springboard to idle
t =    13.86s             Snapshot accessibility hierarchy for app with pid 11283
t =    13.87s             Find: Descendants matching type Alert

0 个答案:

没有答案