android - Difference between InstrumentationTestCase and AndroidTestCase -
i've been looking @ answer: http://stackoverflow.com/a/2055455/281460 , great job of explaining different test classes available unit/integration testing in android. 1 thing not explain, though, difference between instrumentationtestcase
, other test case classes, androidtestcase
.
could shed lite on this?
from docs:
instrumentationtestcase
a test case has access instrumentation.
androidtestcase
extend if need access resources or other things depend on activity context.
androidtestcase
pretty summarized via link posted. instrumentationtestcase
higher class hierarchy activityinstrumentationtestcase2
. it's heavier weight plain androidtestcase
, exposes instrumentation
object , no activity
, limiting usefulness.
in reality, you'll never need class, because doesn't offer much (if any) performance advantage on activityinstrumentationtestcase2
, offers access instrumentation
object itself. in case, if want know can instrumentation
object, check out this or this.
android unit-testing testing junit
No comments:
Post a Comment