Topic: 【分享】IntelliJ JUnit Plugin |
Print this page |
1.【分享】IntelliJ JUnit Plugin | Copy to clipboard |
Posted by: lxia Posted on: 2003-03-06 16:13 对于大型软件系统,测试与编写代码同等重要,好的程序员应该养成编写测试用例的习惯。向大家推荐一个IntelliJ的JUnit代码生成的插件,使用它能够很方便的生成和管理测试代码。 用法:将附件展开到IntelliJ的Plugin目录下。重起IDEA后会在Goto菜单下生成Tested Class菜单项,使用Ctrl-T可以激活该命令。在自己编写的类中键入Ctrl-T,IDEA会提示生成测试类,生成后可以使用Ctrl-T在测试类与被测试类之间切换。 在Project Setting中的JUnit测试设置页可以改变生成单元测试类的位置。系统缺省的模式是$CLASS$生成test/$CLASS$Test,我常用的模式是java/$PACKAGE$/$CLASS$ 生成 test/$PACKAGE$/test/$CLASS$Test 。分离测试代码与主程序代码,也是好习惯。 我的Project的目录组织是: + bin + lib + src + java + ... my project code + test + .... my junit test code unitTest.zip (130.64k) |
2.Re:【分享】IntelliJ JUnit Plugin [Re: lxia] | Copy to clipboard |
Posted by: snowbug Posted on: 2003-03-06 23:42 I was using XDoclet to generate the test cases. I'll give this one a try and see how it works. Thanks! |
3.Re:【分享】IntelliJ JUnit Plugin [Re: lxia] | Copy to clipboard |
Posted by: lxia Posted on: 2003-03-07 09:51 I have tried some junit test code generator like JUnitDoclet before .Automatic unit test code generation kit often generate too much code . I think this approach is better because you can control precisely which you want to test and avoid your project 'over tested' . |
4.Re:【分享】IntelliJ JUnit Plugin [Re: lxia] | Copy to clipboard |
Posted by: abc123 Posted on: 2003-03-07 17:25 lxia wrote: good!!! |
5.Re:【分享】IntelliJ JUnit Plugin [Re: lxia] | Copy to clipboard |
Posted by: Julian13 Posted on: 2003-03-07 18:55 can i use it without IntelliJ? coz i haven't used any IDE. |
6.Re:【分享】IntelliJ JUnit Plugin [Re: lxia] | Copy to clipboard |
Posted by: lslzf Posted on: 2003-03-08 18:45 反正在我的机器上面不行 难道是因为我的版本抬高 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |