Sir even if creating videos won't be possible, please provide some more Blogs for tests that use Roboelectric for testing like you showed in the previous one. Also, if you have a mailing list that notifies about these blogs, kindly tell me I would love to subscribe to it for regular updates from you!
If you have a view model with a lot of dependencies you have to instantiate every dependecy, right? Wouldn't it be better to mock all viewmodel dependencies and UNIT test ONLY the view model? I can see that here you're testing more the repository than the view model.
Agreed its an integration test according to me, its slow executes end to end. For unit test a spy/mock should have been used for db. Testing that method is called with right values is enough for unit testing, but for integration test we need to test that data is getting persisted when a method is called on view model
Hey Belal. Thank you for your video. I like your way of presentation and you give a lot of useful information. Mostly we are supposed to write unit test lot to our codebase rather than UI and instrumentation testing because testing should be fast. Unit test is fast and other tests are ( instrumentation) a little slow compare to the Unit test. Here in the ViewModelTestClass, ViewModel only should be tested in the Unit test but here DAO class also is tested so it looks like it violates the unit test rules. ViewModel should be tested with unit test and dependency of the ViewModel should be mocked with ( Mockito or another mock library). or else we can use Roboelectric. It looks like these all videos come under the (Android test-driven development) but it is not TDD it is instrumentation testing. Please correct me If I am wrong.
Really good, tx. Quick question. If my live data can post not only for a value, but also a spinner for "while loading from network", like we have in many mvvm example... livedata.post(Resource.Loading) ... livedate.post(Resource.Success(data)) Will the latch be 2? And on the onChange method, I will need to skip this loading phase?
Hi belal ,ur tutorials are really helpful,but i just wanna give a suggestion kindly make the getting source code process easy like other chnnels ,even if i am subscribed to ur channel it shows subscribe channel and doesnt allow me to get access link
Sir, kindly explain OOP with professional examples for interview success and make a series for 1+ year of experienced Android developer interview questions. Thank you
Sir even if creating videos won't be possible, please provide some more Blogs for tests that use Roboelectric for testing like you showed in the previous one. Also, if you have a mailing list that notifies about these blogs, kindly tell me I would love to subscribe to it for regular updates from you!
Again awesome sir 🙏🙏.. Let me try flow instead of Live Data..
please make same video with dagger hilt
If you have a view model with a lot of dependencies you have to instantiate every dependecy, right? Wouldn't it be better to mock all viewmodel dependencies and UNIT test ONLY the view model? I can see that here you're testing more the repository than the view model.
Agreed its an integration test according to me, its slow executes end to end. For unit test a spy/mock should have been used for db. Testing that method is called with right values is enough for unit testing, but for integration test we need to test that data is getting persisted when a method is called on view model
Hey Belal.
Thank you for your video.
I like your way of presentation and you give a lot of useful information.
Mostly we are supposed to write unit test lot to our codebase rather than UI and instrumentation testing because testing should be fast. Unit test is fast and other tests are ( instrumentation) a little slow compare to the Unit test.
Here in the ViewModelTestClass, ViewModel only should be tested in the Unit test but here DAO class also is tested so it looks like it violates the unit test rules.
ViewModel should be tested with unit test and dependency of the ViewModel should be mocked with ( Mockito or another mock library). or else we can use Roboelectric.
It looks like these all videos come under the (Android test-driven development) but it is not TDD it is instrumentation testing.
Please correct me If I am wrong.
Sir Hindi Urdu video plz 🙏
Bro can you make video series on JetPack compose
The refresh is not working on the page to get the source code
thanks. i am waiting for more tutorials on android testing
do with Dagger
Thank you!!
Really good, tx.
Quick question.
If my live data can post not only for a value, but also a spinner for "while loading from network", like we have in many mvvm example...
livedata.post(Resource.Loading)
...
livedate.post(Resource.Success(data))
Will the latch be 2?
And on the onChange method, I will need to skip this loading phase?
Hi belal ,ur tutorials are really helpful,but i just wanna give a suggestion kindly make the getting source code process easy like other chnnels ,even if i am subscribed to ur channel it shows subscribe channel and doesnt allow me to get access link
registered and subscribed but unable to open GIT link
in real companies which case is used? this method or a fake repository for run tests on JVM?
Sir work on Instrumental testing topics.
Sir, kindly explain OOP with professional examples for interview success and make a series for 1+ year of experienced Android developer interview questions. Thank you
Thank you for your video.
thanks you sir
thanks
YOU BEST!
Thanks for the great effort ❤️
androidTest folder is using for UI tests. not for unit tests
both Instrumented Unit Test and UI Test are created inside this folder. I covered Instrumented Unit Test in this lesson.
Please create RxJava tutorials