-
Book Overview & Buying
-
Table Of Contents
Modern Android 13 Development Cookbook
By :
Testing your Worker implementation is crucial, as it helps ensure your code is well handled and your team follows the proper guidelines for writing great code. This will be an integration test, which means we will add our code to the androidTest folder. This recipe will look into how to add tests for your worker.
To follow along with this recipe, you need to have completed all previous recipes of this chapter.
Follow these steps to get started with testing WorkManager. We will look at examples in this recipe:
build.gradle file:androidTestImplementation("androidx.work:work-testing:$work_version")In the scenario where something in the API changes in the future, there’s a stable version that you can use, and you can always find that in the documentation by following this link: https://developer.android.com/jetpack/androidx...