Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

WorkManager Testing is a library for testing app code that runs using WorkManager.

This testing library provides a way to manually initialize WorkManager for tests by using WorkManagerTestInitHelper. Once initialized, you can use getTestDriver(android.content.Context) to drive constraints and timing-related triggers for your background work.

For ease of testing, this library defaults to using a synchronous Executor; you can change this in the Configuration if you wish.


TestDriver Additional functionality exposed for WorkManager that are useful in the context of testing. 


SynchronousExecutor Is an implementation of a Executor which executes Runnable's synchronously. 
TestListenableWorkerBuilder<W extends ListenableWorker> Builds instances of ListenableWorker which can be used for testing. 
TestWorkerBuilder<W extends Worker> Builds instances of Worker which can be used for testing. 
WorkManagerTestInitHelper Helps initialize WorkManager for testing.