1 Reply Latest reply on Jun 25, 2008 1:14 PM by alucardeck

    Emma with TestNG --- new ComponentTest() problem

    alucardeck

      Hi,
      i start to use TestNG, Emma coverage and Seam

      after a few hours, i make they both work with success..
      but there is a problem when Emma will pass by the new ComponentTest() line
      it turns the line RED and all others inside the object RED too...
      then in the Emma report, it shows another class like...
      ' class ServicoHomeIntegrationTest$1 '
      if there is 2 or more new ComponentTest() it will create one class for each one...


      new ComponentTest is an abstract class... but its very important to use it in Seam generator tests... at least i didnt find another command to replace in ComponentTest()..


      i would like a help from someone that has the same problem..
      or maybe know if its a bug and the developers will fix it soon


      Here is the original code:


      import org.jboss.seam.mock.SeamTest; 
      import org.testng.annotations.Test; 
      import br.prodesan.jproser.sessionsbeans.ServicoHome; 
       
      public class ServicoHomeIntegrationTest extends SeamTest { 
       
      private ServicoHome servicoHome;  
       
      @Test 
      public void initDependencia()throws Exception{ 
      new ComponentTest(){ 
       
      @Override 
      protected void testComponents() throws Exception { 
      //instancia statusprocedimentoHome 
      servicoHome= (ServicoHome)getInstance("servicoHome"); 
      } 
      }.run(); 
      } 
      }