Re: Running the shale integration tests

2007-02-08 Thread Craig McClanahan

On 2/8/07, Ryan Lubke <[EMAIL PROTECTED]> wrote:


Hello folks,

I've dug around on the wiki looking for information on running the
integration tests for Shale (itest), and from what I can tell, all I
really
need to set is the cargo property 'cargo.container.home'.

When I do this and run the tests, the integration tests fail.  No output
is provided that I've found useful (container.log has three lines, none
of them informative).

Anyone have some tips to get this going?



Sure ... thanks for asking here so we can get it on record :-).  Then, maybe
someone can snapshot this onto a wiki.

Background:  I have a personal bias that unit testing the individual classes
of a web application is necessary but not sufficient.  It is also important
to validate the runtime behavior of the dynamic system.  Therefore, the
Shale example and test applications support an optional "itest" (integration
test) profile that actually deploys a running instance of the app on a
Tomcat instance, and then uses an HtmlUnit based test environment to fire
off requests to the server and then examine the response.  HtmlUnit gives
you back a DOM view of the page, so you can examine the rendered output and
ensure that correct results were retrieved.

In order to run the "itest" profile, you must first have a Tomcat
5.5instance available.  Next, you must tell Maven2's "Cargo" plugin
where that
install is.  The easiest way I have found is to add the following snippet to
your user settings file (~/.m2/settings.xml):



 ...

 
   cargo-config
   
 /home/craigmcc/apache-tomcat-5.5.20

   
 

 ...



Now, from the top level directory of (say) the shale-usecases application, I
can say:

   mvn -Pitest clean install

and it will run the integration tests for this application (see sources in
src/test/java/.../systest) after the normal compile and unit test phases,
using the MyFaces 1.1 JSF implementation by default.

Separately, there are also profiles available (in the shale-apps POM) to
help you select which JSF implementation strategy you wish to use.  If your
own application uses this POM as a parent, you'll have the same features
available to you.  Choose your implementation as follows:

* Default (MyFaces 1.1):mvn clean install

* JSF 1.1 RI:  mvn -Djsf=ri clean install

* JSF 1.2 RI (included in the application):  mvn -Djsf=ri12 clean install

* JSF 1.2 (provided by the app server):  mvn -Djsf=ee5 clean install

I have tried the combination of RI 1.1 and the integration tests, but
haven't yet done so with the 1.2 variants ... I suspect we'll need a Cargo
setup for Servlet 2.5 / JSP 2.1 / JSF 1.2 type containers for this to work.

Craig




Thanks,


-rl



Running the shale integration tests

2007-02-08 Thread Ryan Lubke

Hello folks,

I've dug around on the wiki looking for information on running the
integration tests for Shale (itest), and from what I can tell, all I really
need to set is the cargo property 'cargo.container.home'. 


When I do this and run the tests, the integration tests fail.  No output
is provided that I've found useful (container.log has three lines, none
of them informative).

Anyone have some tips to get this going?

Thanks,

-rl


Re: tiles integration error

2007-02-08 Thread Greg Reddin

Here are the relevant bits from the Tiles Test app:


 [...]

   
   org.apache.tiles.CONTEXT_FACTORY
   
org.apache.tiles.context.enhanced.EnhancedContextFactory
   

   
   org.apache.tiles.CONTAINER_FACTORY.mutable
   true
   

[...]

   
   tiles
   org.apache.tiles.servlet.TilesServlet
   
   definitions-config
   /WEB-INF/tiles-defs.xml
,/org/apache/tiles/classpath-defs.xml
   
   2
   

[...]



I'm not sure what's changed from the version you are using to the version
I'm looking at, which is the latest from svn.  Please note that a Tiles
2.0.0 should be coming out soon and that will add some stability to the
whole mess :-)

Thanks,
Greg


RE: tiles integration error

2007-02-08 Thread Dick Starr
I am now using yesterday's snapshot.

My web.xml has:


  
definitions-config
/WEB-INF/conf/tiles.xml
  
  

  org.apache.tiles.listener.TilesListener

  

and my faces-config.xml has:


  

  org.apache.shale.tiles.TilesViewHandler

  

and my tiles.xml has:

 
  
  
  
  
  
  
  
  
  
  
  
  

where logoff.jsp is:

<%@ include file="/jspf/common/taglibs.jsp" %>
<%@ include file="/jspf/common/messages.jsp" %>

  
  


  

  

  

  

  

  


  
  
  
  



Dick



-Original Message-
From:   JS Portal Support [mailto:[EMAIL PROTECTED]
Sent:   Thu 2/8/2007 5:01 AM
To: user@shale.apache.org
Cc: 
Subject:RE: tiles integration error

Gotta love one of those days where you waste 6 hours just because you left
an old struts.jar in a commons folder

To my relieve the next seemingly unsolvable problem lined itself up ;-)

org.apache.tiles.FactoryNotFoundException: Can't get definitions factory
from context.

Seems to indicate that tiles definitions file is never loaded. I have
defined the following in my web.xml:


definitions-config
/WEB-INF/tiles.xml




And my tiles.xml:



  






 


Am I missing anything?

Cheers,
Joost 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Thursday, February 08, 2007 1:56 PM
To: user@shale.apache.org
Subject: Re: tiles integration error

On 2/7/07, JS Portal Support <[EMAIL PROTECTED]> wrote:
>
> I cheered too soon ;-)


:-)

I have all the right jar's in place but can't figure out how to configure
> the lot. Maybe I'm missing something but I can't find any example with the
> shale 1.1.0 snapshot I just downloaded. The thread at [1] seems too old
> and
> the explanation at [2] seems to new. Where can I find a working example to
> work from?
>
> I guess most of my questions is in regard to configuring tiles, but since
> I'm relying on shale, I need to make sure I'm configuring the right
> version
> here.


There are a couple of pointers on the Shale wiki that might help[1].

Thanks,
> Joost
>
> [1] http://www.mail-archive.com/user@shale.apache.org/msg00774.html
> [2] http://tiles.apache.org/quickstart/index.html


Craig

[1] http://wiki.apache.org/shale/ShaleAndTiles


-Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
> McClanahan
> Sent: Thursday, February 08, 2007 6:19 AM
> To: user@shale.apache.org
> Subject: Re: tiles integration error
>
> On 2/7/07, Dick Starr <[EMAIL PROTECTED]> wrote:
> >
> > I use Shale/Tiles successfully with the nightly builds at
> > http://people.apache.org/builds/shale/nightly/ (I am currently using the
> > 01/29/07 version). I use the jars from
> > shale-framework-1.1.0-SNAPSHOT/lib.
>
>
> In particular, you need to use the snapshot of Tiles that is included with
> the framework builds for this to work.  Because Tiles is still a moving
> target, we sync up on snapshots (such as the  "2.0-r468346-SNAPSHOT"
> version
> that is currently specified in the shale-tiles POM).
>
> Dick
>
>
> Craig
>
>






RE: tiles integration error

2007-02-08 Thread JS Portal Support
Gotta love one of those days where you waste 6 hours just because you left
an old struts.jar in a commons folder

To my relieve the next seemingly unsolvable problem lined itself up ;-)

org.apache.tiles.FactoryNotFoundException: Can't get definitions factory
from context.

Seems to indicate that tiles definitions file is never loaded. I have
defined the following in my web.xml:


definitions-config
/WEB-INF/tiles.xml




And my tiles.xml:



  






 


Am I missing anything?

Cheers,
Joost 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Thursday, February 08, 2007 1:56 PM
To: user@shale.apache.org
Subject: Re: tiles integration error

On 2/7/07, JS Portal Support <[EMAIL PROTECTED]> wrote:
>
> I cheered too soon ;-)


:-)

I have all the right jar's in place but can't figure out how to configure
> the lot. Maybe I'm missing something but I can't find any example with the
> shale 1.1.0 snapshot I just downloaded. The thread at [1] seems too old
> and
> the explanation at [2] seems to new. Where can I find a working example to
> work from?
>
> I guess most of my questions is in regard to configuring tiles, but since
> I'm relying on shale, I need to make sure I'm configuring the right
> version
> here.


There are a couple of pointers on the Shale wiki that might help[1].

Thanks,
> Joost
>
> [1] http://www.mail-archive.com/user@shale.apache.org/msg00774.html
> [2] http://tiles.apache.org/quickstart/index.html


Craig

[1] http://wiki.apache.org/shale/ShaleAndTiles


-Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
> McClanahan
> Sent: Thursday, February 08, 2007 6:19 AM
> To: user@shale.apache.org
> Subject: Re: tiles integration error
>
> On 2/7/07, Dick Starr <[EMAIL PROTECTED]> wrote:
> >
> > I use Shale/Tiles successfully with the nightly builds at
> > http://people.apache.org/builds/shale/nightly/ (I am currently using the
> > 01/29/07 version). I use the jars from
> > shale-framework-1.1.0-SNAPSHOT/lib.
>
>
> In particular, you need to use the snapshot of Tiles that is included with
> the framework builds for this to work.  Because Tiles is still a moving
> target, we sync up on snapshots (such as the  "2.0-r468346-SNAPSHOT"
> version
> that is currently specified in the shale-tiles POM).
>
> Dick
>
>
> Craig
>
>