Hi Rajchinna,
I am now dealing with the same sort of problem. and you can be my only hope as i am not able to find any document and notes on google related to how to get cts code coverage.
Please let me know the steps you did for taking out html report by executing "make cts-test-coverage" command.
I am stuck with this step itself and dont know what all changes need to be done in my Android source code or in cts source files to make this file generate html reports.
I will be highly obliged if you can help me in any sense.
-Regards,
Swati
On Tuesday, May 24, 2011 6:05:32 PM UTC+5:30, Rajchinna wrote:Hi,
I have been using CTS for quite sometime and recently found 'make cts-
test-coverage' option. This gave me a html report which gives what all
are the API's covered in CTS test cases(apks). It also gives what all
are the API's covered in certain package and what all are not
covered.
But, I found another intersting thing that this report is not 100%
promising. As I look at the source code of a certain test case
(MediaScannerConnection) inside the source code all the aAPI's
covered.
But, when I look at the the coverage report, it doesn't give 100%. It
gave only 38% (3 API's only covered out of 8 API's).
Here is the report generated from "make cts-test-coverage" command for
MediaScannerConnection class.
MediaScannerConnection 38% (3/8)
[X] MediaScannerConnection(android.content.Context,
android.media.MediaScannerConnection.MediaScannerConnectionClient)
[ ] void connect()
[ ] void disconnect()
[ ] boolean isConnected()
[X] void onServiceConnected(android.content.ComponentName,
android.os.IBinder)
[X] void onServiceDisconnected(android.content.ComponentName)
[ ] void scanFile(java.lang.String, java.lang.String)
[ ] void scanFile(android.content.Context, java.lang.String[],
java.lang.String[],
android.media.MediaScannerConnection.OnScanCompletedListener)
Here is the source code for the same class in CTS source code.
http://android.git.kernel.org/?p=platform/cts.git;a=blob;f=tests/tests/media/src/android/media/cts/MediaScannerConnectionTest.java;h=cc25d07bed71151615d36f49fa77633af19e3e49;hb=HEAD
Can someone make it clear like why this CTS Test coverage report not
listing all the API's which are used inside the test cases? Or am I
missing something?