1 Reply Latest reply on Oct 25, 2011 12:01 PM by aslak

    Arquillian TestNG tests

    zeeman

      Few questions:

       

      1- I use latest CR Arquillian with TestNG + Seam3 in AS7.0.1. I have a complex project, it gets time consuming to create a @Deployment for each test. How can I create a @Deployment war archive once and all of my tests will run in it? I don't want to have one class with many methods, I would like to have separate test classes and one deployed WAR.

       

      I want to use a @BeforeSuite and create the archive once, I looked at code in arquillian-testng-core and it did not seem it was possible. I hope there is a programmatic way to control this. Any ideas?


      2- Any input on how not to commit transactions from tests so DB is always clean for other tests? (I use H2 in-memory for tests). Spring offer this functionality with its tests infrastructure. From test methods caller can choose to commit transaction or not. Not sure how would that work with CDI and Weld.

       

      3- I use managed AS7, how can I use embedded one? It's not in Arquillian documentation. I just want to my tests to run on their own without depending on any external deployments.

       

      Thanks!

        • 1. Re: Arquillian TestNG tests
          aslak

          zeeman wrote:

           

          Few questions:

           

          1- I use latest CR Arquillian with TestNG + Seam3 in AS7.0.1. I have a complex project, it gets time consuming to create a @Deployment for each test. How can I create a @Deployment war archive once and all of my tests will run in it? I don't want to have one class with many methods, I would like to have separate test classes and one deployed WAR.

           

          I want to use a @BeforeSuite and create the archive once, I looked at code in arquillian-testng-core and it did not seem it was possible. I hope there is a programmatic way to control this. Any ideas?

           

          https://issues.jboss.org/browse/ARQ-197

           

           

          zeeman wrote:

           

          Few questions:

          2- Any input on how not to commit transactions from tests so DB is always clean for other tests? (I use H2 in-memory for tests). Spring offer this functionality with its tests infrastructure. From test methods caller can choose to commit transaction or not. Not sure how would that work with CDI and Weld.

           

           

          This is coming in the upcoming arquillian persistence extension. Alpha soon

           

           

          zeeman wrote:

           

          Few questions:

           

          3- I use managed AS7, how can I use embedded one? It's not in Arquillian documentation. I just want to my tests to run on their own without depending on any external deployments.

           

          Thanks!

           

          There is no JBoss AS7 Embedded support in Arquillian yet.

          https://issues.jboss.org/browse/AS7-974