Issue
I am new to android unit testing, right now I am using Robolectric for that purpose and I got in some tutorial they are using
@RunWith(RobolectricTestRunner.class)
and some are using @RunWith(RobolectricGradleTestRunner.class)
, so what is the difference between them
Solution
RobolectricTestRunner is a test runner for Robolectric which provides a simulation of the Android runtime environment.
In fact, RobolectricGradleTestRunner extends RobolectricTestRunner. And if you use custom setting, it's better for you to use RobolectricGradleTestRunner. For example, more than two build types and build flavors to compute the resource, asset, and AndroidManifest paths.
Answered By - Felix Shin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.