`
chenlb
  • 浏览: 690141 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

运行 junit test 的单个测试

阅读更多

开发时大多数就是只想运行新增加的测试

虽然可以写个main方法

public static void main(String[] args) {
        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了


哈哈
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics