1 Reply Latest reply on Dec 26, 2013 3:08 AM by Robert Panzer

    Debugging problem in Arquillian-Junit test

    arko maity Newbie

      Hi,

      I have designed an arquillian test framework in order to make junit test for our application business logic.I have encountered a problem regarding debugging the unit test code.The debug pointer stops at the static methods but fails to stop in the test methods.I have tried several solutions like updating jdk from 1.6 to 1.7  and added the following jvm arguments "-XX:+UseParallelGC", but it didn't work. I am using junit 4.8.1 , jdk 1.7 & Jboss7.1. Below is the test code:-

       

      @Deployment

          public static WebArchive createDeployment() {

            

              return ShrinkWrap.create(WebArchive.class, "test.war")

                   

                      .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")

                      .addAsResource("META-INF/persistence.xml")              

                      .addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)

                              .loadEffectivePom("pom.xml")                      

                             .artifact("org.apache.commons:commons-io:1.3.2")

                             .artifact("joda-time:joda-time:1.6")                    

                             .artifact("org.hibernate:hibernate-jpamodelgen:4.3.0.CR1")

                             .artifact("org.hibernate:hibernate-validator:4.3.0.Final")

                             .artifact("commons-lang:commons-lang:2.4")

                               . . .

                             .resolveAsFiles())           

                             .addPackages(false,getCorePackages());                             

          }

       

          public static Package[] getCorePackages() {

              return new Package[] {

                      BusinessDefModule.class.getPackage(),

                      BankTest.class.getPackage(),

                      BusinessDefTest.class.getPackage(),

                      . . .

          }

       

       

          @PersistenceContext

          @Produces

          @Default

          EntityManager em;

       

          @Inject

          UserTransaction utx;

       

          @Inject

          private BusinessDefModule bdf;

       

      @BeforeClass

          public static void beforeTest(){

              . . .     

              log.info("*-------------Test Started-------------*" +  "\n");

          }

       

      @Test

          public void testfetchCustMgmtByCustMaster() {

                      custmanage = bdf.fetchCustMgmtByCustMaster(cust);      

              assertNotNull(custmanage.getId());

               }

       

      Thanks in advance for any help.

      Regards

      Arko