2

i am trying to get a coverage report for my android junit test project and following this guide to do so

android update test-project -m <path to app project> -p <path to test project>

worked fine. it generated a build.xml and updated project.properties, local.properties and proguard.cfg.

but when I change directory to test project directory and enter command

ant coverage

it gives me this error.

BUILD FAILED
Target "coverage" does not exist in the project "My Project Test".

Total time: 0 seconds

I am using windows xp.

2
  • 4
    Which SDK Tools version are you using? If it is 14 or later, you need to use ant emma debug install test instead of ant coverage Commented Jan 1, 2012 at 18:47
  • 1
    @Torsten: you should post your comment as an answer. Commented Oct 20, 2012 at 18:58

3 Answers 3

2

Which SDK Tools version are you using? If it is 14 or later, you need to use ant emma debug install test instead of ant coverage

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

Comments

1
  1. Go to Java build Path
  2. Go to Source
  3. Change Default output folder from: ProjectName/classes to Project/bin/classes

Comments

0

Try ant all clean emma debug install test in the test project root after cleaning, updating and building both the projects

Comments

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.