[opencms-dev] unit testing without DB (CmsJspBean)

Martin Zibricky mzibr.public at gmail.com
Tue Feb 16 13:54:26 CET 2010


Hi all,

I'm trying write unit tests for an OpenCms module what uses classes
inherited from CmsJspActionElement.

For writting tests I'm using some mock objects (page context, http
session, ...) from spring framework.

When I execute a unit test for class inherited from CmsJspActionElement,
I'm getting this CmsRuntimeException:


"org.opencms.jsp.CmsJspBean" is usable only on a OpenCms controlled JSP
page.


Is there any workaround to write unit tests for classes inherited from
CmsJspBean and without using DB connection and servlet container?


Thanks in advance for any answer,
Martin Z.




More information about the opencms-dev mailing list