Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

[Codelab Issue] Testing Codelab 5.1, Step 9 - "Test events were not received" #274

Open
a-champagne opened this issue Jan 24, 2022 · 2 comments

Comments

@a-champagne
Copy link

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

@dothanhnha
Copy link

dothanhnha commented Feb 16, 2022

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'

@lindboe
Copy link

lindboe commented Jul 16, 2023

In addition to changing the roomVersion to '2.4.0-alpha03', I had to change the project default JDK in Android Studio:

  1. Double-press Shift, type "Gradle JVM", select it
  2. Under Gradle JDK, select "Download JDK"
  3. Choose Azul 15 (aarch64)
  4. Rebuild project

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants