Skip to content

Instantly share code, notes, and snippets.

@marcosholgado
Created April 12, 2019 09:17
Show Gist options
  • Select an option

  • Save marcosholgado/9fb371b893341a5195b3fc3fab40fd9d to your computer and use it in GitHub Desktop.

Select an option

Save marcosholgado/9fb371b893341a5195b3fc3fab40fd9d to your computer and use it in GitHub Desktop.
class SecondTest : JankTestBase() {
@JankTest(
beforeTest = "launchApp",
expectedFrames = EXPECTED_FRAMES,
defaultIterationCount = 1
)
@GfxMonitor(processName = PACKAGE_NAME)
fun testSecond() {
for (i in 0 until INNER_LOOP) {
val appViews = UiScrollable(UiSelector().scrollable(true))
appViews.setAsVerticalList()
appViews.scrollTextIntoView("This is item 24")
appViews.scrollTextIntoView("This is item 1")
}
SystemClock.sleep(200)
}
companion object {
private const val INNER_LOOP = 2
private const val EXPECTED_FRAMES = 450
private const val PACKAGE_NAME = "com.marcosholgado.performancetest"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment