Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
280 views
in Technique[技术] by (71.8m points)

java - Android test code coverage, Eclipse

Is there a way to run unit tests for Android from Eclipse in a way that will instrument the code and measure test code coverage?

I'm looking for a simple way to find out which parts of my application aren't tested yet, fix the test cases and see if that helped.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Disclaimer: I'm an Atlassian

The Atlassian Clover tool has also support for Android - it measures coverage for both application code and unit tests. Although in alpha stage, it works quite well - it works with Eclipse version 3.6.2 and higher.

If you want to find areas of your application which require improvement, then the following Clover features will be perfect for this task:

  • Clover Dashboard
  • Coverage Cloud Report
  • Coverage TreeMap Report
  • Coverage Explorer

Oh, and the Clover HTML Report looks fantastic!

Check this: https://confluence.atlassian.com/display/CLOVER/Clover-for-Android


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...