Group Group Group Group Group Group Group Group Group

How to MVVM Testing?

#1

I would like to know how do you write MVVM testing on Android.

Do you face any challenges? Do you user unit test for model-view and model? And the Instrumented test for View? Do you have any repository with real examples of MVVM and testing? Does using Android ModelView Jetpack make it easy to write JVM unit test? Will raywenderlich post videos focusing on writing tests for MVVM Android?

#2

@macsimus Can you please help with this when you get a chance? Thank you - much appreciated! :]

#3

Hi Amadeu, thanks for the question!

We just finished recording an “MVVM for Android” video course that shows how to do Model and ViewModel JUnit unit testing, including using the Architecture Component ViewModel class from Jetpack. Look for that video course to be available in 1-2 weeks.

Also, you can check out our recent tutorial on Android TDD, in which Victoria Gonda shows you how to do ViewModel instrumentation testing while doing Test-Driven Development:

https://www.raywenderlich.com/7109-test-driven-development-tutorial-for-android-getting-started

Both the video course and TDD tutorial include code examples where you can see testing within the Android sample projects.

Thanks again for the question!

2 Likes
#4

Thanks for your reply! I’m looking forwarding to see the MVVM for android course!

#5

Hi @macsimus when will be released the new MVVM for Android course?

#6

@amadeu01 Here is the course link - we have just released it yesterday:

https://www.raywenderlich.com/8984-mvvm-on-android

I hope it helps!

1 Like
opened #10