android-testing
android-testing copied to clipboard
[Codelab Issue] Testing Codelab 5.1, Step 9 - "Test events were not received"
Describe the problem Test code provided will not run in step 9
In which lesson and step of the codelab can this issue be found? 5.1 step 9
How to reproduce? Copy + paste example code from step 9 and run test
Versions Arctic Fox 2020.3.1 Patch 4
Additional information Multiple issues with code provided
- dependency versions not included in build.gradle (hamcrest and others)
- trying to run code from steps 8 and 9 result in "Test events were not received" error (see log error below)
- trying to run code from end_codelab_1 branch also results in this output from the log:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:testDebugUnitTest'.
> No tests found for given includes: [com.example.android.architecture.blueprints.todoapp.tasks.TasksViewModelTest.addNewTask_setsNewTaskEvent](filter.includeTestsMatching)
codelab: advanced-android-kotlin
Describe the problem Test code provided will not run in step 9
In which lesson and step of the codelab can this issue be found? 5.1 step 9
How to reproduce? Copy + paste example code from step 9 and run test
Versions Arctic Fox 2020.3.1 Patch 4
Additional information Multiple issues with code provided
- dependency versions not included in build.gradle (hamcrest and others)
- trying to run code from steps 8 and 9 result in "Test events were not received" error (see log error below)
- trying to run code from end_codelab_1 branch also results in this output from the log:
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:testDebugUnitTest'. > No tests found for given includes: [com.example.android.architecture.blueprints.todoapp.tasks.TasksViewModelTest.addNewTask_setsNewTaskEvent](filter.includeTestsMatching)codelab: advanced-android-kotlin
I have the same issues on my m1 macbook, if you meet this issues on m1 device, try to update room version in build.gradle : up to -> roomVersion = '2.4.0-alpha03'
In addition to changing the roomVersion to '2.4.0-alpha03', I had to change the project default JDK in Android Studio:
- Double-press Shift, type "Gradle JVM", select it
- Under Gradle JDK, select "Download JDK"
- Choose Azul 15 (aarch64)
- Rebuild project