7 Replies Latest reply on Jun 14, 2012 8:34 AM by Charlee Chitsuk

    The Arquillian test case which sharing super class for deployment only succes with 2 rounds.

    Charlee Chitsuk Newbie

      Dear All,



      I'm in the Eclipse/Maven/Arquillian/Glassfish-Embedded environment. I've the JUnit/Arquillian test case which shares the super class for deployment as the following: -


      h4. The Utility for creating ear



          public class ArchivePreparation {


              private static final EnterpriseArchive EAR;


              //Getter here


              static {

                 EAR = getDeployinngEar();



              private static EnterpriseArchive getDeployingEar() {

                 //Create and return the ear.





      h4. The super class



          public class AbstractTester {


              public static EnterpriseArchive deploy() {

                  return ArchivePreparation.getEAR();





      h4. The test case #1, #2, #3 and #4: It is same coding.




          public class EarTester1 extends AbstractTester {



              private DummyServiceable serviceEjb;



              public void whenPerform() {

                  Assert.assertNotNull("The service ejb is null.",







      h4. The JUnit test suite










          public class ArquillianMultipleTestSuite {





      When I execute the ArquillianMultipleTestSuite, for both inside the Eclipse and command line with mvn test,

      *+Only the EarTester #1 and #2 is success. The #3 and #4 _are always fail 100%_.+*

      Since all test cases are the same coding, I'm very confused and have no idea why it is failure. Could you please help to advise further? Thank you very much for your help in advance. I'm looking forward to hearing from you soon.




      Charlee Ch.