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

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.
主站蜘蛛池模板: 临洮县| 拜城县| 托克逊县| 科技| 社旗县| 宣武区| 衡山县| 驻马店市| 安福县| 扶风县| 略阳县| 昔阳县| 鄂州市| 墨江| 池州市| 金塔县| 新郑市| 胶州市| 苍溪县| 秦安县| 当阳市| 获嘉县| 通山县| 永平县| 新沂市| 杭州市| 剑河县| 南木林县| 宁远县| 阳泉市| 西平县| 前郭尔| 澄迈县| 蓬莱市| 育儿| 夏河县| 沙田区| 武宣县| 苏州市| 历史| 北川|