Programming JUnitee

 

Abstract:

JUnitEE is a simple extension to JUnit which allows standard test cases to be run from within a J2EE application server. JUnit provides the framework for writing your unit tests, and JUnitEE gives you the possibility to run these tests inside your application server. This has the advantage of testing your EJB/servlet-based application in the same environment it will run when in production

But I hate JUnitee, for what people really need is "run test without application server", the existing of JUnitee gives guys a peg to give up improving their design to make testing easier, and much time is wasted on deploying/starting/stopping/undeploying, even it is automatic.

Test Approach:

Step 1, Package JUnitee and your test code with the application to be tested.

Step 2, Start application server

Step 3, Deploy the package

Step 4, Run tests via JUnitee servlet

Step 5, Undeploy the package

Step 6, Stop application server

Practice:

1, Cooperate with XDoclet to automated Step 1: provide a subclass of org.junite.servlet.JUnitEEServlet which labeled with @web and @ejbref

2, Cooperate with Ant <exec> and application server script to automated Step 2,3,5,6

3, Cooperate with Cactus to automated Step 4, and make cycle for Step 3,4,5

4, Cooperate with Ant script to automated all Steps

User Guide:

http://www.junitee.org/usersguide.html

Ant How To:

http://www.junitee.org/antguide.html

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值