2017-12-30 21 views
3

방금 ​​Kotlin으로 새 Android 애플리케이션을 만들었습니다.새로운 Android Kotlin 프로젝트에서 계측 된 테스트를 실행하지 못했습니다.

나는 그것이 실행되지 않습니다 기본 계측 테스트를 실행하려고하고 나에게이 메시지를 표시 한

:

Class not found: "oussaki.com.pos.ExampleInstrumentedTest"Empty test suite. 

를이 내가 실행하기 위해 노력하고있어 계측 테스트 클래스 :

@RunWith(AndroidJUnit4::class) 
class ExampleInstrumentedTest { 
    @Test 
    fun useAppContext() { 
     // Context of the app under test. 
     val appContext = InstrumentationRegistry.getTargetContext() 
     assertEquals("oussaki.com.pos", appContext.packageName) 
    } 
} 

enter image description here

+0

Logcat 장치를 확인하고 여기에 게시하십시오. 보통 이것은 테스트 러너 자체의 충돌 때문에 발생합니다. –

+0

이 오류는 기기와 관련이 없으며 Kotlin 및 AndroidTests와 관련된 문제이므로 로그가 없습니다. – Oussaki

답변

3

이것은 알려진 문제입니다 : https://issuetracker.google.com/issues/38452937 잘하면 다음 릴리스에서 수정 될 것입니다.

당분간 '설정 편집'으로 직접 이동하여 'Android 계측 테스트'에서 실행할 특정 클래스/메소드에 대한 구성을 추가 할 수 있습니다.

또한 최신 카나리아 빌드 : https://developer.android.com/studio/preview/index.html을 사용해 볼 수도 있지만 개인적으로는 내 프로젝트에서 작동하는 데 문제가 있습니다.

관련 문제