I have developed several complex Intranet workflow applications using MyFaces/Spring/Hibernate. I also use the jsf-spring library which allows me to unit test JSF Backing Bean action methods from within JUnit. The JSF backing beans are defined in the Spring application context. Spring makes unit testing much easier. I am able to simulate web form submissions by setting up backing bean properties and running the JUnit tests within Eclipse. The servlet container is not used for these unit tests; Spring allows all testing to be performed outside of the servlet container but using the same resources the servlet container uses.
-----Original Message----- From: Rogerio Pereira [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 04, 2006 10:56 AM To: MyFaces Discussion Subject: Re: AW: unit testing in myfaces applications > Why would you reject Shale without at least considering whether the > mock objects could help you? Shale builds on top of what JSF gives > you. Shale + JSF are natural partners. Nobody says you have to use > Shale but I wouldn't make a decision without investigating it. I just don't want use entire Shale right now... > IMO the best reason for not using Shale would be that you are still > trying to understand JSF and you want to take it slow. If you are to > the point where you need mock objects that's probably not an issue for > you. Maybe you is right, if i'm not wrong i need to understand all jsf lifecycle and then write my mock objects. > Every few days a user will post a question here and the answer will be > "You should look at Shale." So my guess is that it might be more > helpful to you then you think. The real reason is, there's no example there about how to do it. -- Yours truly (Atenciosamente), Rogério

