0 Replies Latest reply on Feb 6, 2013 10:39 AM by Stijn Cremers

    How to add test classes to an imported ear file and run server side with arquillian?

    Stijn Cremers Novice

      I want to create integration tests using arquillian. As deployment i want to use the ear that is also used to deploy in production.

       

       

      So this is my deployment:

       

       

      @Deployment(testable = true)

      public static Archive<?> createDeployment() {

          return ShrinkWrap

                          .create(ZipImporter.class, "test.ear")

                          .importFrom(new File("simple-webservice-ear-1.0.0-SNAPSHOT.ear"))

                          .as(EnterpriseArchive.class);

      }

       

       

       

      When i run my test class I get a java.lang.ClassNotFoundException because the test class is not found. I know I can set testable=false on the deployment but then the persistence extension doesn't work: see http://stackoverflow.com/questions/14694738/arquillian-persistence-extention-doesnt-work.

       

       

      How can i solve this problem?

      Is there a way to add my test class to the deployment? Or should i create my deployment in another way?

       

      This is a copy of http://stackoverflow.com/questions/14713129/how-to-add-test-classes-to-an-imported-ear-file-and-run-server-side-with-arquill