3 Replies Latest reply on Aug 2, 2013 4:23 AM by aslak

    Multiple deployment in Arquillian

    antduprat

      Hello,

      I've one question about multiple deployment in Arquillian.

       

      I wish to deploy two webapps (A & B), where A as to know B's URL.

      This behaviour is currently working with this pattern :

       

      {code}

          @Test

          @RunAsClient

          public void test(@ArquillianResource @OperateOnDeployment("A") URL aURL,

                  @ArquillianResource @OperateOnDeployment("B") URL bURL) throws Exception {

       

              ...

              telling to A the B URL

              ...       

          }

      {code}

       

      (I had to define a new endpoint in A, in order to store B URL.)

       

      The bad point of this pattern is that all the test methods have to handle two parameters + call of 'telling to A the B URL' method.

       

      Any idea?

      Thx

        • 1. Re: Multiple deployment in Arquillian
          aslak

          Not sure you could do much else without knowing more background about how the app works/ what you're testing..

           

          But we've been poundering the idea of supporting some Injections in the deployment method. That would allow you to configure the B deployment based on data collected from deploying A, but this is not implemented yet.

           

          .e.g

           

          @Deployment(order = 1, name = "A")
          public static A() {}
          
          
          @Deployment(order = 2, name = "B")
          public static B(@ArquillianResource @OperatesOnDeployment("A") URL url) {
            return ShrinkWrap.create().. // e.g. add URL as a init-param to web.xml
          }
          
          1 of 1 people found this helpful
          • 2. Re: Multiple deployment in Arquillian
            antduprat

            Thx for your quick answer.

             

            Is there a ticket on this subject?

            I wish to follow this feature to try it as soon as available.

            • 3. Re: Multiple deployment in Arquillian
              aslak

              I don't think it ever made it to become a JIRA issue.

               

              Please add one and describe the need rather then then 'impl'

               

              We can add the possible impl as a comment.