Skip to content

테스트 #11

@whitequail

Description

@whitequail

로컬 단위 테스트(test)

  • $module-name/src/test/java/
  • 안드로이드 프레임워크와 관련 없이 할 수 있는 테스트들. (only JVM)

계측 테스트(androidTest)

  • $module-name/src/androidTest/java/
  • 안드로이드 프레임워크에 종속성이 있는 테스트.
  • 하드웨어 기기나 애뮬레이터에서 실행되는 테스트.
  • Instrumentation API 에 접근 가능.
  • 테스트하는 앱의 정보에 접근할 권한을 개발자에게 제공하므로,
    테스트 코드 상에서 테스트 앱을 제어 가능
  • 앱 APK와는 별개인 APK로 빌드되므로, 자체 AndroidManifest.xml 파일 필요.
    testImplementation 'junit:junit:4.13'
    testImplementation "androidx.arch.core:core-testing:2.1.0"
    testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.1"
    testImplementation "com.google.truth:truth:1.0.1"
    testImplementation 'androidx.test.ext:junit:1.1.2'
    testImplementation "org.robolectric:robolectric:4.4" 


    androidTestImplementation "junit:junit:4.13"
    androidTestImplementation "androidx.arch.core:core-testing:2.1.0"
    androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.1"
    androidTestImplementation "com.google.truth:truth:1.0.1"
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions