2 Replies Latest reply on Apr 5, 2011 6:12 PM by tmehre

    tomcat-embedded and spring http invocation

    tmehre

      Hey Guys,

       

      currently i'm testing arquillian for several use cases! I would like to test spring http service invocation using tomcat-embedded environment. Unfortunately during testing my spring service beans aren't initialized as expected. I can package the project as a war file and deploy it manually to a "real" tomcat location and everything works fine.

       

      I read the article about the spring integration but for now i don't need autowiring in my tests. I just want to get the spring environment to be properly initialized in order to be able to test the http service invocation.

       

      Could you please give me some hints if this use case can be realized or not. If it is possible which pitfalls should be considered?

       

       

      regards,

       

      Tobi

        • 1. tomcat-embedded and spring http invocation
          aslak

          You should be able to deploy a Spring integration appliation like any other appliation to tomcat. But if you want to test the Spring HTTP invoker you probably want to define the @Deployment as testable = false, that way you will not have incontainer testing, but rather as a remote client.

          • 2. Re: tomcat-embedded and spring http invocation
            tmehre

            Hey Aslak,

             

            thanks for your reply! Actually the spring bean initialization works for now. Unfortunately i couldn't make it to call the remote service within the testcase but the initialization works according to the logging information.

             

            I will give some insights as soon as i've reached the final goal :-)!

             

            regards