리포지토리를 복제하고 테스트를 실행하려고했습니다. 어떤 시험이 발견되지 않음Junit 4가 테스트를 인식하지 못합니다.
: 불행하게도, JUnit 4에서는 내가 GUI는 시도가 테스트를로드 한 후 말한다 수동
테스트를 추가 한 디렉토리를 인식하지 못합니다.
테스트가 완료되었습니다.
빈 테스트 슈트.
이
내가(이 기본 작동하지 않습니다 의심하지 않습니다 파일입니다) 다른 프로젝트에 의해 copypasted ExampleUnitTest
내 디렉토리입니다 그리고 이것은 내 build.gradle
입니다 :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
testApplicationId "com.commonsware.android.retrofit.test"
}
}
dependencies {
compile 'com.squareup.retrofit:retrofit:1.6.1'
compile 'de.greenrobot:eventbus:2.2.1'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:rules:0.4.1'
}
여기에서 요청한대로 ExampleUnitTest 및 Run/Debug Configurations의 내용을 편집하십시오.
package com.commonsware.android.retrofit;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
시험을 볼 수 있습니까? – ligi
'ExampleUnitTest'를 보여주십시오. '@ Test' 주석으로 표시된 메소드가 있는지 확인하십시오. 또한 사용중인 실행 구성을 표시하면 도움이 될 수도 있습니다. –
메인 포스트에 실행/디버그가 추가되었습니다. – trocchietto