电脑技术学习

测试框架TestNG 发布4.0 版本

dn001
Cedric Beust 宣布发布TestNG version 4.0

TestNG是根据JUnit 和 NUnit思想而构建的一个测试框架,但是TestNG增加了许多新的功能使得它变得更加强大与容易使用比如:
*支持JSR 175注释(JDK 1.4利用JavaDoc注释同样也支持)
*灵活的Test配置
*支持默认的runtime和logging JDK功能
*强大的执行模型(不再TestSuite)
*支持独立的测试方法。

如下是一个很简单的来自testng的例子:

import org.testng.annotations.*;

public class SimpleTest {

@Configuration(beforeTestClass = true)
public void setUp() {
// code that will be invoked when this test is instantiated
}

@Test(groups = { "functest" })
public void testItWorks() {
// your test code
}
}


Cedric Beust 提到:
"There are a lot of improvements and new features in this release, so we decided to skip to a major version (actually, we considered calling it version 5, but it wouldn't have been fair to JUnit ;-))."

下载:
http://testng.org/

标签: