Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Choosing frame work for UNIT test

 
Sree Reddy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We need to prepare and write unit test cases for automated testing.
Our project uses structs frame work.
Basically we have DB Objects, which will perfrom insert/select/update/delete operations. One or many methods for each operation. And regular bean objects to hold the values returned from Database.
Now we need to prepare test cases for
1. Test where DB objects performing all the operation correct.
2. Test all overall application with respect to action classes.
After browsing various posts on this forum, I thought "StrutsTestCase" frame work would be the best approach.
Is it a good approach? OR any other better solutions.
Can any of you suggest me best solution.
Any useful links how best we can proceed?
I am new to testcase frameworks.
Thanks in Advance,
Sree.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to test the "DB objects", you might want to look at dbUnit with which you can set up the database to a known state before each test execution (note that this isn't really unit testing). If you want to test Struts Actions, the StrutsTestCase is probably your best bet. Furthermore, you can test pretty much whatever you want using mock objects (EasyMock, MockObjects, JMock).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic