블로그 이미지
평범하게 살고 싶은 월급쟁이 기술적인 토론 환영합니다.같이 이야기 하고 싶으시면 부담 말고 연락주세요:이메일-bwcho75골뱅이지메일 닷컴. 조대협


Archive»


JUnitEE vs Catcus

ALM/Test Automation | 2007.08.27 22:45 | Posted by 조대협
JUnitEE is a much simpler framework than Cactus, and provides a mechanism with which to invoke regular JUnit tests inside the container. You write your JUnit tests as normal and deploy them along with your application. You then (from your browser) request a predefined Servlet and tell it which JUnit tests to run. The results are then presented to you in a readble HTML form.

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
JUnitEE vs Catcus  (0) 2007.08.27
DBUnit 예제  (1) 2007.08.27
단위 성능 테스트  (0) 2007.08.24
단위 테스트 방법  (0) 2007.08.24
본인은 구글 클라우드의 직원이며, 이 블로그에 있는 모든 글은 회사와 관계 없는 개인의 의견임을 알립니다.

댓글을 달아 주세요