Hi,
I have defined a following Struts 2 action which show one simple PDF report:
<action name="showReport" method="showReport" class="ReportAction">
<result name="success" type="jasper">
/reports/MainReport.jasper
parameters
connection
PDF
</result>
</action>
And I'm trying to test with JUnit 4 this action by using BaseStrutsTestCase
class (
http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/
http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/
). But I have a problem because JasperReportsResult is trying to find
location of my report by using finalLocation parameter of its doExecute(...)
method. The problem is that this file is not found during test, while, when
application is running on server IT IS found. So, how can I solve this
problem, i.e., how to pass correct location to doExecute method of
JasperReportsResult during Junit test, or maybe I can pass this somehow ?
--
Thx, M.
--
View this message in context:
http://www.nabble.com/-S2--Problem-with-testing-S2-Action-when-JasperResult-type-is-used-tp21037498p21037498.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]