3 Replies Latest reply on Dec 26, 2007 4:32 PM by Pete Muir

    Integration Testing - Render Response phase

    Mikhail Balshunou Newbie

      Hi all.

      I'm using Seam 2.0.1.CR1 and trying to write Seam integration test. I took one from the examples as an example :). Here is the test code (it extends SeamTest):

       public void testLogin() throws Exception {
       new FacesRequest("/login.xhtml") {
       protected void updateModelValues() throws Exception {
       setValue("#{identity.username}", ADMIN_USERNAME);
       setValue("#{identity.password}", ADMIN_PASSWORD);
       protected void invokeApplication() throws Exception {
       protected void renderResponse() throws Exception {
       assert (Boolean) getValue("#{identity.loggedIn}");

      Everything works fine updateModelValues and invokeApplication methods are invoked, authentication is successfull, but renderResponse method is not invoked. I debug it and found this piece of code in emulateJsfLifecycle method of BaseSeamTest class:

      if ( skipRender() )
       // we really should look at redirect parameters here!
       return false;
       return true;

      so skipRender method always returns true and it has only one row inside:

      Could anybody explain why it happens, why response is complete, and why renderResponsePhase should be invoked only if it's not?