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

Brabenetz, Harald harald.brabenetz at infonova.com
Tue Feb 16 17:53:03 CET 2010


I created a simple Library for Unittesting:

At the moment there is only a SNAPSHOT release available,
but it works for all cases I know.

Maybe it can be usefull for you.

With friendly regards,

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Martin Zibricky
Sent: Dienstag, 16. Februar 2010 13:54
To: opencms-dev at opencms.org
Subject: [opencms-dev] unit testing without DB (CmsJspBean)

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

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.

This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit

More information about the opencms-dev mailing list