• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unit testting for Struts application -JUnit or Cactus?

 
Anitha Rajamuthu
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am newbee to testing!

Have planned to use JUnit to perform unit testing for our existing struts application.

Had a glance over JUnit and Cactus . What is the difference between these two framework?To write testcases for struts action classes,forms and EJB's which framework we should go for?


We are using WSAD 5x IDE , I invoked JUnit plug in into it and i was able to write and execute a simple JUnit testcase for a sample add application and able to run JUnit and test the same.

Is it possible to write testcases for struts action classes,forms ..etc using JUnit syntax itself or we should go for cactus to start with the same.

Please, put your valuable guidance and suggestion on the same ASAP.

Thanks in advance.

Ani
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33671
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ani,
Welcome to JavaRanch!

First some terminology: unit tests are those which run without a server (or database), integration tests do use a server and database. JUnit is a framework that can be used for unit or integration testing. Cactus extends JUnit to provide more features for integration testing.

First you need to decide if you want to do unit testing or integration testing or both. I recommend writing JUnit unit tests for the lower level classes first (actions, EJBs, etc.) Then you can use Cactus to write an integration test to test the end to end/in container part.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic