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

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


Hi,

I created a simple Library for Unittesting:
http://bp-cms-commons.sourceforge.net/m2site/infonova/opencms-testing/1.0-SN
APSHOT/

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,
Harald

-----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
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.


_______________________________________________
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
http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list