I'm at the state where I want to write androidTests for the app.
Reading the docs of Testing Compose, I created a file and write a simple test to examine the progress:
ExamineTest.kt:
class ExamineTest {
@get:Rule
val composeTestRule = createComposeRule()
@Test
fun atLaunchDefaultTextExists() {
composeTestRule.setContent {
Text(text = "text")
}
composeTestRule.onNodeWithText("text").assertIsDisplayed()
}
}
Also I added the debug AndroidManifest at the app/src/debug/ to enable ComposeActivity as suggested in docs.
However, by running the test nothing will happen and the test will not start executing.
Here's the state that test gets stock at (App is built and deployed. But not started to run tests. Normal execution of app works correctly):
Am I missing a part on the setup ? What is the reason that tests are not running?
compose: 1.0.0-alpha05 AS: 4.2-canary 14
Update
After debugging the test and check it's logs, I see this error:
No method shouldWaitForActivitiesToComplete() in
androidx/test/runner/AndroidJUnitRunner
