The Developer Preview for Android 11 is now available; test it out and share your feedback.

ComposeTestCaseSetup

interface ComposeTestCaseSetup
androidx.ui.test.ComposeTestCaseSetup

Helper interface to run execution-controlled test via ComposeTestRule.

Summary

Public methods

abstract Unit

Takes the content provided via ComposeTestRule#setContent and runs the given test instruction.

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Public methods

performTestWithEventsControl

abstract fun performTestWithEventsControl(block: ComposeExecutionControl.() -> Unit): Unit

Takes the content provided via ComposeTestRule#setContent and runs the given test instruction. The test is executed on the main thread and prevents interference from Activity so the frames can be controlled manually. See ComposeExecutionControl for available methods.