Cactus on the other hand is a much more complex beast and provides you with a ready-made set of classes from which you can write tests for Servlets, JSPs, taglibs and EJBs.
With JUnitEE, writing standard JUnit tests doesn't provide you with easy access to the environment, meaning that you can't easily run assertions on things like the current ServletRequest, response, etc. The classes (test cases) that you extend in Cactus provide you with wrappers to the actual objects that are currently "live" within the server. In other words, you can actually get access to things like the current ServletRequest and run assertions against it.
<shameless plug>
The thing that I don't like about Cactus is its support for testing JSP custom tags as you have to test them by writing the code to mimic the way that the JSP container uses them. If you need to test custom tags, check out TagUnit for an alternative that allows you to write tests within JSP.
</shameless plug>
Cheers
Simon
==
정리하자면, JUnitEE는 JUnit테스트를 단순하게, Server container안에서 동작하게 해주는것이고, Catcus는 JSP,TagLib,Servlet,EJB에 대한 좀더 구체적인 테스트 프레임웍을 제공한다. (HTTP로 Request를 넣어서 Response를 받는것은 HttpUnit을 사용해야 한다.)
'ALM > Test Automation' 카테고리의 다른 글
Cactus 빌드 스크립트 샘플 (0) | 2007.09.12 |
---|---|
Unit Testing WebLogic Workshop 8.1 Applications & JWebUnit (0) | 2007.08.27 |
DBUnit 예제 (1) | 2007.08.27 |
단위 성능 테스트 (0) | 2007.08.24 |
단위 테스트 방법 (0) | 2007.08.24 |