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?