-
1. Re: Null Pointer Exception During Integration Testing
pmuir Dec 3, 2007 6:03 PM (in response to neilac333)Post the whole of the log output from TestNG
-
2. Re: Null Pointer Exception During Integration Testing
neilac333 Dec 3, 2007 6:34 PM (in response to neilac333)I am not sure what sort of output you mean. I have checked the TestNG documentation, and there does not seem to be any specialized logging besides writing my own custom TestListenerAdapter.
I was actually just about to ask if there is a way to determine what Seam is looking for from the ServletApplicationMap. I tried setting all the logging levels in log4j.xml in the bootstrap folder to the level of DEBUG, and I ran Ant in -verbose mode. I am still not getting any useful information.
All I have so far is this:DEBUG [model.test.SearchActionAdvancedTest] Starting method testSearchActionComponent DEBUG [org.jboss.seam.contexts.TestLifecycle] >>> Begin test DEBUG [org.jboss.seam.contexts.TestLifecycle] <<< End test
Obviously, that isn't much. Let me know how to add more logging beyond the measures I have described already, and I will be sure to provide that output as soon as possible.
Thanks. -
3. Re: Null Pointer Exception During Integration Testing
neilac333 Dec 4, 2007 1:24 PM (in response to neilac333)So I commented everything out in my test and tried this:
Assert.assertEquals(getValue("#{identity.loggedIn}"), false);
And I get the same NPE for a component that is BUILT_IN. It seems to me that I am either missing a JAR file in the classpath, or more likely I am missing a configuration file. The classpath for TestNG points to the bootstrap directory at the top level of the Seam 2.0 GA distribution. The only thing I have altered is log4j.xml--in order to set every logging level to DEBUG.
I have noticed components.xml is not in that directory. Should I add it and/or other files to get my tests running?
Thanks for any insight. -
4. Re: Null Pointer Exception During Integration Testing
neilac333 Dec 5, 2007 3:37 PM (in response to neilac333)I should probably mention that I am running my test by compiling all my code into a JAR file, which is included on the classpath of TestNG. This JAR has seam.properties located in the META-INF directory. Is this OK for my test to work?
If anyone has managed to get SeamTest to work for integration tests with Seam 2.0 GA, I would appreciate any insights.
Thanks. -
5. Re: Null Pointer Exception During Integration Testing
pmuir Dec 6, 2007 5:21 PM (in response to neilac333)Did you use seam-gen to set up your project? Tests defintely work here.