4 Replies Latest reply on Apr 16, 2007 4:00 PM by Michael Robinson

    configuring integration testing with TestNG in eclipse

    Matt Drees Master

      I seam-gened a new empty project, and then created a simple action (seam new-action) called RegisterAction. I could right-click on the RegisterTest file and run TestNG, and it would pass.

      If I add

      @PersistenceContext
      private EntityManager em;
      

      to RegisterAction.java, the test fails with "NameNotFoundException: RegisterAction not bound".

      If I run the test through ant (command line or eclipse), it passes.

      Visually comparing the eclipse output with the ant output, the only difference I saw was that the ant output has an extra 3 lines:
       [testng] 02:06:35,705 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=test-build,name=RegisterAction,service=EJB3 with dependencies:
       [testng] 02:06:35,705 INFO [MCKernelAbstraction] AbstractDependencyMetaData@9722c9{dependency=persistence.units:jar=test-build.jar,unitName=integrationtest}
       [testng] 02:06:35,736 INFO [EJBContainer] STARTED EJB: org.uscm.integrationtest.RegisterAction ejbName: RegisterAction
      


      So apparently RegisterAction isn't getting installed as an EJB.

      Does anyone know why that might be?

      I'm using seam from cvs (head).