官术网_书友最值得收藏!

JUnit 4

JUnit 4 is still an open source framework, though the license changed with respect to JUnit 3, from CPL to Eclipse Public License (EPL) Version 1.0. The source code of JUnit 4 is hosted on GitHub (https://github.com/junit-team/junit4/).

On February 18, 2006, JUnit 4.0 was released. It follows the same high-level guidelines than JUnit 3, that is, easily define test, the framework run tests independently, and the framework detects and report errors by the test.

One of the main differences of JUnit 4 with respect to JUnit 3 is the way that JUnit 4 allows to define tests. In JUnit 4, Java annotations are used to mark methods as tests. For this reason, JUnit 4 can only be used for Java 5 or later. As the documentation of JUnit 4.0 stated back in 2006:

The architecture of JUnit 4.0 is a substantial departure from that of earlier releases. Instead of tagging test classes by subclassing junit.framework.TestCase and tagging test methods by starting their name with 'test', you now tag test methods with the @Test annotation.
主站蜘蛛池模板: 蕉岭县| 宿迁市| 井冈山市| 漳浦县| 水城县| 深圳市| 桂东县| 买车| 晋城| 湖南省| 民县| 翼城县| 长顺县| 漯河市| 辽阳县| 昭苏县| 来凤县| 慈溪市| 灌云县| 彰化市| 通河县| 班戈县| 多伦县| 黔西县| 清流县| 安乡县| 秦皇岛市| 定西市| 新龙县| 渭南市| 炎陵县| 嘉黎县| 阿图什市| 遵化市| 东乡县| 泌阳县| 冷水江市| 赤水市| 大方县| 班玛县| 霍林郭勒市|