2014-02-06 3 views
2

내 문제는 내가 in the pdf 주어진 단계를 따라했습니다 여기 Test run failed: Instrumentation run failed due to 'Process crashed.' when testing multiple Android activity
보다는 조금 다른 것 같다. 테스트 프로젝트 "TestAndroidCalculatorBlackbox"를 만들었습니까 (Robotium의 "시작하기"링크에서 메모장 프로젝트를 만들려고하는 이유가 될 수 있습니다),
및 두 개의 프로젝트 하나의 테스트와 하나의 주 프로젝트가 있어야합니다. 추가 된 병 robotium-solo-5.0.1.jar, robotium-solo-1.6.0.jarsolo. 함수 및 jay.way package 아래의 빨간색 오류 줄을 제거합니다. 이 Project tree and error screen shot y를 AndroidManifest.xml에 : 나는 패키지 장비 목록에 추가 한
안드로이드 테스트 프로젝트 오류와 충돌한다 "테스트 실행에 실패했습니다 '. 프로세스가 충돌'로 인해 실패 계측 실행"

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.testcalculator" 
    android:versionCode="1" 
    android:versionName="1.0" > 

    <uses-sdk android:minSdkVersion="8" /> 

    <instrumentation 
     android:name="android.test.InstrumentationTestRunner" 
     android:targetPackage="com.testcalculator" /> 

    <application 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" android:debuggable="true"> 
     <uses-library android:name="android.test.runner" /> 
    </application> 

</manifest> 

하고 :

c:\> adb shell pm list instrumentation 
instrumentation:PACKAGE.test.test/android.test.InstrumentationTestRunner (target=PACKAGE) 
instrumentation:PACKAGE.test.test.test.test.test.test/android.test.InstrumentationTestRunner (target=PACKAGE.test.test) 
instrumentation:com.example.android.apis/.app.LocalSampleInstrumentation (target=com.example.android.apis) 
>> instrumentation:com.testcalculator/android.test.InstrumentationTestRunner (target=com.testcalculator) << 

답변

3
  1. 이 부착하지 마십시오
    나는 오류 스크린 샷을 첨부하고 둘 이상의 로봇 라이브러리. robotium-solo-1.6.0.jar는 제거해야합니다. 더 이상 사용하지 않아야합니다.

  2. 대상 응용 프로그램이 이미 설치되어 있습니까? 테스트를 실행하려면 설치해야합니다. 테스트 프로젝트에 대상 프로젝트에 대한 참조가있는 경우에만 설치할 수 있습니다.

  3. 애플리케이션 및 계측을 위해 별도의 APK가있는 경우 매니페스트에서 패키지를 변경해야합니다. 당신은 실제로 "com.testcalculator"를 가지고 있고 대상 패키지는 동일합니다 - 그들은 달라야합니다. 그런데 프로젝트에 응용 프로그램 소스가 보이지 않으므로 응용 프로그램 부분을 제거해야합니다.

  4. LogCat에서 stacktrace를 게시하는 것이 좋습니다. 신난다 !!까지가-투표

    http://developer.android.com/tools/testing/testing_android.html https://code.google.com/p/robotium/w/list

+0

을 설정하여 고정 :

  • 읽기 매뉴얼 당신은 쓰기 테스트를 시작하기 전에 애플리케이션 부분을'AndroidManifest.xml'에 주석 처리했습니다. 테스트가 실패했습니다 : 'java.lang.ClassNotFoundException'때문에 계측 실행에 실패했습니다. 오류로 인해 테스트를 실행하지 않습니다. 아마도'LAUNCHER_ACTIVITY_FULL_CLASSNAME = "com.calculator.Main"'이 틀렸을 것입니다. 하지만 내가 무엇을 해야할지 모르겠다. (나는'AndroidManifest.xml'에서'application project'와 application 태그를 제거했다.) – paul

  • +0

    어떤 클래스가 발견되지 않습니까? LogCat 사용 – maszter

    관련 문제