You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Bret Kumler <bk...@goldengate.com> on 2006/06/08 23:44:10 UTC

RE: Cactus and JSF

If you download jsf1.1_02fcs-src, inside the zip file they extend
JspTestCase and ServletTestCase.

jsf1.1_02fcs-src/jsf-ri/test/com/sun/faces/
jsf1.1_02fcs-src/jsf-ri/test/com/sun/faces/FacesTestCase.java 
jsf1.1_02fcs-src/jsf-ri/test/com/sun/faces/FacesTestCaseService.java
jsf1.1_02fcs-src/jsf-ri/test/com/sun/faces/JspFacesTestCase.java
jsf1.1_02fcs-src/jsf-ri/test/com/sun/faces/ServletFacesTestCase.java

I'm getting ready to start testing JSF myself and I wonder if anyone has
used these classes?

-----Original Message-----
From: Wendy Smoak [mailto:wsmoak@apache.org] 
Sent: Tuesday, October 11, 2005 9:21 PM
To: Cactus Users List
Subject: Re: Cactus and JSF

From: <vi...@vanguard.com>

> Will Cactus add classes to represent the JSF related session objects
like
> the FacesContext? If not, how would I place my test data into the
Faces
> request without mocking FacesContext?

I don't know what plans the Cactus team has, but you might want to look
at
Shale's test package:
  http://people.apache.org/~craigmcc/shale-test-javadocs/

Nightly builds are available:
   http://struts.apache.org/shale/index.html#download

> Also, can I use Cactus to test a JSF JSP? If so , do you know of any
> examples?

This is where I'm still confused-- by the time it gets to the browser,
it's
"just" HTML and JavaScript.  I don't see why testing the output of a JSP
page that had JSF tags in it is different from testing one that had,
say,
Struts tags.  It's still <input type="text" ...> in the browser, right?

FWIW there are some examples of testing JSF JSP pages in Shale.  Look in
src/systest in the use-cases section.  They are, however, HtmlUnit and
the
current version of the Cactus Maven plugin wouldn't run them.  I did see
HtmlUnit support get added to Cactus recently, so I'm hopeful.

I'd suggest that you ask about testing JSF apps on the MyFaces list.
Even
if you're using a different implementation, they are a helpful bunch. :)
And if you have questions about Shale, come join us on the Struts user
list.

HTH,
-- 
Wendy Smoak



---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org





This e-mail message and any attachments may contain private, confidential, proprietary or privileged material of GoldenGate Software, Inc. that is for the sole use of the intended recipient(s) of this e-mail message.  Any review, copying or distribution or other use of this e-mail message or any attachments hereto by anyone other than the intended recipient(s) is strictly prohibited.  If you are not the intended recipient(s) of this e-mail message, please contact GoldenGate Software, Inc. (415-777-0200) immediately and permanently delete the original e-mail message and any copies of this e-mail message and all attachments, if any.