Android 테스트 프레임 워크를 설정하려고합니다.Android 명령 줄 테스트
내가 실행 android create test-project -m ../ -n BOLDAppTest -p tests
나는 ~/boldapp/BOLDApp/
에서 프로젝트가 나는 내가 http://developer.android.com/tools/testing/testing_otheride.html에 따라 다음을 수행 한 http://developer.android.com/tools/testing/testing_android.html#TestProjects
에 설명 된대로 내가 ~/boldapp/BOLDApp/tests
에서 테스트 프로젝트에 의해이 있어야 결정
생성 된 Instrumentation 테스트 사례 MainActivityTest.java
을 실행하려고합니다. 내가 실행하면 제안
는 ant run-tests
는, 내가 얻을 : 내가 교대로 출력 ant test
부분을 실행
BUILD FAILED
Target "run-tests" does not exist in the project "BOLDAppTest".
은 다음과 같습니다
test:
[echo] Running tests ...
[exec] INSTRUMENTATION_STATUS: id=ActivityManagerService
[exec] INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{au.edu.unimelb.boldapp.tests/android.test.InstrumentationTestRunner}
[exec] INSTRUMENTATION_STATUS_CODE: -1
[exec] android.util.AndroidException: INSTRUMENTATION_FAILED:
내가 아니라 내가 실행할 때 위와 같은 오류가
adb shell am instrument -w au.edu.unimelb.boldapp.tests/android.test.InstrumentationTestRunner
: 나는 실행할 때뿐만 아니라
:
adb shell am instrument -w au.edu.unimelb.boldapp/android.test.InstrumentationTestRunner
테스트를 어떻게 실행합니까?
adb 쉘 pm list instrumentation을 실행할 때 출력이 없습니다. 나는 장치가 필요하다는 것을 몰랐다. "ant emma debug install test"를 실행하면 작동합니다. – oadams
축하합니다. 하지만 엠마가 무엇을 의미하는지 알고 있습니까? –