您的位置:首页 > 产品设计 > UI/UE

[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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: