[JUnit]What are TestCase, TestSuite, BaseTestRunner
2007-11-05 13:41
453 查看
TestCase(or test case):
A class that extends the JUnit TestCase class. It contains one or more tests represented by testXXX methods. A test case is used to group together tests that exercise common behaviors. When we mention a test, we mean a testXXX method; and when we mention a test case, we mean a class that extends TestCase --- that is, a set of tests.
TestSuite(or test suite):
A group of tests. A test suite is a convenient way to group together tests that are related. For example, if you don't define a test suite for a TestCase, JUnit automatically provides a test suite that includes all the tests found in the TestCase(more on that later).
TestRunner(or test runner):
A launcher of test suites. JUnit provides several test runners that you can use to execute your tests. There is no TestRunner interface, only a BaseTestRunner that all test runners extend. Thus when we write TestRunner we actually mean any test runner class that extends BaseTestRunner.
A class that extends the JUnit TestCase class. It contains one or more tests represented by testXXX methods. A test case is used to group together tests that exercise common behaviors. When we mention a test, we mean a testXXX method; and when we mention a test case, we mean a class that extends TestCase --- that is, a set of tests.
TestSuite(or test suite):
A group of tests. A test suite is a convenient way to group together tests that are related. For example, if you don't define a test suite for a TestCase, JUnit automatically provides a test suite that includes all the tests found in the TestCase(more on that later).
TestRunner(or test runner):
A launcher of test suites. JUnit provides several test runners that you can use to execute your tests. There is no TestRunner interface, only a BaseTestRunner that all test runners extend. Thus when we write TestRunner we actually mean any test runner class that extends BaseTestRunner.
相关文章推荐
- Junit: How to skip a test case in Junit ?
- 数字格式化DecimalFormat_JunitTest_Case
- Junit Test Case结合Selenium
- What are training set, validation set and test set?
- Writing JUnit Test Case Generation Using CodePro
- java.lang.NoClassDefFoundError: com/sun/mail/util/MailLogger for JUnit test case for Java mail
- 解决 ant Junit testcase failed 自动检测类名
- what is good test case?
- android自动化框架简要剖析(二):Instrumentation+junit.framework.TestCase
- BaseTestCase system 1.0 体验版
- Junit核心——测试类(TestCase)、测试集(TestSuite)、测试运行器(TestRunner)
- Junit测试中找不到junit.framework.testcase
- 为什么在Myeclipse中使用Junit之后, 以下这句话总是有错误(import junit.framework.TestCase;)
- 【转】What CLASSPATH settings are needed to run JUnit?
- Junit TestCase
- java.lang.NoClassDefFoundError: junit.framework.TestCase
- 解决Eclipse -new一个class或者Junit test case显示出来,不需到other里去
- What are training set, validation set and test set?
- Junit核心——测试类(TestCase)、测试集(TestSuite)、测试运行器(TestRunner)
- java.lang.NoClassDefFoundError: com/sun/mail/util/MailLogger for JUnit test case for Java mail