• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Unit testting for Struts application -JUnit or Cactus?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 42200
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
When you have exhausted all possibilities, remember this: you haven't - Edison. Tiny ad:
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic