10 Replies Latest reply on Sep 14, 2009 10:25 PM by Preston

    SeamTest + JUnit

    Bernard Labno Master

      Hello !
      I'm a Netbeans addict and will not switch to Eclipse, but since there is no TestNG support for Netbeans I'd like to run SeamTest's with JUnit. I wrote JUnit4 test extending SeamTest but there is lots of initialization problems. I guess that is no JUnit issue but some my fault.


      Can you tell me how testing with SeamTest works ?


      My project structure :


      Ear+
         |-ejb.jar
         |-web.war



      Since tests are in ejb.jar Netbeans puts in classpath the ejb build directory, which gets scanned, and since there is no components.xml I get :

      java.lang.IllegalArgumentException: You must specify
      org.jboss.seam.core.init.jndiPattern or use @JndiName


      As I understand application is not deployed on server. How then all the EJB's get injected ? I'm having some jndi problems with that.
      I also get lots of ClassNotFoundExceptions. As far as I understand,  init() method in SeamTest scans all jars in test class path so I put entire EAR there, but this seems to be silly solution.


      Tell me then what shall I put in test classpath ?
      How should my jndiPattern look like, same as for AS JBoss ?


      I have jboss-seam-2.0.1.CR1 and jboss-4.2.3.GA