Skip to content

Instantly share code, notes, and snippets.

@marslin1220
Created February 21, 2020 08:33
Show Gist options
  • Save marslin1220/07b8a4d43dd3d2ba065123217ad8474b to your computer and use it in GitHub Desktop.
Save marslin1220/07b8a4d43dd3d2ba065123217ad8474b to your computer and use it in GitHub Desktop.
// 1.
@available(iOS 13.0, *)
func testMeasureSPFCascadeScrollingAsAnXtraUser() {
let options = XCTMeasureOptions()
options.invocationOptions = [.manuallyStart, .manuallyStop] //< 2.
// 3.
measure(metrics: [SlowFrameMetric()], options: options) {
app.launch()
// do some stuff..
// 4.
startMeasuring()
// interact with the app, like scrolling or swiping
stopMeasuring()
// do some other stuff..
app.terminate()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment