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

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.
主站蜘蛛池模板: 泰顺县| 息烽县| 高邮市| 鄱阳县| 固镇县| 吉木乃县| 雅安市| 德钦县| 阜宁县| 连城县| 芦山县| 饶河县| 获嘉县| 白水县| 土默特右旗| 玉门市| 揭阳市| 荃湾区| 宝坻区| 理塘县| 宾阳县| 临沭县| 兴山县| 浦县| 铜梁县| 永定县| 晋江市| 沭阳县| 泉州市| 霸州市| 五家渠市| 大石桥市| 斗六市| 永年县| 五峰| 淄博市| 深圳市| 恭城| 汉川市| 安泽县| 兰考县|