5
기본 테스트 실행에서 제외시킬 경로에 '통합'단어가있는 테스트를 실행하고 싶지만 별도의 작업으로 모두 함께 실행하고 싶습니다. AS에 Gradle을 동기화하면서android와 별도의 통합 테스트 작업
sourceSets {
androidTest.setRoot('src/test')
integrationTest.setRoot('src/test')
}
...
androidTestCompile 'junit:junit:4.11'
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.1'
androidTestCompile files('libs/android-junit-report-1.5.8.jar')
androidTestCompile 'com.squareup:fest-android:1.0.8'
androidTestCompile 'org.robolectric:robolectric:2.3'
integrationTestCompile 'junit:junit:4.11'
integrationTestCompile 'com.jayway.android.robotium:robotium-solo:5.1'
integrationTestCompile files('libs/android-junit-report-1.5.8.jar')
integrationTestCompile 'com.squareup:fest-android:1.0.8'
integrationTestCompile 'org.robolectric:robolectric:2.3'
...
androidTest {
include '**/*Test.class'
exclude '**/espresso/**/*.class'
exclude '**/integration/**'
}
task integrationTest(type: Test) {
include '**/integration/**'
}
이 오류가 발생합니다 : 현재 나는 기본 테스트 구성이
Warning: project ':ProjectName': Unable to resolve all content root directories
Details: java.lang.NullPointerException: null
을하지만 난 integrationTest 작업을 제거하는 경우가 발생하지 않습니다. 또한 작업의 현재와 나는 'integrationTest'작업을 실행할 수 있어요 그러나 이것은 또 다른 오류가 발생합니다 :
Error:Could not determine the dependencies of task ':ProjectName:integrationTest'.
A base directory must be specified in the task or via a method argument!