如何使用MediaMuxerTest(一个AndroidTestCase文件) [英] How to use MediaMuxerTest (a AndroidTestCase file)
问题描述
我找到MeediaMuxer,这是一个AndroidTestCase文件演示。这里是<一个href=\"https://android.googlesource.com/platform/cts/+/kitkat-release/tests/tests/media/src/android/media/cts/MediaMuxerTest.java\"相对=nofollow>链接。
我从来没有使用过Android的测试。我做了一些研究,但大部分都是以某种方式有点复杂......好像我需要一个XML文件,TestSuite的一个java文件和AndroidTestCase的Java文件。现在我有AndroidTestCase,任何人都可以告诉我怎么写的TestSuite?谢谢!
从<一个href=\"http://developer.android.com/reference/junit/framework/TestSuite.html#createTest%28java.lang.Class%3C?%3E,%20java.lang.String%29\"相对=nofollow> TestSuit 概述
TestSuite是测试的组合。它运行测试的集合
案例。下面是使用动态测试定义的例子。
块引用>的TestSuite套件=新的TestSuite();
suite.addTest(新MathTest(testAdd));
suite.addTest(新MathTest(testDivideByZero));Android版提供了一个pretty好的文档,告诉我,如果你有更多的问题,读完之后。
此外这里是关于Android的测试官方的文章。
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!
解决方案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.
这篇关于如何使用MediaMuxerTest(一个AndroidTestCase文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!