1 Reply Latest reply on Aug 19, 2006 8:57 AM by lirui zhu

    Question on SeamTest.Script

    lirui zhu Newbie

       

      7 public class RegistrationTest extends SeamTest {
      8
      9 @Test(groups = "function")
      10 public void testLogin() throws Exception {
      11
      12 new Script() {}.run();
      13 }
      14
      15}
      


      It run it on the eclipse with testng plugin, the result is below:

      java.lang.NullPointerException
       at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:215)
       at guangming.registration.RegisterTest.testLogin(RegisterTest.java:12)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
       at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
       at org.testng.TestRunner.privateRun(TestRunner.java:687)
       at org.testng.TestRunner.run(TestRunner.java:567)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:242)
       at org.testng.SuiteRunner.run(SuiteRunner.java:148)
       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
       at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
       at org.testng.TestNG.run(TestNG.java:613)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:85)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:127)
      


      I need some body's help.

        • 1. Re: Question on SeamTest.Script
          lirui zhu Newbie

          I use the microcontainer for the Seam.

          I think the trouble may be in Configuration of the Seam.Script or the Facesconfig.

          But i have not idea how to slove it. At least, the EntityManager and SessionBean's Test is ok.

          I've read the tutorial of Seam, especially the charpter 9 and 12 that is only one meterial i can get for the configuration and Test.

          In my option it is not easy to beginner which use the MAVEN.

          Thanks a lot for reading.