我使用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