Android - Test code 작성시 추가해야할 header들

2022. 5. 16. 11:26IT/안드로이드

반응형

build.gradle ( Module: ***.app )

androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
testImplementation 'androidx.arch.core:core-testing:2.1.0'

Test Class 파일에 추가할 것들.

import androidx.test.ext.junit.runners.AndroidJUnit4
import com.example.cupcake.model.OrderViewModel
import junit.framework.TestCase.assertEquals
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import androidx.arch.core.executor.testing.InstantTaskExecutorRule

 

728x90
반응형

'IT > 안드로이드' 카테고리의 다른 글

Android - 인터넷에서 데이터 가져오기  (1) 2022.05.20
Android - Thread  (1) 2022.05.16
Android - Test 디렉터리 생성하기  (0) 2022.05.16
Android - Back Stack  (2) 2022.05.11
Android - Fragment 간 공유되는 ViewModel  (6) 2022.05.10