runAndroidComposeUiTest
Function
Android
@ExperimentalTestApi
inline fun <reified A : ComponentActivity> runAndroidComposeUiTest(
    effectContext: CoroutineContext = EmptyCoroutineContext,
    runTestContext: CoroutineContext = EmptyCoroutineContext,
    testTimeout: Duration = 60.seconds,
    noinline block: suspend AndroidComposeUiTest<A>.() -> Unit,
): TestResult
Variant of runComposeUiTest that allows you to specify which Activity should be launched. Be
aware that if the Activity sets content during its
launch, you cannot use setContent on the ComposeUiTest anymore as
this would override the content and can lead to subtle bugs.
Parameters
| A | The Activity type to be launched, which typically (but not necessarily) hosts the Compose content | 
| effectContext | The CoroutineContextused to run the composition. The context forLaunchedEffects andrememberCoroutineScopewill be derived from this context. If this context contains aTestDispatcherorTestCoroutineScheduler(in that order), it will be used for composition and theMainTestClock. | 
| runTestContext | The CoroutineContextused to create the context to run the testblock. By defaultblockwill run usingkotlinx.coroutines.test.StandardTestDispatcher.runTestContextandeffectContextmust not shareTestCoroutineScheduler. | 
| testTimeout | The Durationwithin which the test is expected to complete, otherwise a platform specific timeout exception will be thrown. | 
| block | The test function. | 
Android
@ExperimentalTestApi
fun <A : ComponentActivity> runAndroidComposeUiTest(
    activityClass: Class<A>,
    effectContext: CoroutineContext = EmptyCoroutineContext,
    runTestContext: CoroutineContext = EmptyCoroutineContext,
    testTimeout: Duration = 60.seconds,
    block: suspend AndroidComposeUiTest<A>.() -> Unit,
): TestResult
Variant of runComposeUiTest that allows you to specify which Activity should be launched. Be
aware that if the Activity sets content during its
launch, you cannot use setContent on the ComposeUiTest anymore as
this would override the content and can lead to subtle bugs.
Parameters
| A | The Activity type to be launched, which typically (but not necessarily) hosts the Compose content | 
| activityClass | The Classof the Activity type to be launched, corresponding toA. | 
| effectContext | The CoroutineContextused to run the composition. The context forLaunchedEffects andrememberCoroutineScopewill be derived from this context. If this context contains aTestDispatcherorTestCoroutineScheduler(in that order), it will be used for composition and theMainTestClock. | 
| runTestContext | The CoroutineContextused to create the context to run the testblock. By defaultblockwill run usingkotlinx.coroutines.test.StandardTestDispatcher.runTestContextandeffectContextmust not shareTestCoroutineScheduler. | 
| testTimeout | The Durationwithin which the test is expected to complete, otherwise a platform specific timeout exception will be thrown. | 
| block | The test function. | 
