1 Reply Latest reply on Feb 23, 2009 2:42 PM by coenos

    Why does TestNG not work in my Eclipse environment ????

    coenos

      Ok I have this simple test:


      
      package xxxx.test.facestest;
      
      import org.jboss.seam.Component;
      import org.jboss.seam.mock.SeamTest;
      import org.testng.annotations.Test;
      
      import xxxx.order.session.facade.QuotationFacade;
      
      public class MyFacesTest extends SeamTest{
              
              @Test
              public void testThisNow() throws Exception{
                      
                      new FacesRequest(){
                              @Override protected void invokeApplication() throws Exception { 
                                      QuotationFacade facade = (QuotationFacade)Component.getInstance("quotationFacadeImpl",true);    
                                      assert true;
                              }
                      }.run();
              }
      }
      
      
      




      I have this test suite:


      
      <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
      <suite name="umbrella-war">
        <test verbose="2" name="xxxx.test.facestest.MyFacesTest" annotations="JDK">
          <classes>
            <class name="xxxx.test.facestest.MyFacesTest"/>
          </classes>
        </test>
      </suite>
      
      



      I have these classes/directories in the classpath of the Suite Run Dialog:


      BOOTSTRAP
      bootstrap directory from the Seam distr.
      hibernate-all.jar
      jboss-embedded-all.jar
      thirdparty-all.jar
      activation.jar
      jboss-seam-remoting.jar
      jboss-deployers-client-spi.jar
      jboss-deployers-core-spi.jar
      jboss-embedded-api.jar
      jboss-seam.jar
      jsf-api.jar
      el-api.jar


      USER ENTRIES:
      The WAR project and attached EJB project.


      I am getting this Exception which tells me nothing.


      
      [Parser] Running:
        C:\Workspaces\EclipseTNTUmbrellaWorkspace\umbrella-parent\umbrella-war\src\test\java\uk\co\tntpost\umbrella\test\facestest\MyFacesTestsuite.xml
      
      FAILED: testThisNow
      java.lang.NullPointerException
              at org.jboss.seam.mock.AbstractSeamTest$Request.run(AbstractSeamTest.java:492)
              at xxxx.test.facestest.MyFacesTest.testThisNow(MyFacesTest.java:19)
      ... Removed 22 stack frames
      
      ===============================================
          xxxx.test.facestest.MyFacesTest
          Tests run: 1, Failures: 1, Skips: 0
      ===============================================
      
      
      ===============================================
      umbrella-war
      Total tests run: 1, Failures: 1, Skips: 0
      ===============================================
      
      
      



      Please help, because I am running out of options.
      Coen