How to use MediaMuxerTest (a AndroidTestCase file)

2019-08-02 21:27发布

I find demo for MeediaMuxer, which is a AndroidTestCase File. Here is the link.

I never used Android Test. I did some research, but most of them are somehow a little complex... It seems like that I need a xml file, a java file for TestSuite and a java file for AndroidTestCase. And now I have the AndroidTestCase, could anyone tell me how to write the TestSuite? Thank you!

1条回答
Melony?
2楼-- · 2019-08-02 22:12

From TestSuit overview

A TestSuite is a Composite of Tests. It runs a collection of test cases. Here is an example using the dynamic test definition.

 TestSuite suite= new TestSuite();
 suite.addTest(new MathTest("testAdd"));
 suite.addTest(new MathTest("testDivideByZero"));

Android provide a pretty good documentation for that, tell me if you have more questions after reading it.

Also here is the official article about testing in Android.

查看更多
登录 后发表回答