Hi, We need to prepare and write unittest 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.
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).