Unfortunately Merrill that's not an option for this project, but could be something to look into in the future.
Given the limitations of StrutsTestCase in this regard, I think I've found the best case solution (although it's by no means optimal). I've chosen to subclass MockStrutsTestCase and make some modifications whereby I can specify my own Action class for a given path, rather than the one specified in struts-config.xml. That Action class will be a subclass of the one I'm trying to test, with the appropriate methods overridden to return test data.
This has a few limitations that I can see:
(1) It makes it impossible to test with multiple test data sets without either re-compiling or creating multiple subclasses of the Action class for each test.
(2) It requires that the methods in the test Action class (the parent) be protected or package-private, rather than private.
(3) It separates test code into two different locations, reducing clarity of intent.
(4) It ignores the RequestProcessor specified in struts-config.xml.
But, it does allow me to test my code without having special "if" statements buried in my business logic returning different values for test cases. And, it's pretty flexible in allowing me to specify any Action subclass I want to the ActionServlet. So, it will have to do for now.
I got the idea from the StrutsTestCase forums, if anyone is curious. It's given under the post by Dmitri.
http://sourceforge.net/forum/forum.php?thread_id=941422&forum_id=121751 Thanks for everyone's help!
Ryan
ActionSubclassMockStrutsTestCase
[ January 19, 2007: Message edited by: Ryan Kade ]