jayway의 maven-android-plugin으로 자동 테스트를 위해 Android 계측 테스트를 실행하는 방법은 무엇입니까?Maven은 Android 계측 테스트를 실행하지 않습니다
apidemos-android-16을 확인하고 mvn clean install
으로 실행했지만 7 단위 테스트 만 실행되었습니다. 예를 들어 Focus2ActivityTest
이 실행되지 않았습니다. mvn android:instrument
도 같은 결과를 얻습니다.
메이븐 출력 :
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Emulator emulator-5554_myDefaultAVD_unknown_google_sdk found.
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Successfully installed C:\dev\jayway-maven-android-plugin-samples\apidemos-android-16\instrumen
tationtests\target\instrumentationtests-1.0.0-SNAPSHOT.apk to emulator-5554_myDefaultAVD_unknown_google_sdk
[INFO]
[INFO] --- android-maven-plugin:3.7.0:internal-integration-test (default-internal-integration-test) @ instrumentationtests ---
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Emulator emulator-5554_myDefaultAVD_unknown_google_sdk found.
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Running instrumentation tests in com.example.android.apis.tests
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Run started: com.example.android.apis.tests, 7 tests:
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Start [1/7]: com.example.android.apis.ApiDemosApplicationTests#testPreconditions
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : End [1/7]: com.example.android.apis.ApiDemosApplicationTests#testPreconditions
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Start [2/7]: com.example.android.apis.app.LocalServiceTest#testPreconditions
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : End [2/7]: com.example.android.apis.app.LocalServiceTest#testPreconditions
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Start [3/7]: com.example.android.apis.app.LocalServiceTest#testStartable
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : End [3/7]: com.example.android.apis.app.LocalServiceTest#testStartable
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Start [4/7]: com.example.android.apis.os.MorseCodeConverterTest#testCharacterS
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : End [4/7]: com.example.android.apis.os.MorseCodeConverterTest#testCharacterS
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Start [5/7]: com.example.android.apis.view.Focus2AndroidTest#testGoingLeftFromRightButtonGoesToCent
er
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : End [5/7]: com.example.android.apis.view.Focus2AndroidTest#testGoingLeftFromRightButtonGoesToCenter
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Start [6/7]: com.example.android.apis.view.Focus2AndroidTest#testGoingRightFromLeftButtonJumpsOverC
enterToRight
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : End [6/7]: com.example.android.apis.view.Focus2AndroidTest#testGoingRightFromLeftButtonJumpsOverCen
terToRight
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Start [7/7]: com.example.android.apis.view.Focus2AndroidTest#testPreconditions
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : End [7/7]: com.example.android.apis.view.Focus2AndroidTest#testPreconditions
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Run ended: 212 ms
[INFO] Tests run: 7, Failures: 0, Errors: 0
[INFO] emulator-5554_myDefaultAVD_unknown_google_sdk : Report file written to C:\dev\jayway-maven-android-plugin-samples\apidemos-android-16\instrumen
tationtests\target\surefire-reports\TEST-emulator-5554_myDefaultAVD_unknown_google_sdk.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:05.798s
[INFO] Finished at: Tue Oct 15 22:26:49 CEST 2013
[INFO] Final Memory: 23M/350M
[INFO] ------------------------------------------------------------------------
내 받는다는 버전 :
아파치 메이븐 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013년 2월 19일 14 : 51 : 28 + 0100)
메이븐 홈 C : \ Program Files \ Java \ jdk1.7.0_25 \ jre
(C : \ dev \ apache-maven-3.0.5 \,기본 로케일 : DE_DE, 플랫폼 인코딩 : Cp1252를
OS 이름 : "윈도우 8", 버전 : "6.2", 아치 : "AMD64"가족 :
내가 치어 몇 가지 구성 변경을 시도 "창" 성공없이 .xml. 뭐가 문제 야?
그것이 https://github.com/jayway/maven-android-plugin-samples/blob/master/apidemos-android-16/instrumentationtests/pom.xml
참조 : https://github.com/jayway/maven-android-plugin-samples/blob/master/apidemos-android-16/instrumentationtests /src/main/java/com/example/android/apis/view/Focus2ActivityTest.java –
답변이 업데이트되었습니다 ... –
맞습니다. 나는 그것을 매체로 바꿨다. –