Units

Can you separate the IceFaces application components so that they can be tested in isolation instead of using something like Selenium or HttpUnit in the compiled application?

Backing up beans can be easily isolated (if it is written for verification), but I'm interested in testing parts of the template / display of the application while using as much of the rest of the application as possible. It can be done? How?

Is there a way to render an IceFaces object as text using "dummy data" that I can perform through traditional unit tests?

I can figure out how to do this, but they include creating multiple applications (one for each component that I want to test). However, this seems like a suboptimal way of doing things.

+5
source share
2 answers

If I understand your question correctly, then you should just create special fictitious beans support for your pages, and then create a test JSF configuration file that matches these beans with .jspx files. The beans mannequin, of course, will not touch on any business logic or internal services - they will simply be data sets that will be easily checked in your tests.

ant script beans . . - , HTTPUnit, Spring , - -. , HTML-, . , IceFaces DIV DOM, , , . ( , JSF unit test JSF.)

, beans .

Voila! JSF-.

, beans . , IceFaces Spring beans JSF - test- beans application.xml . .

, , !

+1

, , JSFUnit ( JUnit, Cactus, HtmlUnit HttpUnit) JSF. ? , JSFUnit Wiki .

, FAQ IceFaces, ( 2009 ), ( -, jboss-jsfunit-examples-icefaces icefaces-demo-address JBoss, JSFUnit IceFaces).

EDIT: , OP - " ". , Shale Test Framework:

, JUnit TestCase s.

org.apache.shale.test.mock API- :

  • JavaServer Faces
  • Servlet

: Apache Shale Attic 2009 (.. ), , "" JSF, ( ). :)

+1

All Articles