java testing methodologies, choosing the appropriate one!
Preparation of JUnit testcases for bundle of classes, require almost
full test coverage.
struts based application, with very heavy middle tier code which
1. interaction with database
2. application logic implementation
3. talking to other web-servers and handling response back from them
I require preparation of junit testcases for above mentioned
middletier javacode. For simpler method with clear ip/op it's very
easy to write test cases though for heavy methods which performs lots
of database operation or other implementations there is the problem in
writing test cases.
These method requires a particular state of system. Number of such
methods are really large.
I 've come across following possible solution none seems to fit in a
1. Using Cactus, JTestCase with JICE to automate the test case
Automation in terms of input/assert-output preparation, through
jice it's easy to write your input beans/complex-type such as hashmap
Problem in using this approach was when the input bean has member
beans which may extend some base class the size of xml becomes really
very large, now for developer to fill in the value of every field
which in turn denotes the state of the system that leads to many
I though try to automate xml formation but then if the return value is
bean/complex-type JTestCase doesn't support jice tags inside assert/
2. Using JMock or JDummy for preparation of mock object
Though it's intended for good development practice, I 've tried it
for already developed code which then I found difficult to automate
and somewhat complex for developers. The doc clearly says it's usage
is when u start developing a code.
I assume this to be a common problem/challenge for such applications
which are huge and already developed now requires test case
It would appreciate any suggestions/comments on proper approach for
handling such situation.
|All times are GMT. The time now is 04:40 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.