1 Reply Latest reply on Nov 30, 2012 3:30 AM by Aslak Knutsen

    Multi-deployment Test Cases

    John Ament Master

      Hi All

       

      So I wanted to start discussing the idea of multi-deployment test cases.  Right now Arquillian supports multiple deployments via distinct methods.  I recently worked on a test structure that was comprised of 8 deployments in total.  7 of them were dependency deployments and the 8th one being the top most archive that represented our UI layer.  Our project is meant to be distributed, currently deploying standalone JBoss JAR modules, lowest level being our model layer and some utilities/constants.  The higher levels being EJB layers and controllers.  I found it kind of odd with the number of

       

      Would it be possible to support returning an Archive[] or Collection<Archive> in these methods when their order is all relative ( can be ordered based on the entries in the collection/array )?  Something like this:

       

      @Deployment(testable=false,order=1)

      public static JavaArchive[] createTestArchive() {

                return {ShrinkWrap.create(JavaArchive.class, "test1.jar")..,

                          ShrinkWrap.create(JavaArchive.class, "test2.jar")..,

                          ShrinkWrap.create(JavaArchive.class, "test3.jar")..};

      }

       

       

      @Deployment(order=2)

      public static JavaArchive createTestArchive() {

                return ShrinkWrap.create(JavaArchive.class, "test4.jar")..;

      }

       

      One issue is that the name has to be specified with multiple deployments - can the name be derived by archive.getName() ?