ref _ https://developer.android.com/training/testing/unit-testing/local-unit-tests#android-builders
두 가지 프레임워크가 있다.
- Roboletric
@ If you have dependencies on the Android framework, particularly those that create complex interactions with the framework, it's better to include framework dependencies using Robolectric. = 대충 복잡한 작용 또는 복잡한 디펜던시 구성에서 사용된다는 뜻
Roboletric 사용 시
app/build.gradle
android {
// ...
testOptions {
unitTests.includeAndroidResources = true
}
}
추가
- Mockito
@ If your tests have minimal dependencies on the Android framework, or if the tests depend only on your own objects, it's fine to include mock dependencies using a mocking framework like Mockito. = 대충 미니멀한 디펜던시 또는 내가 만든 객체에서의 테스트를 할 때 사용된다는 뜻