开发时大多数就是只想运行新增加的测试
虽然可以写个main方法
public
static
void
main(String[] args) {
junit.framework.Test t = new ExampleTest( " testMethod " );
TestRunner.run(t);
}
junit.framework.Test t = new ExampleTest( " testMethod " );
TestRunner.run(t);
}
但这样很不方便, 每想测试一个方法都要改.
Eclipse 这个方便的工具, 应该有单独运行一个Junit 的test的方法的.
然后在 http://www.iteye.com/post/78284 的8楼找到了, 多谢 :)
Outline(大纲) 右击一个方法 Run As... -> Junit test就OK了
哈哈