RE: Cactus and JSF

"Bret Kumler" <[email protected]>
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <24F7E976D2C85149A4785E11309B603306992DA5@traveler>
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:[email protected]] 
Sent: Tuesday, October 11, 2005 9:21 PM
To: Cactus Users List
Subject: Re: Cactus and JSF

From: <[email protected]>

> 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: [email protected]
For additional commands, e-mail: [email protected]





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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.