问题
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:
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.
来源:https://stackoverflow.com/questions/20878546/how-to-use-mediamuxertest-a-androidtestcase-file