How does CTS work? Where can I get the test streams?

by Chenny » Tue, 17 Nov 2009 10:58:08 GMT

Sponsored Links
 Hi Friends,
I am working on the CTS (Compatibility Test Suite), but I am a newer.

-- testPlayAudio fail junit.framework.AssertionFailedError:
expected:<4231.0> but was:<4119.0> at

I have checked the CTS source code. And find the the following source

public void testPlayAudio() throws Exception {
        final int mp3Duration = 4231;
        final int tolerance = 50;
        final int seekDuration = 100;
        final int resid = R.raw.testmp3;

        MediaPlayer mp = MediaPlayer.create(mContext, resid);
        mp.setWakeMode(mContext, PowerManager.PARTIAL_WAKE_LOCK);



        assertEquals(mp3Duration, mp.getDuration(), tolerance);    //
Error from here.

duration from getDuration() is different from the expected (4231.
Should be 4181 to 4281). But my questions are:
1. Where is the tested mp3? I cannot find it any where.
2. Why do we set the duration for the tested mp3 to 4231 (final int
mp3Duration = 4231;)? Could we set it to other number?

Thanks very much!


How does CTS work? Where can I get the test streams?

by Chenny » Tue, 17 Nov 2009 11:37:24 GMT

 I checked the source code. And noticed the location of testmp3.mp3.

But from some tool, the original duration is 3860 ms.

The expected duration is 4231. Which tool can check the real duration
of the clip?


Sponsored Links

How does CTS work? Where can I get the test streams?

by Chenny » Fri, 20 Nov 2009 15:14:52 GMT

 Dear friends,

I tried to test video by modify the CTS source code. But failed when

cannot find symbol
symbol  : variable testvideompeg4
location: class
                final int resid = R.raw.testvideompeg4;

I only change the tested stream (testvideo) to my own stream
(testvideompeg4). Code:
//final int resid = R.raw.testvideo;
final int resid = R.raw.testvideompeg4;

testvideompeg4 has been put into the folder: *\cts\tests\res\raw

Anybody meet the similar issue?


Other Threads

1. Putting Android on Par with the iPhone Software

This is a message to all other Android Developers, bloggers, or
interest groups.  Unfortunately, it is rather evident that, for a
myriad of reasons, Android as an OS simply isn't on the same level as
the iPhone in what it offers, what it can do, how it runs, etc. etc.
As a full supporter of most everything Google endeavors to take on, I
am gleeful to see Android, an open source competitor challenging the
iPhone.  Google has brilliant engineers, a plethora of resources, and
the flexibility to test and experiment wacky ideas that become the
technological standard of tomorrow.  So why isn't Android commensurate
to the iPhone?  My opinion is that it's because Google doesn't make
any, even a small stream, of revenue from Android, which is a major
disincentive and makes it economically infeasible and to pour
resources into it to make it the best and most competitive possible OS
it can be.  While I hope Google addresses this issue in the future, we
need to make it easy for the current Google engineers to create a
competitive project, and that means, in the true spirit of open
source, we must contribute.  So developers, educated Android savvy
technological wizards, come together, and below post everything you
would want to see in an Android update to both put Android on par with
the iPhone, and push it beyond.  Put ideas that well up on the brink
of your imagination below, think up the next big idea, the brilliant
feature that'll make Android the unparalleled smart phone champion.
Once Android is more popular, better phones will be made for it, it'll
have more developers, and Google will invest more money in it, but we
need to give it that first push.  Below, use our collective wisdom and
create a single thread that will document all the features, all the
tools, the code libraries, etc. etc. that we want to see in Android,
and when our thread gets large enough, Google won't be able to help
but notice, and address our needs, our desires, and our demands!

"You must be the change you wish to see in the world" - Mahatma Gandhi


2. power manager and wake lock

In the example here:

It shows:

PowerManager pm = (PowerManager) getSystemService
 PowerManager.WakeLock wl = pm.newWakeLock
(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
   ..screen will stay on during this section..

Once the wake lock is received from the pm, can the reference to the
pm be set to null?  Is it needed any more?  Or is there some reason to
keep it?

It seems like the wl reference is the only one needed.


3. UI TableLayout problem

4. How to get Android working on the eeepc?

5. in case of building adb composite gadget dynamicall

6. Bad sign: Single Content apps are coming to Android

7. Getting a complete list of android native drawables