1

I'm attempting to set up the android testing framework.

I have a project in ~/boldapp/BOLDApp/

I decided I should have by test project in ~/boldapp/BOLDApp/tests as described in http://developer.android.com/tools/testing/testing_android.html#TestProjects

I have done the following as per http://developer.android.com/tools/testing/testing_otheride.html :

I run android create test-project -m ../ -n BOLDAppTest -p tests

I now want to run the Instrumentation test case MainActivityTest.java that was generated.

When I run ant run-tests, as suggested, I get:

BUILD FAILED
Target "run-tests" does not exist in the project "BOLDAppTest".

When I alternatively run ant test part of the output is:

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:

I get the same error as above when I run adb shell am instrument -w au.edu.unimelb.boldapp.tests/android.test.InstrumentationTestRunner:

as well as when I run:

adb shell am instrument -w au.edu.unimelb.boldapp/android.test.InstrumentationTestRunner

How do I run the test?

1 Answer 1

2

you must.haven't installed test apk successfully in your device. you can check by execute adb shell "pm list instrumentation".

Sign up to request clarification or add additional context in comments.

2 Comments

I get no output when I run adb shell pm list instrumentation. I didn't realise I needed a device. When I run "ant emma debug install test" it works.
Congratulations. But do you know what does emma means for?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.